更新交易申请

This commit is contained in:
yaooo 2023-09-19 14:20:08 +08:00
parent f83565c5ed
commit d81746421f

View File

@ -107,7 +107,7 @@ class MerchantIntention extends BaseController
return app('json')->fail('未开启商户入驻');
}
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
$merInfo = Db::name('merchant')->where('uid', $this->userInfo->uid)->where('status', 1)->find();
$merInfo = Db::name('merchant')->where('uid', $this->userInfo->uid)->where('status', 1)->find();
if (!empty($merInfo['business_status']) && ($merInfo['business_status']==2)) {
return app('json')->fail('商户交易申请已通过');
}
@ -115,9 +115,8 @@ class MerchantIntention extends BaseController
if (empty($intenInfo)) {
return app('json')->fail('商户状态异常');
}
$intenInfoArray = $intenInfo->toArray();
$intenInfoArray['type'] = 2;
$intentionId = Db::name('merchant_intention')->insertGetId($intenInfoArray);
$intenInfo['type'] = 2;
$intentionId = Db::name('merchant_intention')->insertGetId($intenInfo);
$areaInfo = Db::name('geo_area')->where('area_code', $intenInfo['area_id'] ?? '')->find();
$sendData = [
'type' => 2,