From a2fdc7c467e96945e7e758acf40c0ea629e80322 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 17 Jun 2020 16:52:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E6=AC=BE=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PaymentController.class.php | 21 ++++++++++++++++--- .../Payment/View/Payment/showPayment.html | 2 +- Data/update.sql | 1 + ThinkPHP/Library/Vendor/Alipay2020/Fund.php | 13 ++++++------ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index 1b932f549..201c60d2e 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -424,8 +424,23 @@ class PaymentController extends BaseController { $id = $_REQUEST['id']; $remark = $_REQUEST['remark']; - + Vendor("Alipay2020/Fund"); + $fund = new \Fund(); + + // + $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find(); + $dbres['company_info'] = json_decode($v['company_info'],true); + + if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){ + //执行打款 + // $payres = json_decode( json_encode( $object),true); + $payres["remark"] = $remark; + $dbres["payinfo"] = json_encode($payres,JSON_UNESCAPED_UNICODE); + $dbres["pay_status"]=1; + $dbres["pay_type"]=2; + } + M("company_statement_info","tab_")->save($dbres); $this->ajaxReturn(["success"=>"打款成功","data"=>[]]); # code... } @@ -441,10 +456,10 @@ class PaymentController extends BaseController $f = $CompanyInfo->where("pool_id = {$v} AND pay_status <> 1")->find(); if(empty($f)){ //全部完成 - $this->setOneVerifyStatus(3,"payment",$v); + $this->setOneVerifyStatus(4,"payment",$v); }else{ //打款中 - $this->setOneVerifyStatus(4,"payment",$v); + $this->setOneVerifyStatus(3,"payment",$v); } } } diff --git a/Application/Payment/View/Payment/showPayment.html b/Application/Payment/View/Payment/showPayment.html index 46602a798..1ec0caf14 100644 --- a/Application/Payment/View/Payment/showPayment.html +++ b/Application/Payment/View/Payment/showPayment.html @@ -121,7 +121,7 @@ {$vo.statement_num} {$vo.statement_money} {$vo.remark} - + diff --git a/Data/update.sql b/Data/update.sql index 77aa6438c..857dc1064 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1951,6 +1951,7 @@ CREATE TABLE `tab_company_statement_info` ( `pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功', `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间', `pay_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款类型 1提现 2线上打款 3线下打款', + `pay_info` text NOT NULL DEFAULT '' COMMENT '打款信息', `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '备注', PRIMARY KEY (`id`), diff --git a/ThinkPHP/Library/Vendor/Alipay2020/Fund.php b/ThinkPHP/Library/Vendor/Alipay2020/Fund.php index 6870ecc0c..b05394542 100644 --- a/ThinkPHP/Library/Vendor/Alipay2020/Fund.php +++ b/ThinkPHP/Library/Vendor/Alipay2020/Fund.php @@ -55,12 +55,13 @@ class Fund { $request->setBizContent(json_encode($arrData,JSON_UNESCAPED_UNICODE)); $result = $aop->execute($request); $responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response"; - $resultCode = $result->$responseNode->code; - if(!empty($resultCode)&&$resultCode == 10000){ - return 0; - } else { - return -1; - } + return $result->$responseNode; + // $resultCode = $result->$responseNode->code; + // if(!empty($resultCode)&&$resultCode == 10000){ + // return 0; + // } else { + // return -1; + // } }