Bladeren bron

Merge branch 'raccount' into rchannel

xiaoyu 3 jaren geleden
bovenliggende
commit
d687947ac4

+ 1 - 1
admin/control/refill_order.php

@@ -138,7 +138,7 @@ class refill_orderControl extends SystemControl
                     return ['order_time' => [$start, $end], 'add_time' => [$start, $add_end]];
                 } elseif ($time_type === 'notify_time') {
                     $add_begin = $start_date - 86400 * 5;
-                    return ['order_time' => [$start_date, $end], 'add_time' => [$add_begin, $end], 'notify_time' => [$start, $end]];
+                    return ['order_time' => [$add_begin, $end], 'add_time' => [$add_begin, $end], 'notify_time' => [$start, $end]];
                 }
             }
 

+ 3 - 2
admin/templates/default/refill.order.index.php

@@ -198,7 +198,7 @@
                 </td>
                 <th><label>日期类型</label></th>
                 <td>
-                <select name="time_type">
+                <select name="time_type" class="time_type">
                     <option value="order_time"
                             <?php if ($_GET['time_type'] == 'order_time'){ ?>selected<?php } ?>>下单时间</option>
                     <option value="notify_time"
@@ -831,12 +831,13 @@
             }
             selectStr = selectStr.substr(0, selectStr.length - 1)
             $('input[name="no_mchid"]').val(selectStr);
+            let time_type = $('.time_type').find('option:selected').text();
             let mchid = $('#mchid[name=mchid]').find('option:selected').html()
             let store_id = $('.store_id').find('option:selected').text();
             let order_state = $('.order_state').find('option:selected').text();
             let startTime = $('#startTime').val()
             let endTime = $('#endTime').val()
-            let str = `搜索导出: ${startTime}-${endTime}`
+            let str = time_type + ` : ${startTime}-${endTime}`
             if (mchid != '请选择') {
                 str = str + `,客户名称:${mchid}`
             }

+ 0 - 2
core/framework/function/core.php

@@ -1770,7 +1770,6 @@ function array_under_reset($array, $key, $type = 1)
  */
 function rkcache($key, $callback = false)
 {
-	$start = microtime(true);
     if (C('cache_open')) {
         $cacher = Cache::getInstance('cacheredis');
     } else {
@@ -1807,7 +1806,6 @@ function rkcache($key, $callback = false)
  */
 function wkcache($key, $value, $expire = null)
 {
-    $start = microtime(true);
     if (C('cache_open')) {
         $cacher = Cache::getInstance('cacheredis');
     } else {

+ 39 - 39
data/config/win/refill.ini.php

@@ -2325,23 +2325,23 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 //            ['goods_id' => 7028, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
 //        ],
         30 => [
-            ['goods_id' => 7029, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7029, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7029, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7029, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7029, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7030, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7030, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7030, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7030, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7030, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7031, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7031, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7031, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7031, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7031, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7032, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7032, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7032, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7032, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7032, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
@@ -3023,16 +3023,16 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
             ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7264, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
-//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
-//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        300 => [
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -3482,23 +3482,23 @@ $dongye_phone = ['name' => 'dongye', 'store_id' => 162, 'qualitys' => '2',
             ['goods_id' => 7367, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7368, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7368, 'price' => 48.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         100 => [
             ['goods_id' => 7369, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7369, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7369, 'price' => 97, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         200 => [
             ['goods_id' => 7370, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7370, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7370, 'price' => 194, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         300 => [
             ['goods_id' => 7371, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7371, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7371, 'price' => 291, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         500 => [
             ['goods_id' => 7372, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7372, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7372, 'price' => 485, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -3659,36 +3659,36 @@ $guantufs_phone = ['name' => 'guantufs', 'store_id' => 167,'qualitys' => '1',
 $cangbu_high_phone = ['name' => 'cangbu_high', 'store_id' => 168, 'qualitys' => '3',
     'amount' => [
         10 => [
-            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         20 => [
-            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         30 => [
-            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         50 => [
-            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         100 => [
-            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         200 => [
-            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7411, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7411, 'price' => 191, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         300 => [
-            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         500 => [
-            ['goods_id' => 7413, 'price' => 481, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7413, 'price' => 481, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 39 - 39
data/config/xyz/refill.ini.php

@@ -2325,23 +2325,23 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 //            ['goods_id' => 7028, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
 //        ],
         30 => [
-            ['goods_id' => 7029, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7029, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7029, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7029, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7029, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7030, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7030, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7030, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7030, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7030, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7031, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7031, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7031, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7031, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7031, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7032, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7032, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7032, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7032, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7032, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
@@ -3023,16 +3023,16 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
             ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7264, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
-//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
-//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        300 => [
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -3482,23 +3482,23 @@ $dongye_phone = ['name' => 'dongye', 'store_id' => 162, 'qualitys' => '2',
             ['goods_id' => 7367, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7368, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7368, 'price' => 48.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         100 => [
             ['goods_id' => 7369, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7369, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7369, 'price' => 97, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         200 => [
             ['goods_id' => 7370, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7370, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7370, 'price' => 194, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         300 => [
             ['goods_id' => 7371, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7371, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7371, 'price' => 291, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         500 => [
             ['goods_id' => 7372, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7372, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7372, 'price' => 485, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -3659,36 +3659,36 @@ $guantufs_phone = ['name' => 'guantufs', 'store_id' => 167,'qualitys' => '1',
 $cangbu_high_phone = ['name' => 'cangbu_high', 'store_id' => 168, 'qualitys' => '3',
     'amount' => [
         10 => [
-            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         20 => [
-            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         30 => [
-            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         50 => [
-            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         100 => [
-            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         200 => [
-            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7411, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7411, 'price' => 191, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         300 => [
-            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         500 => [
-            ['goods_id' => 7413, 'price' => 481, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7413, 'price' => 481, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 39 - 39
data/config/xyzadm/refill.ini.php

@@ -2325,23 +2325,23 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 //            ['goods_id' => 7028, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
 //        ],
         30 => [
-            ['goods_id' => 7029, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7029, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7029, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7029, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7029, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7030, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7030, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7030, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7030, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7030, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7031, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7031, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7031, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7031, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7031, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7032, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7032, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7032, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7032, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7032, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
@@ -3023,16 +3023,16 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
             ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7264, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
-//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
-//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        300 => [
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7265, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7266, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -3482,23 +3482,23 @@ $dongye_phone = ['name' => 'dongye', 'store_id' => 162, 'qualitys' => '2',
             ['goods_id' => 7367, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7368, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7368, 'price' => 48.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         100 => [
             ['goods_id' => 7369, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7369, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7369, 'price' => 97, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         200 => [
             ['goods_id' => 7370, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7370, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7370, 'price' => 194, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         300 => [
             ['goods_id' => 7371, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7371, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7371, 'price' => 291, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         500 => [
             ['goods_id' => 7372, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7372, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7372, 'price' => 485, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -3659,36 +3659,36 @@ $guantufs_phone = ['name' => 'guantufs', 'store_id' => 167,'qualitys' => '1',
 $cangbu_high_phone = ['name' => 'cangbu_high', 'store_id' => 168, 'qualitys' => '3',
     'amount' => [
         10 => [
-            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7406, 'price' => 9.62, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7406, 'price' => 9.55, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         20 => [
-            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7407, 'price' => 19.24, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7407, 'price' => 19.1, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         30 => [
-            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7408, 'price' => 28.86, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7408, 'price' => 28.65, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         50 => [
-            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7409, 'price' => 48.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7409, 'price' => 47.75, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         100 => [
-            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7410, 'price' => 96.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7410, 'price' => 95.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         200 => [
-            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7411, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7411, 'price' => 192.4, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7411, 'price' => 191, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         300 => [
-            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7412, 'price' => 288.6, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7412, 'price' => 286.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ],
         500 => [
-            ['goods_id' => 7413, 'price' => 481, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7413, 'price' => 481, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7413, 'price' => 477.5, 'quality' => 3, 'card_type' => 'chinaunicom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 11 - 1
helper/refill/api/xyz/dongyefs/config.php

@@ -46,6 +46,14 @@ class config
                 10 => '30000005326', 20 => '30000005327', 30 => '30000005328', 50 => '30000005329',
                 100 => '30000005330', 200 => '30000005331', 300 => '30000005332', 500 => '30000005333'
             ],//青海
+            8 => [
+                10 => '30000005630', 20 => '30000005631', 30 => '30000005632', 50 => '30000005638',
+                100 => '30000005634', 200 => '30000005635', 300 => '30000005636', 500 => '30000005637'
+            ],//黑龙江
+            5 => [
+                50 => '30000005613',
+                100 => '30000005614', 200 => '30000005615', 300 => '30000005616', 500 => '30000005617'
+            ],//内蒙古
         ],
         mtopcard\ChinaTelecomCard => [
             12 => [
@@ -68,9 +76,11 @@ class config
         "4-10-6" => 9.7, "4-20-6" => 19.4, "4-30-6" => 29.1, "4-50-6" => 48.5, "4-100-6" => 97, "4-200-6" => 194, "4-300-6" => 291, "4-500-6" => 485,//辽宁 6
         "4-30-7" => 29.73, "4-50-7" => 49.55, "4-100-7" => 99.1, "4-200-7" => 198.2, "4-300-7" => 297.3, "4-500-7" => 495.5,//吉林 7
         "4-10-9" => 9.91, "4-20-9" => 19.82, "4-30-9" => 29.73, "4-50-9" => 49.55, "4-100-9" => 99.1, "4-200-9" => 198.2, "4-300-9" => 297.3, "4-500-9" => 495.5,//上海 9
-        "4-10-13" => 9.9, "4-20-13" => 19.8, "4-30-13" => 29.7, "4-50-13" => 49.5, "4-100-13" => 99, "4-200-13" => 198, "4-300-13" => 297, "4-500-13" => 495,//福建 13
+        "4-10-13" => 9.89, "4-20-13" => 19.78, "4-30-13" => 29.67, "4-50-13" => 49.45, "4-100-13" => 98.9, "4-200-13" => 197.8, "4-300-13" => 296.7, "4-500-13" => 494.5,//福建 13
         "4-10-19" => 9.95, "4-20-19" => 19.9, "4-30-19" => 29.85, "4-50-19" => 49.75, "4-100-19" => 99.5, "4-200-19" => 199, "4-300-19" => 298.5, "4-500-19" => 497.5,//广东 19
         "4-10-29" => 9.8, "4-20-29" => 19.6, "4-30-29" => 29.4, "4-50-29" => 49, "4-100-29" => 98, "4-200-29" => 196, "4-300-29" => 294, "4-500-29" => 490,//青海 29
+        "4-10-8" => 10, "4-20-8" => 20, "4-30-8" => 30, "4-50-8" => 50, "4-100-8" => 100, "4-200-8" => 200, "4-300-8" => 300, "4-500-8" => 500,//黑龙江 8
+        "4-50-5" => 50.1, "4-100-5" => 100.2, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
 
         //电信
         "6-10-12" => 10.065, "6-20-12" => 20.13, "6-30-12" => 30.195, "6-50-12" => 50.225, "6-100-12" => 100.45, "6-200-12" => 200.9, "6-300-12" => 301.35, "6-500-12" => 502.25,//安徽 12

BIN
helper/refill/api/xyz/dongyefs/商品编码.xls


+ 54 - 48
helper/refill/api/xyz/feimingyu/config.php

@@ -1,49 +1,55 @@
-<?php
-
-
-namespace refill\feimingyu;
-
-use mtopcard;
-class config
-{
-    //回调地址需配置
-    const ORDER_URL = 'http://47.98.163.205:80/recharge/buy.do';
-    const QUERY_URL= 'http://47.98.163.205:80/recharge/query.do';
-    const BALANCE_URL = 'http://47.98.163.205:80/user/balance.do';
-
-    const USER_ID= '69876';
-    const KEY = 'AC7F7353AAA6';
-    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_feimingyu.php";
-
-    const operator = [
-        mtopcard\ChinaMobileCard  => 1,
-        mtopcard\ChinaUnicomCard  => 2,
-        mtopcard\ChinaTelecomCard => 3
-    ];
-
-    const Products = [
-        mtopcard\ChinaMobileCard =>
-            [
-                30  => 20003,
-                50  => 20004,
-                100 => 20005,
-                200 => 20006
-            ],
-        mtopcard\ChinaUnicomCard =>
-            [
-                30  => 20011,
-                50  => 20012,
-                100 => 20013,
-                200 => 20014
-            ],
-        mtopcard\ChinaTelecomCard =>
-            [
-                30  => 20019,
-                50  => 20020,
-                100 => 20021,
-                200 => 20022
-            ]
-    ];
-
-    const ERR_NOS = ['101', '102', '103', '104', '105', '106', '107', '108', '109', '100', '112', '115', '116', '117', '118', '119', '120'];
+<?php
+
+
+namespace refill\feimingyu;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://47.98.163.205:80/recharge/buy.do';
+    const QUERY_URL= 'http://47.98.163.205:80/recharge/query.do';
+    const BALANCE_URL = 'http://47.98.163.205:80/user/balance.do';
+
+    const USER_ID= '69876';
+    const KEY = 'AC7F7353AAA6';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_feimingyu.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+
+    const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                30  => 20003,
+                50  => 20004,
+                100 => 20005,
+                200 => 20006,
+                300 => 20007,
+                500 => 20008
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30  => 20011,
+                50  => 20012,
+                100 => 20013,
+                200 => 20014,
+                300 => 20015,
+                500 => 20016
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                30  => 20019,
+                50  => 20020,
+                100 => 20021,
+                200 => 20022,
+                300 => 20023,
+                500 => 20024
+            ]
+    ];
+
+    const ERR_NOS = ['101', '102', '103', '104', '105', '106', '107', '108', '109', '100', '112', '115', '116', '117', '118', '119', '120'];
 }

BIN
helper/refill/api/xyz/feimingyu/产品编码.xlsx


BIN
helper/refill/api/xyz/guochuang/20211228辽宁移动调价函.png


BIN
helper/refill/api/xyz/guochuang/20211229辽宁移动调价函.png


+ 2 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.005, "4-20-2" => 20.01, "4-30-2" => 29.91, "4-50-2" => 49.85, "4-100-2" => 99.7, "4-200-2" => 199.4, "4-300-2" => 299.1, "4-500-2" => 498.5,//天津 2
-        "4-10-6" => 9.73, "4-20-6" => 19.46, "4-30-6" => 29.19, "4-50-6" => 48.65, "4-100-6" => 97.3, "4-200-6" => 194.6, "4-300-6" => 291.9, "4-500-6" => 486.5,//辽宁 6
+        "4-10-6" => 9.725, "4-20-6" => 19.45, "4-30-6" => 29.175, "4-50-6" => 48.625, "4-100-6" => 97.25, "4-200-6" => 194.5, "4-300-6" => 291.75, "4-500-6" => 486.25,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 10.01, "4-20-8" => 20.02, "4-30-8" => 30.03, "4-50-8" => 50.05, "4-100-8" => 100.1, "4-200-8" => 200.2, "4-300-8" => 300.3, "4-500-8" => 500.5,//黑龙江 8
         "4-10-29" => 9.82, "4-20-29" => 19.64, "4-30-29" => 29.46, "4-50-29" => 49.1, "4-100-29" => 98.2, "4-200-29" => 196.4, "4-300-29" => 294.6, "4-500-29" => 491,//青海 29
@@ -87,6 +87,7 @@ class config
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
         "5-10-22" => 10.04, "5-20-22" => 20.08, "5-30-22" => 30.12, "5-50-22" => 50.2, "5-100-22" => 100.4, "5-200-22" => 200.8, "5-300-22" => 301.2, "5-500-22" => 502,//重庆 22
         "5-10-14" => 10.04, "5-20-14" => 20.08, "5-30-14" => 30.12, "5-50-14" => 50.2, "5-100-14" => 100.3, "5-200-14" => 200.6, "5-300-14" => 300.9, "5-500-14" => 501.5,//江西 14
+        "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4,//四川 23
         //电信
         "6-10-27" => 9.95, "6-20-27" => 19.9, "6-30-27" => 29.85, "6-50-27" => 49.75, "6-100-27" => 99.5, "6-200-27" => 199, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4

+ 7 - 9
helper/refill/policy/chctl.php

@@ -131,7 +131,7 @@ class chctl
                     $item = $pThis->mSpeedtable[$key];
 
                     $inPrice = $item->price();
-                    Log::record("max_price = {$max_inprice},in_price={$inPrice}",Log::DEBUG);
+//                    Log::record("max_price = {$max_inprice},in_price={$inPrice}",Log::DEBUG);
                     if ($max_inprice !== false && $inPrice > $max_inprice) {
                         continue;
                     } else {
@@ -139,7 +139,7 @@ class chctl
                     }
                 }
                 else {
-                    Log::record("auto_match speed table key={$key} is empty.",Log::DEBUG);
+//                    Log::record("auto_match speed table key={$key} is empty.",Log::DEBUG);
                 }
             }
             return $ctls;
@@ -148,7 +148,6 @@ class chctl
 
         $chooser = function ($ctl_items)
         {
-            $trace = new scope_trace(__METHOD__ . "speed_calc");
             $usable_items = [];
             foreach ($ctl_items as $item)
             {
@@ -156,8 +155,8 @@ class chctl
                     $usable_items[] = $item;
                     $item->calc_speed(); //此处必须先计算速率,因为usort函数里面不能使用协程。
                 } else {
-                    $key = $item->prefix();
-                    Log::record("key={$key} has not opened",Log::DEBUG);
+//                    $key = $item->prefix();
+//                    Log::record("key={$key} has not opened",Log::DEBUG);
                 }
             }
 
@@ -209,7 +208,6 @@ class chctl
 
         if(!empty($over_loads))
         {
-            $tracex = new scope_trace(__METHOD__ . " overload_assigner");
             $assigner = new overload_assigner();
             $assigner->add($over_loads);
             $over_loads = $assigner->assign();
@@ -327,7 +325,7 @@ class chctl
             [$count,$ratio] = $item->notify_ratio();
             $lazy_spped = $item->lazy_speed();
 
-            Log::record("auto_match channel {$name} count = {$count} ratio={$ratio} speed={$lazy_spped}",Log::DEBUG);
+//            Log::record("auto_match channel {$name} count = {$count} ratio={$ratio} speed={$lazy_spped}",Log::DEBUG);
             if($lazy_spped < self::feed_minorder) {
                 $feeds[] = $item;
             } else {
@@ -365,7 +363,7 @@ class chctl
                 $state = 'profit';
             }
 
-            Log::record("auto_match channel {$name} state={$state} comit_succ={$commit_succ} count={$comit_count} notify_count={$notify_count} notify_succ={$notify_succ} speed={$speed}", Log::DEBUG);
+//            Log::record("auto_match channel {$name} state={$state} comit_succ={$commit_succ} count={$comit_count} notify_count={$notify_count} notify_succ={$notify_succ} speed={$speed}", Log::DEBUG);
         }
 
         return [$feeds,$profits];
@@ -540,7 +538,7 @@ class chctl
         foreach ($profits as $item)
         {
             if($item->speed_overload()) {
-                Log::record("name={$item->name()} speed_overload",Log::DEBUG);
+//                Log::record("name={$item->name()} speed_overload",Log::DEBUG);
                 $overloads[] = $item;
             }
             else {

+ 1 - 1
helper/refill/policy/ctl_item.php

@@ -117,7 +117,7 @@ class ctl_item
         if(!self::USE_BIGDATA) {
             $this->mLazySpeed = $this->cur_speed();
         }
-        Log::record("{$this->mPrefix} calc_speed:{$this->mLazySpeed}",Log::DEBUG);
+//        Log::record("{$this->mPrefix} calc_speed:{$this->mLazySpeed}",Log::DEBUG);
     }
 
     public function lazy_speed()

+ 1 - 1
mchsrv/control/merchant_order.php

@@ -102,7 +102,7 @@ class merchant_orderControl extends mbMerchantControl
             $cond['vr_order.add_time'] = [['egt', $start], ['elt', $add_end], 'and'];
         } elseif ($time_type == 'notify_time') {
             $add_begin = $start_date - 86400 * 5;
-            $cond['refill_order.order_time'] = [['egt', $start_date], ['lt', $end], 'and'];
+            $cond['refill_order.order_time'] = [['egt', $add_begin], ['lt', $end], 'and'];
             $cond['vr_order.add_time'] = [['egt', $add_begin], ['elt', $end], 'and'];
             $cond['refill_order.notify_time'] = [['egt', $start], ['elt', $end], 'and'];
         } else {

+ 1 - 1
mobile/signature.php

@@ -12,7 +12,7 @@ $addr = $_SERVER['REMOTE_ADDR'];
 Log::record("request ip:{$addr}",Log::DEBUG);
 Log::record("signature data : {$data}",Log::DEBUG);
 Log::record("HTTP_SIGN : {$sign}",Log::DEBUG);
-echo ('SUCCESS');
+echo ('success');
 
 //echo("{$echostr}");
 //

File diff suppressed because it is too large
+ 4 - 0
test/TestRedis.php


+ 203 - 4
test/TestRefillClear.php

@@ -51,15 +51,89 @@ class TestRefillClear extends TestCase
         $end_date   = strtotime('2021-11-01');
         $this->clear($start_date,$end_date);
     }
+    //8-9-10 已经处理
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember1)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember1()
+    {
+        $start_date = strtotime('2021-11-10');
+        $end_date   = strtotime('2021-11-13');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember2)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember2()
+    {
+        $start_date = strtotime('2021-11-13');
+        $end_date   = strtotime('2021-11-16');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember3)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember3()
+    {
+        $start_date = strtotime('2021-11-16');
+        $end_date   = strtotime('2021-11-20');
+        $this->clear($start_date,$end_date);
+    }
+
+    //2012-12-28 执行清理
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember4)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember4()
+    {
+        $start_date = strtotime('2021-11-20');
+        $end_date   = strtotime('2021-11-23');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember5)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember5()
+    {
+        $start_date = strtotime('2021-11-23');
+        $end_date   = strtotime('2021-11-25');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember6)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember6()
+    {
+        $start_date = strtotime('2021-11-25');
+        $end_date   = strtotime('2021-11-26');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember7)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember7()
+    {
+        $start_date = strtotime('2021-11-26');
+        $end_date   = strtotime('2021-11-27');
+        $this->clear($start_date,$end_date);
+    }
+    //12-30执行
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember8)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember8()
+    {
+        $start_date = strtotime('2021-11-27');
+        $end_date   = strtotime('2021-11-29');
+        $this->clear($start_date,$end_date);
+    }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember9)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember9()
+    {
+        $start_date = strtotime('2021-11-29');
+        $end_date   = strtotime('2021-11-30');
+        $this->clear($start_date,$end_date);
+    }
 
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testNovember()
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testNovember10)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testNovember10()
     {
-        $start_date = strtotime('2021-11-03');
-        $end_date   = strtotime('2021-11-10');
+        $start_date = strtotime('2021-11-30');
+        $end_date   = strtotime('2021-12-01');
         $this->clear($start_date,$end_date);
     }
 
+
     private function clear($start_date, $end_date)
     {
         $order_finder = function ($start,$fp)
@@ -286,4 +360,129 @@ class TestRefillClear extends TestCase
     {
         $time = $this->earlist_orderday();
     }
+
+    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// 以下代码为清除pdlog
+    const pdlog_table_name = 'pd_log_bak';
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testLogSeventh)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testLogSeventh()
+    {
+        $this->delete_log(74224997,strtotime('2021-09-01'));
+    }
+
+    private function delete_log($start_id,$endtime)
+    {
+        $lgid_getter = function ()
+        {
+            $lgid = rkcache('lastest_lgid');
+            $lgid = intval($lgid);
+            return $lgid;
+        };
+
+        $lgid_writter = function ($lgid)
+        {
+            wkcache('lastest_lgid',$lgid);
+        };
+
+        $maxid_getter = function () {
+            $items = Model()->table(self::pdlog_table_name)->field('max(lg_id) as maxid')->select();
+            return intval($items['0']['maxid']);
+        };
+
+        $finder = function ($start_id, $endtime, $maxid)
+        {
+            $start = $start_id;
+
+            while (true)
+            {
+                if($start >= $maxid) break;
+
+                $end =  $start + 1000;
+                $cond = ['lg_id' => [['egt', $start], ['lt',$end], 'and']];
+
+                $items = Model()->table(self::pdlog_table_name)
+                    ->field('*')
+                    ->where($cond)
+                    ->order('lg_id asc')->select();
+
+                foreach ($items as $item)
+                {
+                    $add_time = intval($item['lg_add_time']);
+                    if($add_time >= $endtime){
+                        break;
+                    }
+                    yield $item;
+                }
+
+                $start = $end;
+            }
+        };
+
+        $mod_refill = Model('refill_order');
+        $checker = function ($log) use ($mod_refill)
+        {
+            $sdate = date('Y-m-d H:i:s',$log['lg_add_time']);
+            Log::record("{$sdate} lgid={$log['lg_id']},type={$log['lg_type']},sn={$log['lg_order_sn']}",Log::DEBUG);
+
+            $logid = intval($log['lg_id']);
+            $lgtype = $log['lg_type'];
+            if (in_array($lgtype, ['bonus_add_money','hand_out_bonus', 'bonus_refund', 'bonus_expire'])) {
+                return [$logid,false];
+            }
+
+            $order_sn = $log['lg_order_sn'];
+            if(empty($order_sn) && strlen($order_sn) < 16) {
+                return [false,false];
+            }
+
+            if (!in_array($lgtype, ['order_pay', 'order_freeze', 'order_cancel'])) {
+                return [false,false];
+            }
+
+            $order = $mod_refill->table('refill_order')->field('*')->where(['order_sn' => $order_sn])->master(true)->find();
+            if(empty($order)) {
+                return [$logid,true];
+            } else {
+                return [false,false];
+            }
+        };
+
+        $pd_log = Model();
+        $delter = function ($logid) use ($pd_log)
+        {
+            if ($logid > 0) {
+                $result = $pd_log->table(self::pdlog_table_name)->where(['lg_id' => $logid])->delete();
+                return $result;
+            } else {
+                return false;
+            }
+        };
+
+        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        if($start_id === 0) {
+            $start_id = $lgid_getter();
+        }
+
+        $cur_time = time();
+        $sdate = date('Y-m-d',time());
+        $filename = BASE_DATA_PATH . "/log/pdlog/{$sdate}-{$cur_time}.csv";
+        $fLog = fopen($filename,'w+');
+
+        $logid = $start_id;
+        $maxid = $maxid_getter();
+
+        $logs = $finder($start_id,$endtime,$maxid);
+        foreach ($logs as $item)
+        {
+            [$logid,$save] = $checker($item);
+            if($logid !== false) {
+                $delter($logid);
+            }
+            if($save) {
+                fputcsv($fLog,$item);
+            }
+        }
+
+        $lgid_writter($logid);
+    }
 }

+ 24 - 0
test/TestTransWrapper.php

@@ -0,0 +1,24 @@
+<?php
+
+
+use PHPUnit\Framework\TestCase;
+
+define('APP_ID', 'test');
+define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
+require_once(BASE_ROOT_PATH . '/global.php');
+require_once(BASE_CORE_PATH . '/lrlz.php');
+require_once(BASE_ROOT_PATH . '/fooder.php');
+
+
+class TestTransWrapper extends TestCase
+{
+    public static function setUpBeforeClass() : void
+    {
+        Base::run_util();
+    }
+
+    public function testRollback()
+    {
+
+    }
+}