Ken 5 dni temu
rodzic
commit
2c79969120
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      app/Http/Controllers/admin/PaymentOrder.php

+ 1 - 2
app/Http/Controllers/admin/PaymentOrder.php

@@ -34,13 +34,12 @@ class PaymentOrder extends Controller
             foreach ($params['ids'] as $id) {
                 if ($params['status'] == 1) {
                     $ret = PaymentOrderService::createPayout($id);
-                    if ($ret['code'] === 0) $count++;
                     if ($ret['code'] !== 0) throw new Exception($ret['msg'], HttpStatus::CUSTOM_ERROR);
                 } else {
                     $ret = PaymentOrderService::withdrawalFailed($id, $remark);
-                    if ($ret['code'] === 0) $count++;
                     if ($ret['code'] !== 0) throw new Exception($ret['msg'], HttpStatus::CUSTOM_ERROR);
                 }
+                $count++;
             }
             if ($count < 1) throw new Exception('操作失败', HttpStatus::CUSTOM_ERROR);
             DB::commit();