Forráskód Böngészése

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

xiaoyu 1 éve
szülő
commit
ddf2582f7c
2 módosított fájl, 15 hozzáadás és 3 törlés
  1. 2 1
      helper/statistics/order_reader.php
  2. 13 2
      test/TestRefund.php

+ 2 - 1
helper/statistics/order_reader.php

@@ -6,7 +6,7 @@ use function PHPUnit\Framework\isNull;
 
 class order_reader
 {
-    public function refill_vr_reader($cond,$order='order_id asc')
+    public function refill_vr_reader($cond,$order='refill_order.order_id asc')
     {
         $result = Model('')->table('refill_order,vr_order')
             ->field('min(refill_order.order_id) as min_oid,max(vr_order.order_id) as max_oid')
@@ -31,6 +31,7 @@ class order_reader
                 ->on('refill_order.order_id=vr_order.order_id')
                 ->where($cond)
                 ->limit(1000)
+                ->order($order)
                 ->select();
 
             if(empty($items)) {

+ 13 - 2
test/TestRefund.php

@@ -241,11 +241,22 @@ class TestRefund extends TestCase
     //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefund::testCheckZY)( .*)?$/" --test-suffix TestRefund.php /var/www/html/test
     public function testCheckZY()
     {
-        $cond['refill_order.order_time'] = [['egt', strtotime('2023-06-04')], ['lt', strtotime('2023-06-06')], 'and'];
-        $cond['vr_order.add_time'] = [['egt', strtotime('2023-06-04')], ['lt', strtotime('2023-06-07')], 'and'];
+        $cond['refill_order.order_time'] = [['egt', strtotime('2023-06-06')], ['lt', strtotime('2023-06-07')], 'and'];
+        $cond['vr_order.add_time'] = [['egt', strtotime('2023-06-06')], ['lt', strtotime('2023-06-08')], 'and'];
         $cond['inner_status'] = 0;
         $cond['vr_order.store_id'] = ['in',[33,45]];
 
         $this->check_order($cond);
     }
+
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefund::testCheckYZ)( .*)?$/" --test-suffix TestRefund.php /var/www/html/test
+    public function testCheckYZ()
+    {
+        $cond['refill_order.order_time'] = [['egt', strtotime('2023-05-01')], ['lt', strtotime('2023-06-01')], 'and'];
+        $cond['vr_order.add_time'] = [['egt', strtotime('2023-05-01')], ['lt', strtotime('2023-06-02')], 'and'];
+        $cond['inner_status'] = 0;
+        $cond['vr_order.store_id'] = ['in',[319,327]];
+
+        $this->check_order($cond);
+    }
 }