正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -92,7 +92,7 @@ class UsersController extends HomeBaseController{ | @@ -92,7 +92,7 @@ class UsersController extends HomeBaseController{ | ||
92 | */ | 92 | */ |
93 | public function payDeposit(){ | 93 | public function payDeposit(){ |
94 | $users_id=$this->request->param('users_id'); | 94 | $users_id=$this->request->param('users_id'); |
95 | - $users=Db::name('users')->where('users_id',$users_id)->find(); | 95 | + $users=Db::name('users')->where('id',$users_id)->find(); |
96 | $openId=$users['open_id']; | 96 | $openId=$users['open_id']; |
97 | $order_no = cmf_get_order_sn(); | 97 | $order_no = cmf_get_order_sn(); |
98 | $body="押金-支付"; | 98 | $body="押金-支付"; |
@@ -102,7 +102,7 @@ class UsersController extends HomeBaseController{ | @@ -102,7 +102,7 @@ class UsersController extends HomeBaseController{ | ||
102 | $data=$wxPay->pay(); | 102 | $data=$wxPay->pay(); |
103 | if (isset($data['package'])){ | 103 | if (isset($data['package'])){ |
104 | try{ | 104 | try{ |
105 | - Db::name('users')->where(['users_id'=>$users_id])->update(['deposit_order_no'=>$order_no]); | 105 | + Db::name('users')->where(['id'=>$users_id])->update(['deposit_order_no'=>$order_no]); |
106 | }catch (\Exception $exception){ | 106 | }catch (\Exception $exception){ |
107 | 107 | ||
108 | } | 108 | } |
@@ -155,12 +155,12 @@ class UsersController extends HomeBaseController{ | @@ -155,12 +155,12 @@ class UsersController extends HomeBaseController{ | ||
155 | */ | 155 | */ |
156 | public function refundDeposit(){ | 156 | public function refundDeposit(){ |
157 | $users_id=$this->request->param('users_id'); | 157 | $users_id=$this->request->param('users_id'); |
158 | - $users=Db::name('users')->where('users_id',$users_id)->find(); | 158 | + $users=Db::name('users')->where('id',$users_id)->find(); |
159 | $orderNo=$users['deposit_order_no'];//需要退款的订单 | 159 | $orderNo=$users['deposit_order_no'];//需要退款的订单 |
160 | $price=$users['deposit']; | 160 | $price=$users['deposit']; |
161 | Db::startTrans(); | 161 | Db::startTrans(); |
162 | try{ | 162 | try{ |
163 | - Db::name('users')->where('users_id',$users_id)->update(['is_deposit'=>0,'deposit'=>null,'deposit_order_no'=>null]); | 163 | + Db::name('users')->where('id',$users_id)->update(['is_deposit'=>0,'deposit'=>null,'deposit_order_no'=>null]); |
164 | }catch (\Exception $exception){ | 164 | }catch (\Exception $exception){ |
165 | $this->apiResponse(301,'数据库修改失败'); | 165 | $this->apiResponse(301,'数据库修改失败'); |
166 | } | 166 | } |
-
请 注册 或 登录 后发表评论