diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index 616d09ba..f85ef873 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -126,16 +126,18 @@ class MerchantIntentionRepository extends BaseRepository * 更新身份 * @param $id * @param $data + * @param $admin_id * @return void * @throws \think\db\exception\DbException */ - public function updateIdent($id, $data) + public function updateIdent($id, $data,$admin_id) { //通过就 更改商户的身份 $intention = $this->search(['mer_intention_id' => $id])->find(); if (!$intention) throw new ValidateException('信息不存在'); $uid = $intention->uid; + $intention->admin_id = $admin_id; if($data['status'] == 1){ $check = Merchant::getDB()->where('uid', $uid)->value('mer_id');//商户 diff --git a/app/controller/admin/system/merchant/MerchantIntention.php b/app/controller/admin/system/merchant/MerchantIntention.php index 7e077e01..60a11367 100644 --- a/app/controller/admin/system/merchant/MerchantIntention.php +++ b/app/controller/admin/system/merchant/MerchantIntention.php @@ -15,6 +15,7 @@ namespace app\controller\admin\system\merchant; use app\common\repositories\store\ExcelRepository; use app\common\repositories\system\CacheRepository; +use app\Request; use crmeb\services\ExcelService; use think\App; use crmeb\basic\BaseController; @@ -87,13 +88,14 @@ class MerchantIntention extends BaseController - public function switchIdentity($id) + public function switchIdentity(Request $request,$id) { if (!$this->repository->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0])) return app('json')->fail('数据不存在'); $data = $this->request->params(['status','fail_msg']); if(empty($data['status'])) return app('json')->fail('缺失参数'); - $this->repository->updateIdent($id, $data); + $adminid = $request->adminId(); + $this->repository->updateIdent($id, $data,$adminid); return app('json')->success('审核通过'); }