更新查询数据

This commit is contained in:
codeliu 2024-03-23 14:30:12 +08:00
parent c4b821d3ea
commit c2921e165d
3 changed files with 6 additions and 5 deletions

View File

@ -61,7 +61,7 @@ class MerchantIntentionRepository extends BaseRepository
foreach ($list as $k=> &$value){
if ($value['admin_id']) {
$checkInfo = Admin::getDB()->where('admin_id',$value['admin_id'])->find();
$value['check_name'] = $checkInfo['real_name'];
$value['check_name'] = $checkInfo['account'];
$value['check_phone'] = $checkInfo['phone'];
}else{
$value['check_name'] = '';
@ -143,13 +143,14 @@ class MerchantIntentionRepository extends BaseRepository
* @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');//商户

View File

@ -94,8 +94,8 @@ class MerchantIntention extends BaseController
return app('json')->fail('数据不存在');
$data = $this->request->params(['status','fail_msg','admin_id']);
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('审核通过');
}

View File

@ -367,7 +367,7 @@ class MerchantIntention extends BaseController
if ($v['admin_id']) {
$checkInfo = Admin::getDB()->where('admin_id',$v['admin_id'])->find();
$v['check_name'] = $checkInfo['real_name'];
$v['check_name'] = $checkInfo['account'];
$v['check_phone'] = $checkInfo['phone'];
}else{
$v['check_name'] = '';