增加后台操作人员信息
This commit is contained in:
parent
8081b7aaad
commit
2f084ec602
@ -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');//商户
|
||||
|
||||
|
@ -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('审核通过');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user