stanley-king 1 год назад
Родитель
Сommit
65b5c49a43
3 измененных файлов с 11 добавлено и 4 удалено
  1. 2 2
      data/model/card_info.model.php
  2. 6 0
      test/TestCardNo.php
  3. 3 2
      test/TestRefund.php

+ 2 - 2
data/model/card_info.model.php

@@ -104,7 +104,7 @@ class card_infoModel extends Model
         }
         else {
             $data['update_time'] = time();
-            $item['update_times'] = $item['update_times'] + 1;
+            $data['update_times'] = $item['update_times'] + 1;
 
             $data['orgin_type'] = $org_type;
             $data['card_type'] = $card_type;
@@ -112,7 +112,7 @@ class card_infoModel extends Model
             $data['transfer'] = $transfer;
             $data['card_state'] = $status;
 
-            return $this->where(['card_no' => $card_no])->update($item);
+            return $this->where(['card_no' => $card_no])->update($data);
         }
     }
 

+ 6 - 0
test/TestCardNo.php

@@ -34,6 +34,12 @@ class TestCardNo extends TestCase
         $x = $none_supporter('13911129866');
     }
 
+    public function testYzValidate()
+    {
+        
+
+    }
+
     public function testValidPhone()
     {
         $phones = ['18163987390','18918378542','18175821272','17717221667','15338020320','18017765111','13370247789',

+ 3 - 2
test/TestRefund.php

@@ -241,9 +241,10 @@ 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-06')], ['lt', strtotime('2023-06-07')], 'and'];
-        $cond['vr_order.add_time'] = [['egt', strtotime('2023-06-06')], ['lt', strtotime('2023-06-08')], 'and'];
+        $cond['refill_order.order_time'] = [['egt', strtotime('2023-06-07')], ['lt', strtotime('2023-06-09')], 'and'];
+        $cond['vr_order.add_time'] = [['egt', strtotime('2023-06-07')], ['lt', strtotime('2023-06-09')], 'and'];
         $cond['inner_status'] = 0;
+        $cond['vr_order.order_state'] = 0;
         $cond['vr_order.store_id'] = ['in',[33,45]];
 
         $this->check_order($cond);