|
@@ -365,16 +365,20 @@ class WithdrawController extends BaseController
|
|
|
public function actionRevokegold(){
|
|
public function actionRevokegold(){
|
|
|
$id = (int) Yii::$app->request->post('id');
|
|
$id = (int) Yii::$app->request->post('id');
|
|
|
$mt4_id = (int) Yii::$app->request->post('mt4_id');
|
|
$mt4_id = (int) Yii::$app->request->post('mt4_id');
|
|
|
- $res = Withdraw::updateAll(['mt4_status' => 0,'type' => 1], "id = $id"); //更新出金表的状态(不通过,未扣减)
|
|
|
|
|
|
|
+ $res = Withdraw::updateAll(['type' => 1], "id = $id"); //更新出金表的状态(不通过,未扣减)
|
|
|
|
|
|
|
|
if($res){
|
|
if($res){
|
|
|
-
|
|
|
|
|
//调用mt4的撤销出金接口
|
|
//调用mt4的撤销出金接口
|
|
|
$api = new Mt4ManagerApi();
|
|
$api = new Mt4ManagerApi();
|
|
|
$result = $api->revokeOrder($mt4_id);
|
|
$result = $api->revokeOrder($mt4_id);
|
|
|
$result = json_decode($result,true);
|
|
$result = json_decode($result,true);
|
|
|
|
|
+ $tt = print_r($result,true); //获取数据
|
|
|
|
|
+ file_put_contents('mt4_withdraw.txt',$tt); //打印数据
|
|
|
if(!$result['ret']){
|
|
if(!$result['ret']){
|
|
|
- return $this->outJson(1, [], '操作成功');
|
|
|
|
|
|
|
+ $res1 = Withdraw::updateAll(['mt4_status' => 0], "id = $id"); //更新出金表的状态(mt4未扣减)
|
|
|
|
|
+ if($res1){
|
|
|
|
|
+ return $this->outJson(1, [], '操作成功');
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
return $this->outJson(0, [], 'mt4操作失败');
|
|
return $this->outJson(0, [], 'mt4操作失败');
|
|
|
}
|
|
}
|