更新
This commit is contained in:
parent
75cd26eea4
commit
570215b220
@ -12,6 +12,7 @@ use Exception;
|
||||
use service\FileService;
|
||||
use service\MessageService;
|
||||
use service\NodeService;
|
||||
use think\Db;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\exception\DbException;
|
||||
@ -43,7 +44,7 @@ class Account extends BasicApi
|
||||
$currentOrganizationCode = getCurrentOrganizationCode();
|
||||
$where = [['organization_code', '=', $currentOrganizationCode]];
|
||||
// $where = [['organization_code', '=', $currentOrganizationCode], ['is_owner', '=', 0]];
|
||||
$params = Request::only('account,mobile,email,searchType,keyword');
|
||||
$params = Request::only('account,mobile,email,searchType,keyword,type');
|
||||
$departmentCode = Request::param('departmentCode');
|
||||
if (isset($params['keyword']) && $params['keyword']) {
|
||||
$where[] = ['name', 'like', "%{$params['keyword']}%"];
|
||||
@ -69,6 +70,9 @@ class Account extends BasicApi
|
||||
|
||||
}
|
||||
}
|
||||
if(isset($params['type']) &&$params['type']==1){
|
||||
$where[] = ['is_liaison_man', '=', $params['type']];
|
||||
}
|
||||
foreach (['account', 'mobile', 'email'] as $key) {
|
||||
(isset($params[$key]) && $params[$key] !== '') && $where[] = [$key, 'like', "%{$params[$key]}%"];
|
||||
}
|
||||
@ -325,4 +329,16 @@ class Account extends BasicApi
|
||||
$this->error("账户启用失败,请稍候再试!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置联系人
|
||||
*/
|
||||
public function set_liaison_man(){
|
||||
$member_code=input('member_code');
|
||||
$type=input('type');
|
||||
$find=Db::name('member_account')->where('member_code',$member_code)->update(['is_liaison_man'=>$type]);
|
||||
if($find){
|
||||
return $this->success('');
|
||||
}
|
||||
return $this->error('设置失败');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user