Browse Source

退款状态变更调整

zhangxiaobin 1 year ago
parent
commit
e5fb053a75

+ 3 - 2
application/admin/controller/RecharOrder.php

@@ -108,6 +108,7 @@ class RecharOrder extends Backend
             //更新退款金额
             $data = [
                 'refund_money' => $row['money'],//退款金额
+                'status' => 2,//订单状态:-1=支付超时,0=支付中,1=支付成功,2=退款
             ];
             $where['id'] = $ids;
             $res = $this->model->update($data,$where);
@@ -131,8 +132,8 @@ class RecharOrder extends Backend
                 'refund_price' => $row['money'],
                 'remark' => '充值退款',
             ];
-            $refundParams['order']['pay_fee'] = 0.01;
-            $refundParams['refund_price'] = 0.01;
+            /*$refundParams['order']['pay_fee'] = 0.01;
+            $refundParams['refund_price'] = 0.01;*/
             $refundRes = $this->model->old_refund($refundParams);
             if ($refundRes['status'] == 0) {
                 throw new Exception($refundRes['msg']);

+ 2 - 2
application/admin/controller/Withdraw.php

@@ -123,7 +123,7 @@ class Withdraw extends Backend
                 } elseif ($params['status'] == 'successed') {
                     $remark = '提现'.$row['money'].'通过';
                     //通过提现到用户账户
-                    /*if (isset($params['type']) && $params['type'] == 'alipay') {
+                    if (isset($params['type']) && $params['type'] == 'alipay') {
                         $moneyService = new MoneyService();
                         $withdrawParams = [
                             'money' => $params['real_money'],
@@ -134,7 +134,7 @@ class Withdraw extends Backend
                         if (!$withdrawRes['status']) {
                             throw new Exception($withdrawRes['msg']);
                         }
-                    }*/
+                    }
                 }
                 if (!empty($remark)) {
                     //审核结果消息通知