diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index 4a5472841..0558c03c7 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -24,6 +24,15 @@ class WithdrawController extends BaseController $row=10; if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } + + $map = []; $map["promote.id"] = get_pid(); @@ -90,7 +99,12 @@ class WithdrawController extends BaseController public function doPayment() { - + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } $id = $_REQUEST['id']; $remark = $_REQUEST['remark']; @@ -101,12 +115,13 @@ class WithdrawController extends BaseController $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find(); // $this->ajaxReturn(["msg"=>"打款成功","data"=>$dbres,"status"=>1]);die(); $company_info = json_decode($dbres['company_info'],true); - //TODO:未进行真实打款 + if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){ //执行打款 $title = "测试-".$dbres['company_name']."结算"; $amount = $dbres['statement_money']; -// $amount = 0.1;//测试金额为0 + //TODO:线上要关闭这个 + $amount = 0.1;//测试金额为0 $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); $resultCode = $payres->code; @@ -167,6 +182,13 @@ class WithdrawController extends BaseController public function withdrawDetail() { + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } + $id = $_REQUEST["id"]; $dbres = M("company_statement_info","tab_") @@ -222,6 +244,13 @@ class WithdrawController extends BaseController public function withdrawOrderDetail($p=0) { + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } + $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 $row=10;