lip 3 часов назад
Родитель
Сommit
b7860234b9

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

@@ -34,7 +34,7 @@ class PaymentOrder extends Controller
             PaymentOrderModel::whereIn('id', $params['ids'])
                 ->where('payment_type', $params['payment_type'])
                 ->where('status', 0)
-                ->update(['pay_data' => $params['pay_data'], 'status' => 1]);
+                ->update(['pay_data' => $params['pay_data'], 'status' => 4, 'is_send' => 0]);
 
             DB::commit();
         } catch (ValidationException $e) {
@@ -60,7 +60,7 @@ class PaymentOrder extends Controller
             $remark = $params['remark'] ?? '';
             $info = PaymentOrderModel::find($params['id']);
             if (!$info) throw new Exception('数据不存在', HttpStatus::CUSTOM_ERROR);
-            if ($info->status != 4) throw new Exception('用户未提交充值凭证', HttpStatus::CUSTOM_ERROR);
+            if ($info->status != 5) throw new Exception('用户未提交充值凭证', HttpStatus::CUSTOM_ERROR);
             if ($info->payment_type == 0) throw new Exception('当前订单非人工充值,无法操作', HttpStatus::CUSTOM_ERROR);
             if ($params['status'] == 3) {
                 if (empty($remark)) {
@@ -74,7 +74,6 @@ class PaymentOrder extends Controller
                 $info->status = $params['status'];
                 $info->remark = $remark;
                 $info->state = 1;
-                $info->is_send = 0;//标记发送通知
                 $info->save();
 
                 $memberId = $info->member_id;

+ 2 - 2
app/Http/Controllers/api/Wallet.php

@@ -193,11 +193,11 @@ class Wallet extends BaseController
             if (!$info) {
                 return $this->error(lang('找不到此记录'));
             }
-            if ($info->status != PaymentOrderService::STATUS_PROCESS) {
+            if ($info->status != PaymentOrderService::STATUS_USER) {
                 return $this->error(lang('待处理中,请稍后'));
             }
             $info->image = $params['image'];
-            $info->status = PaymentOrderService::STATUS_USER;
+            $info->status = PaymentOrderService::STATUS_AUDIT;
             $info->save();
             return $this->success($info,'提交成功,请等待人工审核');
         } catch (ValidationException $e) {

+ 1 - 0
app/Services/PaymentOrderService.php

@@ -25,6 +25,7 @@ class PaymentOrderService extends BaseService
     const STATUS_SUCCESS = 2; // 成功
     const STATUS_FAIL = 3; // 失败
     const STATUS_USER = 4; // 待用户提交凭证
+    const STATUS_AUDIT = 5; //待人工审核
 
     public static string $MODEL = PaymentOrder::class;