diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index 4fc4d139d..3f071caaa 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -332,9 +332,10 @@ class PresidentDepositController extends ThinkController public function payConfirm() { $ids = I('ids', []); + $acceptTime = I('accept_time', date('Y-m-d')); try { $service = new PresidentDepositService(); - $service->batchPayConfirm($ids); + $service->batchPayConfirm($ids, $acceptTime); $this->ajaxReturn([ 'status' => 1, 'message' => '操作成功' diff --git a/Application/Base/Service/PresidentDepositService.class.php b/Application/Base/Service/PresidentDepositService.class.php index f31fdbe9a..9c29a7fdc 100644 --- a/Application/Base/Service/PresidentDepositService.class.php +++ b/Application/Base/Service/PresidentDepositService.class.php @@ -118,6 +118,7 @@ class PresidentDepositService private function update($params, $company, $record) { + $payType = $params['pay_type'] ?? 0; $payAcceptTime = $params['pay_accept_time'] == '' ? 0 : strtotime($params['pay_accept_time']); $refundTime = $params['refund_time'] == '' ? 0 : strtotime($params['pay_accept_time']); @@ -132,6 +133,7 @@ class PresidentDepositService $data['refund_time'] = $refundTime; } + $data['pay_way'] = $params['pay_type'] == 2 ? 4 : $params['pay_way']; $data['pay_type'] = $params['pay_type']; $data['pay_account'] = $params['pay_account']; @@ -139,7 +141,6 @@ class PresidentDepositService $data['payer'] = $params['payer']; $data['status'] = $status ?? $record['status']; $data['update_time'] = time(); - M('president_deposit', 'tab_')->where(['id' => $record['id']])->save($data); } @@ -207,7 +208,7 @@ class PresidentDepositService } } - public function batchPayConfirm(array $companyIds) + public function batchPayConfirm(array $companyIds, $acceptTime) { if (isMarketAdmin()) { throw new \Exception('无法操作记录'); @@ -231,7 +232,7 @@ class PresidentDepositService 'status' => 1, 'pay_confirm_time' => time(), 'update_time' => time(), - 'pay_accept_time' => strtotime(I('accept_time')) + 'pay_accept_time' => strtotime($acceptTime) ]); $companies = M('promote_company', 'tab_')->field(['company_name', 'id'])->where(['id' => ['in', $companyIds]])->select();