Kaynağa Gözat

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

xiaoyu 3 yıl önce
ebeveyn
işleme
4f6b758d47

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

@@ -3305,16 +3305,16 @@ $guantu_phone = ['name' => 'guantu', 'store_id' => 157, 'qualitys' => '1',
             ['goods_id' => 7330, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7330, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
+        300 => [
 //            ['goods_id' => 7331, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7331, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
+        ],
+        500 => [
 //            ['goods_id' => 7332, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7332, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

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

@@ -3305,16 +3305,16 @@ $guantu_phone = ['name' => 'guantu', 'store_id' => 157, 'qualitys' => '1',
             ['goods_id' => 7330, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7330, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
+        300 => [
 //            ['goods_id' => 7331, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7331, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
+        ],
+        500 => [
 //            ['goods_id' => 7332, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7332, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

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

@@ -3305,16 +3305,16 @@ $guantu_phone = ['name' => 'guantu', 'store_id' => 157, 'qualitys' => '1',
             ['goods_id' => 7330, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7330, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
+        300 => [
 //            ['goods_id' => 7331, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7331, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7331, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ],
-//        500 => [
+        ],
+        500 => [
 //            ['goods_id' => 7332, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7332, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7332, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-//        ]
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 2 - 0
helper/refill/api/xyz/guantu/config.php

@@ -25,6 +25,8 @@ class config
             50  => 100010,
             100 => 100011,
             200 => 100012,
+            300 => 100096,
+            500 => 100097
         ],
         mtopcard\ChinaTelecomCard => [
             30  => 100013,

+ 16 - 111
test/TestRefillClear.php

@@ -27,116 +27,6 @@ class TestRefillClear extends TestCase
     }
     //2021年,8、9、10、11
 
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember1)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember1()
-    {
-        $start_date = strtotime('2021-12-01');
-        $end_date   = strtotime('2021-12-02');
-        $this->clear($start_date,$end_date,1833109);//FL732551744393963
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember12)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember2()
-    {
-        $start_date = strtotime('2021-12-02');
-        $end_date   = strtotime('2021-12-03');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember23)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember3()
-    {
-        $start_date = strtotime('2021-12-03');
-        $end_date   = strtotime('2021-12-04');
-        $this->clear($start_date,$end_date,1932237);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember24)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember4()
-    {
-        $start_date = strtotime('2021-12-04');
-        $end_date   = strtotime('2021-12-05');
-        $this->clear($start_date,$end_date,145358);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember3)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember6()
-    {
-        $start_date = strtotime('2021-12-06');
-        $end_date   = strtotime('2021-12-07');
-        $this->clear($start_date,$end_date,1051542);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember7)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember7()
-    {
-        $start_date = strtotime('2021-12-07');
-        $end_date   = strtotime('2021-12-08');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember8)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember8()
-    {
-        $start_date = strtotime('2021-12-08');
-        $end_date   = strtotime('2021-12-09');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember9)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember9()
-    {
-        $start_date = strtotime('2021-12-09');
-        $end_date   = strtotime('2021-12-10');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember10)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember10()
-    {
-        $start_date = strtotime('2021-12-10');
-        $end_date   = strtotime('2021-12-11');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember11)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember11()
-    {
-        $start_date = strtotime('2021-12-11');
-        $end_date   = strtotime('2021-12-12');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember12)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember12()
-    {
-        $start_date = strtotime('2021-12-12');
-        $end_date   = strtotime('2021-12-14');
-        $this->clear($start_date,$end_date);
-    }
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember14)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember14()
-    {
-        $start_date = strtotime('2021-12-14');
-        $end_date   = strtotime('2021-12-15');
-        $this->clear($start_date,$end_date);
-    }
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember15)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember15()
-    {
-        $start_date = strtotime('2021-12-15');
-        $end_date   = strtotime('2021-12-16');
-        $this->clear($start_date,$end_date);
-    }
-
-    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember16)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
-    public function testDecember16()
-    {
-        $start_date = strtotime('2021-12-16');
-        $end_date   = strtotime('2021-12-20');
-        $this->clear($start_date,$end_date);
-    }
-
     //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testDecember20)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
     public function testDecember20()
     {
@@ -145,6 +35,14 @@ class TestRefillClear extends TestCase
         $this->clear($start_date,$end_date);
     }
 
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::test202201)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function test202201()
+    {
+        $start_date = strtotime('2022-01-10');
+        $end_date   = strtotime('2022-01-16');
+        $this->clear($start_date,$end_date);
+    }
+
     public function testAllRecords()
     {
         $rorder_getter = function ($mchid,$mch_order,$mod_refill)
@@ -475,7 +373,8 @@ class TestRefillClear extends TestCase
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     /// 以下代码为清除pdlog
-    const pdlog_table_name = 'pd_log_bak';
+//    const pdlog_table_name = 'pd_log_bak';
+    const pdlog_table_name = 'pd_log';
     //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()
     {
@@ -506,6 +405,12 @@ class TestRefillClear extends TestCase
         $this->delete_log(1079138574,strtotime('2021-12-20'));
     }
 
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testLogDec29)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
+    public function testLogDec29()
+    {
+        $this->delete_log(2147483648,strtotime('2022-01-01'));
+    }
+
     private function delete_log($start_id,$endtime)
     {
         //需要的函数