From 2f084ec602522b3c0ebe0dab212eea38b0f1a164 Mon Sep 17 00:00:00 2001 From: codeliu <1873441552@qq.com> Date: Sat, 23 Mar 2024 13:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/merchant/MerchantIntentionRepository.php | 4 +++- app/controller/admin/system/merchant/MerchantIntention.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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('审核通过'); }