Merge branch 'feature/promote_company_merge' of wmtx/platform into release

修改
master
廖金灵 4 years ago committed by Gogs
commit 6a78824b10

@ -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' => '操作成功'

@ -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();

Loading…
Cancel
Save