修改商户交易申请

This commit is contained in:
luofei 2024-03-07 11:20:44 +08:00
parent 7080bd162d
commit 0cbe852ae8
2 changed files with 17 additions and 16 deletions

View File

@ -368,7 +368,7 @@ class Auth extends BaseController
$store_service = Db::name('store_service')->where('uid', $data['uid'])->find();
if ($store_service) {
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->field('type_id,mer_avatar,mer_banner,business_status,mer_info,category_id,service_phone,mer_address,uid,mer_name,create_time,update_time,mer_settlement_agree_status,is_margin,street_id,is_company')->find();
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->field('type_id,mer_avatar,mer_banner,business_status,mer_info,category_id,service_phone,mer_address,uid,mer_name,create_time,update_time,mer_settlement_agree_status,is_margin,street_id,is_company,mer_money')->find();
$bank_info = Db::name('merchant_intention')->where('mer_id', $store_service['mer_id'])->field('company_name,bank_username,bank_opening,bank_code')->find();
if ($mer_arr && $mer_arr['mer_avatar'] != '' && $mer_arr['mer_banner'] != '' && $mer_arr['mer_info'] && $mer_arr['service_phone'] != '' && $mer_arr['mer_address'] != '') {
$data['is_wsxx'] = 1;

View File

@ -189,10 +189,11 @@ class MerchantIntention extends BaseController
}
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
$settleIn = $this->repository->getWhere(['type' => 1, 'uid' => $data['uid'], 'is_del' => 0]);
if (empty($settleIn)) {
$merchant = Merchant::where('uid', $data['uid'])->where('is_del', 0)->find();
if (empty($settleIn) && empty($merchant)) {
return app('json')->fail('请申请商户入驻申请!');
}
if ($settleIn['status'] == 0) {
if (!empty($settleIn) && $settleIn['status'] == 0) {
return app('json')->fail('请等待商户入驻申请审核!');
}
$merIntentionInfo = $this->repository->getWhere(['type' => 2, 'uid' => $data['uid'], 'is_del' => 0]);
@ -202,19 +203,19 @@ class MerchantIntention extends BaseController
if (!empty($merIntentionInfo) && ($merIntentionInfo['status'] == 1)) {
return app('json')->fail('商户交易申请已通过');
}
$intenInfo['phone'] = $settleIn['phone'];
$intenInfo['mer_name'] = $settleIn['mer_name'];
$intenInfo['company_name'] = $settleIn['company_name'];
$intenInfo['name'] = $settleIn['name'];
$intenInfo['social_credit_code'] = $settleIn['social_credit_code'];
$intenInfo['images'] = $settleIn['images'];
$intenInfo['merchant_category_id'] = $settleIn['merchant_category_id'];
$intenInfo['mer_type_id'] = $settleIn['mer_type_id'];
$intenInfo['area_id'] = $settleIn['area_id'];
$intenInfo['street_id'] = $settleIn['street_id'];
$intenInfo['village_id'] = $settleIn['village_id'];
$intenInfo['is_nmsc'] = $settleIn['is_nmsc'];
$intenInfo['address'] = $settleIn['address'];
$intenInfo['phone'] = $merchant['mer_phone'];
$intenInfo['mer_name'] = $merchant['mer_name'];
$intenInfo['company_name'] = $merchant['mer_name'];
$intenInfo['name'] = $merchant['real_name'];
$intenInfo['social_credit_code'] = '';
$intenInfo['images'] = [];
$intenInfo['merchant_category_id'] = $merchant['category_id'];
$intenInfo['mer_type_id'] = $merchant['type_id'];
$intenInfo['area_id'] = $merchant['area_id'];
$intenInfo['street_id'] = $merchant['street_id'];
$intenInfo['village_id'] = $merchant['village_id'];
$intenInfo['is_nmsc'] = $merchant['is_nmsc'];
$intenInfo['address'] = $merchant['mer_address'];
$intenInfo['bank_username'] = $data['bank_username'];
$intenInfo['bank_opening'] = $data['bank_opening'];
$intenInfo['bank_code'] = $data['bank_code'];