diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 6917d72c..f81bd56b 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -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,