...
|
...
|
@@ -96,7 +96,8 @@ class WithdrawalController extends AdminBaseController{ |
|
|
public function withd_refuse(){
|
|
|
|
|
|
$id = $_POST['id'];
|
|
|
$data = Db::name('money_expend') -> where("id",$id) -> update(['state'=>2]);
|
|
|
$create_time = time();
|
|
|
$data = Db::name('money_expend') -> where("id",$id) -> update(['state'=>2,'create_time'=>$create_time]);
|
|
|
if($data){
|
|
|
return true;
|
|
|
}else{
|
...
|
...
|
@@ -114,9 +115,12 @@ class WithdrawalController extends AdminBaseController{ |
|
|
$third_party = Db::name('third_party_user') -> where('user_id',$money_expend['uid']) -> find();
|
|
|
$result = $this -> merchantPay($third_party['openid'],'',$money_expend['money'],'企业付款');
|
|
|
if($result['result_code'] == 'SUCCESS'){
|
|
|
|
|
|
$create_time = time();
|
|
|
Db::name('money_expend') -> where('id',$_POST['id']) -> update(['state'=>1,'create_time'=>$create_time]);
|
|
|
Db::name('my_user') -> where('uid',$money_expend['uid']) -> setDec('balance',$money_expend['money']);
|
|
|
return true;
|
|
|
}else{
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|