12月功能提交

master
zhengyongxing 4 years ago
parent 8bb8e4379f
commit 0e416af776

@ -365,9 +365,9 @@ class ExcelPaymentController extends BaseController
{
$mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify'];
// if (!A("Public")->checksafecode($mobile, $verify)) {
// $this->ajaxReturn(["error"=>"验证码错误"]);
// }
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
}
//执行打款
@ -388,29 +388,29 @@ class ExcelPaymentController extends BaseController
//执行打款
$title = $remark;
$amount = $dbres['statement_money'];
// $payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
// $resultCode = $payres->code;
//
// $savedata = ["id"=>$dbres['id']];
$payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
$resultCode = $payres->code;
$savedata = ["id"=>$dbres['id']];
if (!empty($resultCode)&&$resultCode == 10000) {
$savedata["pay_status"]=1;
} else {
$savedata["pay_status"]=-1;
}
//
// $payres = json_decode(json_encode($payres), true);
// $payres["remark"] = $remark;
//
// $savedata["pay_info"] = json_encode($payres, JSON_UNESCAPED_UNICODE);
// $savedata["pay_time"]=time();
// $pu = [
// "mobile"=>$this->admininfo['mobile'],
// "real_name"=>$this->admininfo['real_name'],
// "time"=>date("Y-m-d H:i:s")
// ];
// $savedata['payment_user'] = json_encode($pu, JSON_UNESCAPED_UNICODE);
$payres = json_decode(json_encode($payres), true);
$payres["remark"] = $remark;
$savedata["pay_info"] = json_encode($payres, JSON_UNESCAPED_UNICODE);
$savedata["pay_time"]=time();
$pu = [
"mobile"=>$this->admininfo['mobile'],
"real_name"=>$this->admininfo['real_name'],
"time"=>date("Y-m-d H:i:s")
];
$savedata['payment_user'] = json_encode($pu, JSON_UNESCAPED_UNICODE);
}
// M("ExcelStatementInfo", "tab_")->save($savedata);
M("ExcelStatementInfo", "tab_")->save($savedata);
if ($savedata['pay_status'] == 1) {
$this->ajaxReturn(["success"=>"打款成功","data"=>['status'=>1]]);
@ -502,12 +502,12 @@ class ExcelPaymentController extends BaseController
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
// 'id'=>['neq',$value['id']],
'id'=>['neq',$value['id']],
'pay_status'=>1
])
->select();
$check_company_statement_info = M("pay_statement_info","tab_")
$check_company_statement_info = M("company_statement_info","tab_")
->where([
'pay_status'=>1,
'company_name'=>$value['company_name'],

@ -884,9 +884,9 @@ class PaymentController extends BaseController
{
$mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify'];
// if (!A("Public")->checksafecode($mobile, $verify)) {
// $this->ajaxReturn(["error"=>"验证码错误"]);
// }
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
}
//执行打款
@ -895,11 +895,11 @@ class PaymentController extends BaseController
$id = $_REQUEST['id'];
$remark = $_REQUEST['remark'];
// if(empty(C("ALI_PAYMENT"))){
// $this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>["status"=>0]]);
// }
// Vendor("Alipay2020/Fund");
// $fund = new \Fund(C("ALI_PAYMENT"));
if(empty(C("ALI_PAYMENT"))){
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>["status"=>0]]);
}
Vendor("Alipay2020/Fund");
$fund = new \Fund(C("ALI_PAYMENT"));
$dbres = M("pay_statement_info", "tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'], true);
@ -907,13 +907,13 @@ class PaymentController extends BaseController
//执行打款
$title = "信息服务费";
$amount = $dbres['statement_money'];
// $payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
// $resultCode = $payres->code;
$payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
$resultCode = $payres->code;
$savedata = ["id"=>$dbres['id']];
if (!empty($resultCode)&&$resultCode == 10000) {
$savedata["pay_status"]=1;
} else {
$savedata["pay_status"]=1;
$savedata["pay_status"]=-1;
}
$payres = json_decode(json_encode($payres), true);
$payres["remark"] = $remark;
@ -923,7 +923,6 @@ class PaymentController extends BaseController
$savedata["pay_time"]=time();
}
M("pay_statement_info","tab_")->save($savedata);
if ($savedata["pay_status"] == -1) {
@ -1052,12 +1051,11 @@ class PaymentController extends BaseController
$ids = $_REQUEST['ids'];
$data = M("pay_statement_info","tab_")
$data = M("company_statement_info","tab_")
->field("id,statement_money,company_name,statement_begin_time,statement_end_time,pay_time")
->where(['id'=>['in',$ids]])
->where(['id'=>['in',implode(',',$ids)]])
->select();
// dump($data);die();
$return = [];
foreach ($data as $key => $value) {
@ -1073,13 +1071,14 @@ class PaymentController extends BaseController
])
->select();
$check_company_statement_info = M("pay_statement_info","tab_")
$check_company_statement_info = M("company_statement_info","tab_")
->where([
'pay_status'=>1,
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
'statement_money'=>$value['statement_money'],
'id'=>['neq',$value['id']],
])
->select();

@ -566,7 +566,7 @@
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
return $(elem).data("verify_id");
}
}).get();

Loading…
Cancel
Save