增加后台操作人员信息
This commit is contained in:
parent
8081b7aaad
commit
2f084ec602
@ -126,16 +126,18 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
* 更新身份
|
* 更新身份
|
||||||
* @param $id
|
* @param $id
|
||||||
* @param $data
|
* @param $data
|
||||||
|
* @param $admin_id
|
||||||
* @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');//商户
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ namespace app\controller\admin\system\merchant;
|
|||||||
|
|
||||||
use app\common\repositories\store\ExcelRepository;
|
use app\common\repositories\store\ExcelRepository;
|
||||||
use app\common\repositories\system\CacheRepository;
|
use app\common\repositories\system\CacheRepository;
|
||||||
|
use app\Request;
|
||||||
use crmeb\services\ExcelService;
|
use crmeb\services\ExcelService;
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
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]))
|
if (!$this->repository->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0]))
|
||||||
return app('json')->fail('数据不存在');
|
return app('json')->fail('数据不存在');
|
||||||
$data = $this->request->params(['status','fail_msg']);
|
$data = $this->request->params(['status','fail_msg']);
|
||||||
if(empty($data['status'])) return app('json')->fail('缺失参数');
|
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('审核通过');
|
return app('json')->success('审核通过');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user