正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
@@ -96,7 +96,8 @@ class WithdrawalController extends AdminBaseController{ | @@ -96,7 +96,8 @@ class WithdrawalController extends AdminBaseController{ | ||
96 | public function withd_refuse(){ | 96 | public function withd_refuse(){ |
97 | 97 | ||
98 | $id = $_POST['id']; | 98 | $id = $_POST['id']; |
99 | - $data = Db::name('money_expend') -> where("id",$id) -> update(['state'=>2]); | 99 | + $create_time = time(); |
100 | + $data = Db::name('money_expend') -> where("id",$id) -> update(['state'=>2,'create_time'=>$create_time]); | ||
100 | if($data){ | 101 | if($data){ |
101 | return true; | 102 | return true; |
102 | }else{ | 103 | }else{ |
@@ -114,9 +115,12 @@ class WithdrawalController extends AdminBaseController{ | @@ -114,9 +115,12 @@ class WithdrawalController extends AdminBaseController{ | ||
114 | $third_party = Db::name('third_party_user') -> where('user_id',$money_expend['uid']) -> find(); | 115 | $third_party = Db::name('third_party_user') -> where('user_id',$money_expend['uid']) -> find(); |
115 | $result = $this -> merchantPay($third_party['openid'],'',$money_expend['money'],'企业付款'); | 116 | $result = $this -> merchantPay($third_party['openid'],'',$money_expend['money'],'企业付款'); |
116 | if($result['result_code'] == 'SUCCESS'){ | 117 | if($result['result_code'] == 'SUCCESS'){ |
117 | - | 118 | + $create_time = time(); |
119 | + Db::name('money_expend') -> where('id',$_POST['id']) -> update(['state'=>1,'create_time'=>$create_time]); | ||
120 | + Db::name('my_user') -> where('uid',$money_expend['uid']) -> setDec('balance',$money_expend['money']); | ||
121 | + return true; | ||
118 | }else{ | 122 | }else{ |
119 | - | 123 | + return false; |
120 | } | 124 | } |
121 | 125 | ||
122 | } | 126 | } |
-
请 注册 或 登录 后发表评论