瀏覽代碼

add to local

stanley-king 4 年之前
父節點
當前提交
2326185835
共有 1 個文件被更改,包括 17 次插入13 次删除
  1. 17 13
      test/TestMemberCard.php

+ 17 - 13
test/TestMemberCard.php

@@ -41,6 +41,8 @@ class TestMemberCard extends TestCase
         $member_topcard = Model('member_topcard');
 
         $i = 0;
+
+        $index = 0;
         while (true)
         {
             $start = $i * 1000;
@@ -63,19 +65,21 @@ class TestMemberCard extends TestCase
                 $card_no   = $extra_info['input']['card_no'];
                 $card_type = mtopcard\topcard_type($extra_info['input']['card_type']);
 
-                if(empty($card_no)) continue;
-
-                if(empty($topcard->get_card($card_no))) {
-                    $topcard->add($card_no,$card_type,$add_time);
-                }
-
-                if(in_array($order_state,[ORDER_STATE_PAY, ORDER_STATE_SEND, ORDER_STATE_SUCCESS]) && $amount > 0)
-                {
-                    $ret = $topcard->add_money($card_no,$amount,$payment_time);
-                    if(!$ret) {
-                        Log::record("{$card_no} add money fail.",Log::DEBUG);
-                    }
-                }
+                Log::record("{$index} {$card_no} {$card_type}");
+
+//                if(empty($card_no)) continue;
+//
+//                if(empty($topcard->get_card($card_no))) {
+//                    $topcard->add($card_no,$card_type,$add_time);
+//                }
+//
+//                if(in_array($order_state,[ORDER_STATE_PAY, ORDER_STATE_SEND, ORDER_STATE_SUCCESS]) && $amount > 0)
+//                {
+//                    $ret = $topcard->add_money($card_no,$amount,$payment_time);
+//                    if(!$ret) {
+//                        Log::record("{$card_no} add money fail.",Log::DEBUG);
+//                    }
+//                }
             }
         }
     }