Bläddra i källkod

Merge branch 'rmaster' into monitor

stanley-king 4 år sedan
förälder
incheckning
a201af358e

+ 7 - 1
admin/control/merchant.php

@@ -1406,8 +1406,14 @@ class merchantControl extends SystemControl
         foreach ($merchant_list as $key => $value) {
             $merchants[$value['mchid']] = $value;
         }
+        if ($_GET['time'] == 1) {
+            $condition['refill_order.order_time'] = ['between', [(time() - 3600), (time() - 1800)]];
+        }
+        if ($_GET['time'] == 2) {
+            $condition['refill_order.order_time'] = ['lt', (time() - 3600)];
+        }
 
-        $order_list = $model_refill_order->getMerchantOrderList($condition, 1000, 'refill_order.*,vr_order.order_state', 'refill_order.order_time desc');
+        $order_list = $model_refill_order->getMerchantOrderList($condition, 100, 'refill_order.*,vr_order.order_state', 'refill_order.order_time desc');
 
         $stat = Model('')->table('refill_order,vr_order')->join('inner')
             ->on('refill_order.order_id=vr_order.order_id')

+ 2 - 0
admin/templates/default/merchant.edit.php

@@ -71,6 +71,8 @@
                     <input name="quality" <?php if($output['merchant']['quality'] == 5){ echo 'checked';}?> value="5" type="radio">慢充
                     <input name="quality" <?php if($output['merchant']['quality'] == 11){ echo 'checked';}?> value="11" type="radio">慢充一次+普充
                     <input name="quality" <?php if($output['merchant']['quality'] == 12){ echo 'checked';}?> value="12" type="radio">三方一次+普充
+                    <input name="quality" <?php if($output['merchant']['quality'] == 13){ echo 'checked';}?> value="13" type="radio">三方一次+普充+卡密+快充
+                    <input name="quality" <?php if($output['merchant']['quality'] == 14){ echo 'checked';}?> value="14" type="radio">普充+快充
                 </td>
             </tr>
             </tbody>

+ 12 - 0
admin/templates/default/refill.order.send.index.php

@@ -25,6 +25,18 @@
                 <a href="index.php?act=merchant&op=OrderQuery" class="btns" >
                     <span><i class="icon-edit"></i>更新待收货订单状态</span>
                 </a>
+                <a href="#" class="btns" onclick="hCopyChannel(event)">
+                    <span><i class="icon-edit"></i>拷贝渠道单号</span>
+                </a>
+                <a href="#" class="btns" onclick="hCopyCardNo(event)">
+                    <span><i class="icon-edit"></i>拷贝充值卡号</span>
+                </a>
+                <a href="index.php?act=merchant&op=OrderSendList&time=1" class="btns" >
+                    <span><i class="icon-edit"></i>耗时半小时订单</span>
+                </a>
+                <a href="index.php?act=merchant&op=OrderSendList&time=2" class="btns" >
+                    <span><i class="icon-edit"></i>耗时一小时订单</span>
+                </a>
             </td>
         </tr>
         <tr class="space odd" id="autoClick">

+ 2 - 0
crontab/control/minutes.php

@@ -21,6 +21,8 @@ class minutesControl extends BaseCronControl
         $this->_cron_common();
         $this->_web_index_update();
         $this->_check_merchant_alarm_amount();
+        $this->check_refill_order_limit();
+
 //      $this->_cron_mail_send();
 //        $this->_SendOrderQuery();
         Log::record(__FUNCTION__ . " end",Log::DEBUG);

+ 3 - 3
data/config/dev/base.ini.php

@@ -45,11 +45,11 @@ $config['gip'] 		= 0;
 $config['dbdriver'] = 'mysqli';
 $config['tablepre']	= 'lrlz_';
 
-//define('SSH_TUNEL_PROD',true);
-define('SSH_TUNEL_PROD','xyz');
+define('SSH_TUNEL_PROD','local');
+//define('SSH_TUNEL_PROD','xyz');
 //define('SSH_TUNEL_PROD','lingzh');
 
-if(SSH_TUNEL_PROD === false) {
+if(SSH_TUNEL_PROD ==='local') {
     $config['db'][1]['dbhost']       = MASTER_DBHOST;
     $config['db'][1]['dbport']       = '3306';
     $config['db'][1]['dbuser']       = 'root';

+ 1 - 1
data/config/win/base.ini.php

@@ -34,7 +34,7 @@ $config['delivery_site_url']    = $SRV_HOST.'/delivery';
 //    '13911129867' , '18500608333' , '18500350111' , '15136908757'
 //];
 $config['system_manager_phones'] = [
-    '17801048874' , '17611378259'
+//    '17801048874' , '17611378259'
 ];
 
 if(defined('USE_REMOTE_IMAGE') && USE_REMOTE_IMAGE == true) {

+ 350 - 235
data/config/win/refill.ini.php

@@ -2,327 +2,442 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [100 , 200 , 500 , 1000 , 2000];
-$config['refill_phone_specs'] = [10 , 20 , 30 , 50 , 100 , 200 , 300 , 500];
+$config['refill_oil_specs'] = [100, 200, 500, 1000, 2000];
+$config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
+
 //充值额度基本表
 $config['refill_specs'] = [
-    'petrochina'    => $config['refill_oil_specs'],
-    'sinopec'       => $config['refill_oil_specs'],
-    'chinamobile'   => $config['refill_phone_specs'],
-    'chinaunicom'   => $config['refill_phone_specs'],
-    'chinatelecom'  => $config['refill_phone_specs']
+    'petrochina'  => $config['refill_oil_specs'],
+    'sinopec'     => $config['refill_oil_specs'],
+    'chinamobile' => $config['refill_phone_specs'],
+    'chinaunicom' => $config['refill_phone_specs'],
+    'chinatelecom' => $config['refill_phone_specs']
 ];
 
-
 //充值渠道配置表
-$oil_providers = [];
+//速汇充京东加油通道
+$tianjt_oil = ['name' => 'tianjt', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 97.0, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+//速汇充天猫加油通道
+$suhctm_oil = ['name' => 'suhctm', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+$suhcpdd_oil = ['name' => 'suhcpdd', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+//赵梓暄提供的加油通道
+$zzx_oil = ['name' => 'zzx', 'store_id' => 13,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6307, 'price' => 97.8, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        200 => [['goods_id' => 6308, 'price' => 195.6, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        500 => [['goods_id' => 6309, 'price' => 489, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        1000 => [['goods_id' => 6310, 'price' => 978, 'quality' => 1, 'card_type' => 'petrochina,sinopec']]
+    ],
+    'refill_type' => 'api'];
+
+//赵梓暄提供的加油通道
+$lx_oil = ['name' => 'lx', 'store_id' => 14,'qualitys' => '1',
+    'amount' => [
+        500 => [['goods_id' => 6322, 'price' => 479, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6311, 'price' => 958, 'quality' => 1, 'card_type' => 'sinopec']] //,
+//        2000 => ['goods_id' => 6322, 'price' => 1916]
+    ],
+    'period' => ['start' => '14:00', 'end' => '19:00'], 'official_sn' => true, 'refill_type' => 'inner_store'];
+
+//赛虎
+$saihu_oil = ['name' => 'saihu', 'store_id' => 15,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6313, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6314, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6315, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6316, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']],
+        2000 => [['goods_id' => 6317, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'refill_type' => 'api'];
+
+#官方中石油通道
+$gftd_oil = ['name' => 'gftd', 'store_id' => 19,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6339, 'price' => 95, 'quality' => 1, 'card_type' => 'petrochina']],
+        200 => [['goods_id' => 6340, 'price' => 190, 'quality' => 1, 'card_type' => 'petrochina']],
+        500 => [['goods_id' => 6341, 'price' => 475, 'quality' => 1, 'card_type' => 'petrochina']],
+        1000 => [['goods_id' => 6342, 'price' => 950, 'quality' => 1, 'card_type' => 'petrochina']]
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
+#官方中石化通道
+$gftdsinop_oil = ['name' => 'gftdsinop', 'store_id' => 20,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6343, 'price' => 95, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6344, 'price' => 190, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6345, 'price' => 475, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6346, 'price' => 950, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
+$oil_providers = [
+    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
+    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
+    ['name' => 'suhcpdd', 'cfg' => $suhcpdd_oil],
+    ['name' => 'zzx', 'cfg' => $zzx_oil],
+    ['name' => 'lx', 'cfg' => $lx_oil],
+    ['name' => 'saihu', 'cfg' => $saihu_oil],
+    ['name' => 'gftd', 'cfg' => $gftd_oil],
+    ['name' => 'gftdsinop', 'cfg' => $gftdsinop_oil]
+];
 $config['oil_providers'] = $oil_providers;
 
+$beixt_phone = ['name' => 'beixt', 'store_id' => 8,'qualitys' => '1',
+    'amount' => [
+        50 => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6296, 'price' => 97.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6297, 'price' => 195,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
 
-$baizeyd = ['name' => 'baizeyd', 'store_id' => 32,'qualitys' => '1',
+$bxtwt_phone = ['name' => 'bxtwt', 'store_id' => 10,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 1, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        30 => [
-            ['goods_id' => 3, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        50 => [
-            ['goods_id' => 4, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        100 => [
-            ['goods_id' => 5, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        200 => [
-            ['goods_id' => 6, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
+        50 => [['goods_id' => 6298, 'price' => 48,   'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6299, 'price' => 96,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6300, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
-    'official_sn' => true, 'refill_type' => 'api'];
+    'refill_type' => 'api'];
 
+$bjb_phone = ['name' => 'bjb', 'store_id' => 12,'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6305, 'price' => 9.51,  'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6306, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6301, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6302, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6303, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6304, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6327, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6328, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
-$aming_phone = ['name' => 'aming', 'store_id' => 34,'qualitys' => '1',
+$lingzh_phone = ['name' => 'lingzh', 'store_id' => 28,'qualitys' => '1,3,5',
     'amount' => [
         10 => [
-            ['goods_id'  => 9, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6389, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6389, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6389, 'price' => 9.53, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6389, 'price' => 9.20, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         20 => [
-            ['goods_id' => 10, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6390, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6390, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6390, 'price' => 19.06, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6390, 'price' => 18.40, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 11, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6391, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6391, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6391, 'price' => 28.59, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6391, 'price' => 27.60, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 12, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6392, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6392, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6392, 'price' => 47.65, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6392, 'price' => 46.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 13, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6393, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6393, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6393, 'price' => 95.3, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6393, 'price' => 92.0, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 14, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6394, 'price' => 190.60, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6394, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6394, 'price' => 190.60, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6394, 'price' => 184.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 15, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6395, 'price' => 285.90, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6395, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6395, 'price' => 285.90, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6395, 'price' => 276.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         500 => [
-            ['goods_id' => 16, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+            ['goods_id' => 6396, 'price' => 476.50, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6396, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6396, 'price' => 476.50, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6396, 'price' => 460.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$binghc_phone = ['name' => 'binghc', 'store_id' => 35,'qualitys' => '1',
+//$lingzhdl_phone = ['name' => 'lingzhdl', 'store_id' => 29, 'qualitys' => '1',
+//    'amount' => [
+//        10 => [['goods_id' => 6397, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 6398, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        30 => [['goods_id' => 6399, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        50 => [['goods_id' => 6400, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//
+//        100 => [['goods_id' => 6401, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        200 => [['goods_id' => 6402, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 6403, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 6404, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+//    ],
+//    'official_sn' => true, 'refill_type' => 'api'];
+
+$bjbyd_phone = ['name' => 'bjbyd', 'store_id' => 24,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 17, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 18, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 19, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 20, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 21, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 22, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 23, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 24, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+        30 => [['goods_id' => 6367, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6368, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6369, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6370, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$ruishun_phone = ['name' => 'ruishun', 'store_id' => 36,'qualitys' => '1',
+$afandnew_phone = ['name' => 'afandnew', 'store_id' => 25,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 25, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 26, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 27, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 28, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 29, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 30, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 31, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 32, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6454, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6455, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6386, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6371, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6372, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6373, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6387, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6388, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
+
+$tianx_phone = ['name' => 'tianx', 'store_id' => 25,'qualitys' => '1',
+    'amount' => [
+        50 => [['goods_id' => 6371, 'price' => 46.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6372, 'price' => 93,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6373, 'price' => 186, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
+
+$yifa_phone = ['name' => 'yifa', 'store_id' => 16,'qualitys' => '1',
+    'amount' => [
+        30 => [['goods_id' => 6318, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6319, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6320, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6321, 'price' => 191,  'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'refill_type' => 'api'];
+
+$jiec_phone = ['name' => 'jiec', 'store_id' => 17,'qualitys' => '1',
+    'amount' => [
+        30 => [['goods_id' => 6323, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6324, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6325, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6326, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6329, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6330, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$wuchen_phone = ['name' => 'wuchen', 'store_id' => 37,'qualitys' => '1',
+$weit_phone = ['name' => 'weit', 'store_id' => 18,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 33, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 34, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 35, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 36, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 37, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 38, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 39, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 40, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6337, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6338, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6331, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6332, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6333, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6334, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6335, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6336, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$yibao_phone = ['name' => 'yibao', 'store_id' => 38,'qualitys' => '1',
+$afand_phone = ['name' => 'afand', 'store_id' => 26,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 41, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 42, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 43, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 44, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        30 => [['goods_id' => 6374, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6375, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6376, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6377, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6378, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6379, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingyd_phone = ['name' => 'amingyd', 'store_id' => 39,'qualitys' => '1',
+$afandeng_phone = ['name' => 'afandeng', 'store_id' => 27,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 45, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        50 => [
-            ['goods_id' => 46, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        100 => [
-            ['goods_id' => 47, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        200 => [
-            ['goods_id' => 48, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
+        10 => [['goods_id' => 6406, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6407, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6380, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6381, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6382, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6383, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6384, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6385, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$chuka_phone = ['name' => 'chuka', 'store_id' => 40,'qualitys' => '1',
+$tongy_phone = ['name' => 'tongy', 'store_id' => 31,'qualitys' => '2',
     'amount' => [
-        20 => [
-            ['goods_id' => 49, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        30 => [
-            ['goods_id' => 50, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        50 => [
-            ['goods_id' => 51, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        100 => [
-            ['goods_id' => 52, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
+        30 => [['goods_id' => 6408, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6408, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6408, 'price' => 29.64, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        50 => [['goods_id' => 6409, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6409, 'price' => 48.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6409, 'price' => 49.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        100 => [['goods_id' => 6410, 'price' => 99.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6410, 'price' => 97.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6410, 'price' => 98.8, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        200 => [['goods_id' => 6411, 'price' => 198.4, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6411, 'price' => 194.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6411, 'price' => 197.6, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        300 => [['goods_id' => 6412, 'price' => 297.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6412, 'price' => 291.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6412, 'price' => 296.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        500 => [['goods_id' => 6413, 'price' => 496, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6413, 'price' => 486.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6413, 'price' => 494, 'quality' => 2, 'card_type' => 'chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingjd_phone = ['name' => 'amingjd', 'store_id' => 41,'qualitys' => '5',
+$weiyi_phone = ['name' => 'weiyi', 'store_id' => 32,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 55, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 56, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 53, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 54, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ]
+        10 => [['goods_id' => 6414, 'price' => 9.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6415, 'price' => 19.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6416, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6417, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6418, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6419, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6420, 'price' => 288, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6421, 'price' => 480, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$legou_phone = ['name' => 'legou', 'store_id' => 42,'qualitys' => '3',
+$tonglu_phone = ['name' => 'tonglu', 'store_id' => 33,'qualitys' => '4',
     'amount' => [
-        10 => [
-            ['goods_id' => 57, 'price' => 9.7, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 58, 'price' => 19.4, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 59, 'price' => 29.1, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 60, 'price' => 48.5, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 61, 'price' => 97, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 62, 'price' => 194, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 63, 'price' => 291, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 64, 'price' => 485, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6422, 'price' => 9.4, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6423, 'price' => 18.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6424, 'price' => 28.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6425, 'price' => 47, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6426, 'price' => 94, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6427, 'price' => 188, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6428, 'price' => 282, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6429, 'price' => 470, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$xc_phone = ['name' => 'xc', 'store_id' => 34, 'qualitys' => '4',
+    'amount' => [
+        10 => [['goods_id' => 6430, 'price' => 9.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6431, 'price' => 19.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6432, 'price' => 28.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6433, 'price' => 48, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6434, 'price' => 96, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6435, 'price' => 192, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6436, 'price' => 288, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6437, 'price' => 480, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$feiniao_phone = ['name' => 'feiniao', 'store_id' => 44,'qualitys' => '1',
+$xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 65, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6438, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6438, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 66, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6439, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6439, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 67, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6440, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 68, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6441, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 69, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6442, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6442, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 70, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6443, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6443, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 71, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6444, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6444, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 72, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+            ['goods_id' => 6445, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6445, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$fensheng_phone = ['name' => 'fensheng', 'store_id' => 45,'qualitys' => '1',
+$wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
     'amount' => [
-        10 => [
-            ['goods_id' => 73, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 73, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 74, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 74, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 75, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 75, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 76, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 76, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 77, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 77, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 78, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 78, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
+        10 => [['goods_id' => 6446, 'price' => 9.35, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6447, 'price' => 18.7, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6448, 'price' => 28.05, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6449, 'price' => 46.75, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6450, 'price' => 93.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6451, 'price' => 187, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6452, 'price' => 280.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6453, 'price' => 467.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
 $phone_providers = [
-    ['name' => 'baizeyd', 'cfg' => $baizeyd, 'opened' => true, 'sort' => 1],
-    ['name' => 'aming', 'cfg' => $aming_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'binghc', 'cfg' => $binghc_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'ruishun', 'cfg' => $ruishun_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'wuchen', 'cfg' => $wuchen_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'yibao', 'cfg' => $yibao_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'amingyd', 'cfg' => $amingyd_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'chuka', 'cfg' => $chuka_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'amingjd', 'cfg' => $amingjd_phone],
-    ['name' => 'legou', 'cfg' => $legou_phone],
-    ['name' => 'feiniao', 'cfg' => $feiniao_phone],
-    ['name' => 'fensheng', 'cfg' => $fensheng_phone],
+//    ['name' => 'beixt', 'cfg' => $beixt_phone],
+//    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
+    ['name' => 'bjb', 'cfg' => $bjb_phone],
+    ['name' => 'bjbyd', 'cfg' => $bjbyd_phone],
+//    ['name' => 'yifa', 'cfg' => $yifa_phone],
+//    ['name' => 'jiec', 'cfg' => $jiec_phone],
+//    ['name' => 'weit', 'cfg' => $weit_phone],
+
+    ['name' => 'afand', 'cfg' => $afand_phone],
+    ['name' => 'afandeng', 'cfg' => $afandeng_phone],
+    ['name' => 'afandnew', 'cfg' => $afandnew_phone],
+    ['name' => 'lingzh', 'cfg' => $lingzh_phone],
+    ['name' => 'tongy', 'cfg' => $tongy_phone],
+    ['name' => 'weiyi', 'cfg' => $weiyi_phone],
+    ['name' => 'tonglu', 'cfg' => $tonglu_phone],
+    ['name' => 'xc', 'cfg' => $xc_phone],
+    ['name' => 'xunyin', 'cfg' => $xunyin_phone],
+//    ['name' => 'wantong', 'cfg' => $wantong_phone],
+    ['name' => 'yunling', 'cfg' => $yunling_phone],
 ];
 $config['phone_providers'] = $phone_providers;

+ 15 - 1
data/config/xyz/refill.ini.php

@@ -406,6 +406,19 @@ $wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -424,6 +437,7 @@ $phone_providers = [
     ['name' => 'tonglu', 'cfg' => $tonglu_phone],
     ['name' => 'xc', 'cfg' => $xc_phone],
     ['name' => 'xunyin', 'cfg' => $xunyin_phone],
-//    ['name' => 'wantong', 'cfg' => $wantong_phone]
+//    ['name' => 'wantong', 'cfg' => $wantong_phone],
+    ['name' => 'yunling', 'cfg' => $yunling_phone],
 ];
 $config['phone_providers'] = $phone_providers;

+ 2 - 1
helper/fcgisrv/MobileServer.php

@@ -56,7 +56,8 @@ class MobileServer extends BaseServer
             'refill_zzx.php','refill_inner.php','refill_jiec.php','refill_yifa.php',
             'bridge_shr.php','refill_weit.php','refill_afand.php','refill_afandeng.php',
             'refill_afandnew.php','refill_lingzh.php','refill_lingzhdl.php','refill_tongy.php',
-            'refill_weiyi.php','refill_tonglu.php','refill_xc.php','refill_xunyin.php'
+            'refill_weiyi.php','refill_tonglu.php','refill_xc.php','refill_xunyin.php',
+            'refill_yunling.php'
         ];
 
         $this->setExFiles($exfiles);

+ 15 - 9
helper/refill/RefillBase.php

@@ -298,16 +298,10 @@ class RefillBase
                 }
                 $last_orderid = $order_id;
 
-                if(!$this->pay_completed($order_sn)) {
-                    $logic_vr_order = Logic("vr_order");
-                    $order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
-                    $logic_vr_order->changeOrderStateCancel($order_info, '', "预存款不足以支付该订单");
-                    continue;
-                }
-
                 if (empty($mch_order)) {
                     $mch_order = $order_sn;
                 }
+
                 //虚拟订单表信息扩展
                 $orderext = ['order_id' => $order_id, 'order_sn' => $order_sn, 'mchid' => $mchid,
                     'refill_amount' => $amount, 'mch_order' => $mch_order,
@@ -317,7 +311,15 @@ class RefillBase
                     'order_time' => $order_time, 'commit_times' => $commit_times,
                     'card_type' => $card_type, 'card_no' => $card_no,'quality' => $quality,'org_quality'=> $org_quality];
                 $mod_refill->add_refill($orderext);
-            } else {
+
+                if(!$this->pay_completed($order_sn)) {
+                    $logic_vr_order = Logic("vr_order");
+                    $order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
+                    $logic_vr_order->changeOrderStateCancel($order_info, '', "预存款不足以支付该订单");
+                    break;
+                }
+            }
+            else {
                 Log::record("{$result['msg']}",Log::ERR);
                 continue;
             }
@@ -328,7 +330,11 @@ class RefillBase
                 'quality' => $quality,'order_id' => $order_id];
 
             util::incr_commit_pre($channel_name,$card_type,$amount,$quality);
-            [$state, $errmsg,$neterr] = $provider->add($card_no, $card_type, $amount, $params);
+
+            $start = microtime(true);
+            [$state, $errmsg, $neterr] = $provider->add($card_no, $card_type, $amount, $params);
+            Log::record(sprintf(" %s add request time=%.6f", $channel_name,microtime(true) - $start), Log::DEBUG);
+
             if ($state)
             {
                 //提交成功

+ 7 - 2
helper/refill/api/xyz/afand/RefillPhone.php

@@ -30,6 +30,7 @@ class RefillPhone extends refill\IRefillPhone
         return $params;
     }
 
+    //[$state, $errmsg,$neterr]
     public function add($card_no, $card_type, $amount, $params)
     {
         $params = $this->req_params($card_no, $amount, $params['order_sn']);
@@ -39,10 +40,14 @@ class RefillPhone extends refill\IRefillPhone
         $resp = http_request(config::ORDER_URL, $params , 'POST' , false);
         if ($resp === false) {
             return [false, '系统错误', true];
-        } else {
+        }
+        else
+        {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-            if ($resp['code'] == 0) {
+            if ($resp === false) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] == 0) {
                 return [true, $resp['pt_order_id'], false];
             } else {
                 return [false, $resp['msg'], false];

+ 7 - 4
helper/refill/api/xyz/gftd/RefillOil.php

@@ -111,7 +111,7 @@ class RefillOil extends refill\IRefillOil
 
         $uri = config::ORDER_URL . "/fuelRecharge/create";
         $resp = http_post_data($uri,json_encode($params), config::ExtHeaders);
-        if($resp === false) {
+        if(empty($resp)) {
             return [false,'系统错误',true];
         }
         else
@@ -119,7 +119,10 @@ class RefillOil extends refill\IRefillOil
             Log::record($resp,Log::DEBUG);
             $resp = json_decode($resp,true);
 
-            if($resp['code'] == 0)
+            if(empty($resp)) {
+                return [false,'系统错误',true];
+            }
+            elseif($resp['code'] == 0)
             {
                 refill\util::inc_card($card_no,$card_info);
                 $data = $resp['data'];
@@ -153,14 +156,14 @@ class RefillOil extends refill\IRefillOil
         $resp = http_post_data($uri,json_encode($params), config::ExtHeaders);
         Log::record("query resp={$resp}",Log::DEBUG);
 
-        if($resp === false) {
+        if(empty($resp)) {
             return [false,'网络错误'];
         }
 
         Log::record($resp,Log::DEBUG);
         $resp = json_decode($resp,true);
 
-        if($resp == false) {
+        if(empty($resp)) {
             return [false,'网络错误'];
         }
         elseif($resp['code'] == 0)

+ 7 - 5
helper/refill/api/xyz/gftdsinop/RefillOil.php

@@ -111,7 +111,7 @@ class RefillOil extends refill\IRefillOil
 
         $uri = config::ORDER_URL . "/fuelRecharge/create";
         $resp = http_post_data($uri,json_encode($params), config::ExtHeaders);
-        if($resp === false) {
+        if(empty($resp)) {
             return [false,'系统错误',true];
         }
         else
@@ -119,7 +119,10 @@ class RefillOil extends refill\IRefillOil
             Log::record($resp,Log::DEBUG);
             $resp = json_decode($resp,true);
 
-            if($resp['code'] == 0)
+            if(empty($resp)) {
+                return [false,'系统错误',true];
+            }
+            elseif($resp['code'] == 0)
             {
                 refill\util::inc_card($card_no,$card_info);
                 $data = $resp['data'];
@@ -138,7 +141,6 @@ class RefillOil extends refill\IRefillOil
         $params['outOrderNumber'] = $order_sn;
 
         return $params;
-
     }
 
     public function query($refill_info)
@@ -154,14 +156,14 @@ class RefillOil extends refill\IRefillOil
         $resp = http_post_data($uri,json_encode($params), config::ExtHeaders);
         Log::record("query resp={$resp}",Log::DEBUG);
 
-        if($resp === false) {
+        if(empty($resp)) {
             return [false,'网络错误'];
         }
 
         Log::record($resp,Log::DEBUG);
         $resp = json_decode($resp,true);
 
-        if($resp == false) {
+        if(empty($resp)) {
             return [false,'网络错误'];
         }
         elseif($resp['code'] == 0)

+ 63 - 0
helper/refill/api/xyz/yunling/RefillCallBack.php

@@ -0,0 +1,63 @@
+<?php
+
+
+namespace refill\yunling;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yunling/config.php');
+
+
+use refill;
+use Log;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&orderid={$params['orderid']}&sporderid={$params['sporderid']}&merchantsubmittime={$params['merchantsubmittime']}";
+        $content .= "&resultno={$params['resultno']}&key={$key}";
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        Log::record("notify params:" . json_encode($params),Log::DEBUG);
+
+        $status = intval($params['resultno']);
+        $order_sn = $params['sporderid'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+
+        if(empty($params['supnumber'])) {
+            $data['official_sn'] = '';
+        }
+        else {
+            $data['official_sn'] = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
+        }
+
+        if ($status === 1) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 9) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 149 - 0
helper/refill/api/xyz/yunling/RefillPhone.php

@@ -0,0 +1,149 @@
+<?php
+
+namespace refill\yunling;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yunling/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['productid'] = '';
+        $params['productType'] = '1';
+        $params['price'] = $amount;
+        $params['num'] = 1;
+        $params['mobile'] = $phone;
+        $params['spordertime'] = date("YmdHis");
+        $params['sporderid'] = $order_sn;
+        $params['back_url'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $order_sn);
+        $params['operator'] = config::operator[$card_type];
+        $region = $this->getPhoneInfo($card_no);
+        if($region === false) {
+            return [false, '归属地获取失败', false];
+        }
+
+        $params['region'] = $region;
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params);
+
+        if ($resp === false) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+
+            $resultno = intval($resp['resultno']);
+            if (in_array($resultno, [0,1,2])) {
+                return [true, $resp['orderid'], false];
+            } else {
+                return [false, $resp['message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['sporderid'] = $refill_info['order_sn'];
+        $params['userid'] = config::USER_ID;
+
+        $resp = http_request(config::QUERY_URL, $params);
+        if ($resp === false) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+
+            $resultno = intval($resp['resultno']);
+            if ($resultno === 1) {
+                $order_state = ORDER_STATE_SUCCESS;
+                $updata['official_sn'] = $resp['supnumber'];
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+            } elseif ($resultno === 9) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($resultno, [0,2])) {
+                $order_state = ORDER_STATE_SEND;
+            } else {
+                return [false, $resp['message']];
+            }
+            return [true, $order_state];
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&productid={$params['productid']}&price={$params['price']}&num={$params['num']}&mobile={$params['mobile']}&spordertime={$params['spordertime']}";
+        $content .= "&sporderid={$params['sporderid']}&key={$key}";
+        return md5($content);
+    }
+
+    public function xmlToArray($xml)
+    {
+        //禁止引用外部xml实体
+        libxml_disable_entity_loader(true);
+        $xmlstring = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
+        $val = json_decode(json_encode($xmlstring), true);
+
+        return $val;
+    }
+
+    private function getPhoneInfo($phone)
+    {
+        $url = "https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel={$phone}";
+        $resp = http_request($url);  //获取API返回 的数据
+        $resp = mb_convert_encoding($resp, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5'); //解决中文乱码
+
+        $datas = explode('=', $resp);
+        if(count($datas) == 2)
+        {
+            $body = trim($datas[1]);
+            if(preg_match_all("/(\w+):'([^']+)/", $body, $m)) {
+                $res = array_combine($m[1], $m[2]);
+                return $this->formatProvince($res['province']);
+            }
+        }
+        return false;
+    }
+
+    public function formatProvince(string $province) : string
+    {
+        if(empty($province)) {
+            return '';
+        }
+
+        $checkArr = ["省","市","自治区","特别行政区"];
+
+        for($i = 0; $i < count($checkArr); $i++) {
+            if(strpos($province, $checkArr[$i]) === false) {
+                continue;
+            } else {
+                $province = mb_strcut($province, 0, strrpos($province, $checkArr[$i]));
+            }
+        }
+
+        return $province;
+    }
+}

+ 19 - 0
helper/refill/api/xyz/yunling/config.php

@@ -0,0 +1,19 @@
+<?php
+
+
+namespace refill\yunling;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://39.101.180.197:8177/soft/onlinepay.do';
+    const QUERY_URL= 'http://39.101.180.197:8177/soft/searchpay.do';
+    const USER_ID= '10073505';
+    const KEY = 'FA302267C7EC5E3840264E6044E48CD1';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_yunling.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => '移动',
+        mtopcard\ChinaUnicomCard  => '联通',
+        mtopcard\ChinaTelecomCard => '电信'
+    ];
+}

BIN
helper/refill/api/xyz/yunling/代理接口话费充值文档1.0.6(2020).doc


+ 9 - 0
helper/refill/api/xyz/yunling/账户信息.txt

@@ -0,0 +1,9 @@
+http://39.101.180.197:8178  代理系统
+登陆名:yezi
+ID:10073505
+秘钥:FA302267C7EC5E3840264E6044E48CD1
+密码:yezi131419
+
+余额查询接口:http://39.101.180.197:8177/soft/searchbalance.do
+充值请求接口:http://39.101.180.197:8177/soft/onlinepay.do
+订单查询接口:http://39.101.180.197:8177/soft/searchpay.do

+ 1 - 0
helper/refill/policy/quaility.php

@@ -19,6 +19,7 @@ class Quality
     const SlowNormal  = 11;  // 5 -> 1
     const ThirdNormal  = 12; // 4 -> 1
     const DefSuccess = 13; // 4 -> 3 -> 1 -> 2
+    const NormalQuick = 14;
 
     protected $mMchctl;
     protected $mSpeeds;

+ 2 - 1
helper/refill/policy/xyz/quality_ploy.php

@@ -29,7 +29,8 @@ class quality_ploy extends Quality
 
             self::SlowNormal => [self::Slow, self::Normal],
             self::ThirdNormal => [self::ThirdShop, self::Normal],
-            self::DefSuccess => [self::ThirdShop, self::Normal, self::CardKey, self::Quick]
+            self::DefSuccess => [self::ThirdShop, self::Normal, self::CardKey, self::Quick],
+            self::NormalQuick => [self::Normal, self::Quick]
         ];
     }
 }

+ 4 - 0
mobile/refill_yunling.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('yunling',$_POST);
+echo ('SUCCESS');

+ 15 - 2
test/TestRedis.php

@@ -1,4 +1,4 @@
-<?php declare(strict_types=1);
+<?php declare(strict_types=0);
 
 use PHPUnit\Framework\TestCase;
 define('APP_ID', 'test');
@@ -176,11 +176,24 @@ class TestRedis extends TestCase
 
     public function testSHA1()
     {
-        $x = sha1('xxxxxxxx',true);
+        $params['supnumber'] = 'null';
+        $y = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
+        $z = strtolower($params['supnumber']) ?? '';
+
+
+        $params = [];
+        $y = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
+        $z = strtolower($params['supnumber']) ?? '';
+    }
+
+    public function testJsonEmpty()
+    {
+        $resp = json_decode('',true);
     }
 
     public static function tearDownAfterClass() : void
     {
 
+
     }
 }

+ 11 - 1
test/TestRefill.php

@@ -332,7 +332,7 @@ class TestRefill extends TestCase
     public function testPrice()
     {
         $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
-        $rate = 0.953;
+        $rate = 0.956;
         foreach ($amounts as $amount) {
             $price[] = $amount * $rate;
         }
@@ -425,6 +425,16 @@ class TestRefill extends TestCase
 //        }
     }
 
+    public function testYunlingPhone()
+    {
+        $providers = new refill\yunling\RefillPhone([]);
+//        $resp = $providers->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '40241617777847227476']);
+        $data = '{"userid":"10073505","sporderid":"40241617777847227476","orderid":"0F45757A7306D35973505","resultno":"9","merchantsubmittime":"20210407144751","ordermoney":"47.8","verifystring":"f42ac17164d5b0105b0a2f4a720892fc","sign":"4cd75d9f0c796eb1694ded9531ce5de1"}';
+        $input = json_decode($data, true);
+        refill\RefillFactory::instance()->notify('yunling',$input);
+    }
+
     public function testLingzhPhone()
     {
         $providers = new refill\lingzh\RefillPhone([]);

+ 14 - 1
test/TestTime.php

@@ -27,7 +27,20 @@ class TestTime extends TestCase
 
     public function testMicro()
     {
-        $y = (float) microtime();
+        $start = microtime(true);
+        $end = microtime(true);
+        Log::record("request time=" . ($end - $start),Log::DEBUG);
+
+        for ($i = 0; $i < 10000; $i++)
+        {
+            $x = microtime();
+            $y = (float)$x;
+            Log::record("{$y}",Log::DEBUG);
+        }
+
+        $x = microtime();
+        $y = (float)$x;
+        $z = (int)$x;
         $x = sprintf('%03d', $y * 1000000);
     }