更新查询数据
This commit is contained in:
parent
c4b821d3ea
commit
c2921e165d
@ -61,7 +61,7 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
foreach ($list as $k=> &$value){
|
foreach ($list as $k=> &$value){
|
||||||
if ($value['admin_id']) {
|
if ($value['admin_id']) {
|
||||||
$checkInfo = Admin::getDB()->where('admin_id',$value['admin_id'])->find();
|
$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'];
|
$value['check_phone'] = $checkInfo['phone'];
|
||||||
}else{
|
}else{
|
||||||
$value['check_name'] = '';
|
$value['check_name'] = '';
|
||||||
@ -143,13 +143,14 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
* @return void
|
* @return void
|
||||||
* @throws \think\db\exception\DbException
|
* @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();
|
$intention = $this->search(['mer_intention_id' => $id])->find();
|
||||||
if (!$intention)
|
if (!$intention)
|
||||||
throw new ValidateException('信息不存在');
|
throw new ValidateException('信息不存在');
|
||||||
$uid = $intention->uid;
|
$uid = $intention->uid;
|
||||||
|
$intention->admin_id = $admin_id;
|
||||||
if($data['status'] == 1){
|
if($data['status'] == 1){
|
||||||
$check = Merchant::getDB()->where('uid', $uid)->value('mer_id');//商户
|
$check = Merchant::getDB()->where('uid', $uid)->value('mer_id');//商户
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ class MerchantIntention extends BaseController
|
|||||||
return app('json')->fail('数据不存在');
|
return app('json')->fail('数据不存在');
|
||||||
$data = $this->request->params(['status','fail_msg','admin_id']);
|
$data = $this->request->params(['status','fail_msg','admin_id']);
|
||||||
if(empty($data['status'])) return app('json')->fail('缺失参数');
|
if(empty($data['status'])) return app('json')->fail('缺失参数');
|
||||||
|
$adminid = $request->adminId();
|
||||||
$this->repository->updateIdent($id, $data);
|
$this->repository->updateIdent($id, $data,$adminid);
|
||||||
return app('json')->success('审核通过');
|
return app('json')->success('审核通过');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ class MerchantIntention extends BaseController
|
|||||||
|
|
||||||
if ($v['admin_id']) {
|
if ($v['admin_id']) {
|
||||||
$checkInfo = Admin::getDB()->where('admin_id',$v['admin_id'])->find();
|
$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'];
|
$v['check_phone'] = $checkInfo['phone'];
|
||||||
}else{
|
}else{
|
||||||
$v['check_name'] = '';
|
$v['check_name'] = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user