xiaoyu 3 年之前
父節點
當前提交
61c2fce969
共有 2 個文件被更改,包括 266 次插入268 次删除
  1. 3 8
      admin/control/refill_order_manual.php
  2. 263 260
      test/TestRelationHelper.php

+ 3 - 8
admin/control/refill_order_manual.php

@@ -185,10 +185,7 @@ class refill_order_manualControl extends SystemControl
         }
         elseif(in_array($oper_type, ['success', 'cancel', 'buyback']))
         {
-            $res = $this->manual_record($orders, $oper_type, $order_ids, $_GET['bz']);
-            if($res == false) {
-                showMessage('操作失败');
-            }
+            $this->manual_record($orders, $oper_type, $order_ids, $_GET['bz']);
         }
         else
         {
@@ -231,7 +228,6 @@ class refill_order_manualControl extends SystemControl
 
         $buyback_ids = $buyback_ids($order_ids, $oper_type);
 
-        $resp = true;
         $cur_time = time();
         $mod_buyback = Model('refill_buyback');
 
@@ -296,6 +292,7 @@ class refill_order_manualControl extends SystemControl
             {
                 $order_id = intval($order['order_id']);
 
+                if (algorithm::binary_search($buyback_ids, $order_id)) continue;
                 if (algorithm::binary_search($fetch_order_ids, $order_id)) continue;
 
                 if ($oper_type == 'success') {
@@ -315,11 +312,9 @@ class refill_order_manualControl extends SystemControl
             }
         }
 
-        if($resp && !empty($ins)) {
+        if(!empty($ins)) {
             $mod_buyback->insertAll($ins);
         }
-
-        return $resp;
     }
 
     public function set_cancel_orderOp()

File diff suppressed because it is too large
+ 263 - 260
test/TestRelationHelper.php