From 52b11689305b30d11afad8164202b07244e52dd4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 14:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExcelPaymentController.class.php | 16 ++++++++++++++-- Data/update.sql | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 42461ce48..8aa80bc75 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -145,6 +145,13 @@ class ExcelPaymentController extends BaseController $v['company_type'] = 2; $v['create_time'] = time(); $v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5); + $dm = [ + "mobile"=>$this->admininfo['mobile'], + "real_name"=>$this->admininfo['real_name'], + "time"=>date("Y-m-d H:i:s") + ]; + $v['document_maker'] = json_encode($dm,JSON_UNESCAPED_UNICODE); + if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){ M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete(); $this->ajaxReturn(["status"=>0,"msg"=>"支付宝真实姓名及登陆账号不允许为空"]); @@ -312,11 +319,10 @@ class ExcelPaymentController extends BaseController //执行打款 $title = $remark; $amount = $dbres['statement_money']; - $amount = 0.1; + $amount = 0.1; //测试金额必须去除 $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; @@ -329,6 +335,12 @@ class ExcelPaymentController extends BaseController $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); $this->ajaxReturn(["success"=>"打款成功","data"=>[]]); diff --git a/Data/update.sql b/Data/update.sql index f720e6b2a..6bb4dde8e 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2092,11 +2092,12 @@ CREATE TABLE `tab_excel_statement_info` ( `statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间', `statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号', `statement_info` text NOT NULL COMMENT '订单相关信息json', - `pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功', `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间', `pay_info` text COMMENT '打款信息', + `document_maker` varchar(255) DEFAULT '' COMMENT '制单信息', + `payment_user` varchar(255) DEFAULT '' COMMENT '打款基础信息', `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`), KEY `batch_num` (`batch_num`) USING BTREE,