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