1
This commit is contained in:
parent
c5b6b1669c
commit
66b404bc2f
14
doc/User.py
14
doc/User.py
@ -83,6 +83,20 @@ class User(object):
|
||||
['info',_common.UserInfo(), '用户信息'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'query',
|
||||
'desc': '通过名字查询用户信息(精准查询)',
|
||||
'group': 'User',
|
||||
'url': 'webapp/index.php?c=User&a=query',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['name', '', '角色名']
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['info',_common.UserInfo(), '用户信息'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'detailInfo',
|
||||
'desc': '获取用户信息(详细)',
|
||||
|
@ -367,6 +367,30 @@ class UserController extends BaseAuthedController {
|
||||
));
|
||||
}
|
||||
|
||||
public function query()
|
||||
{
|
||||
$name = getReqVal('name', '');
|
||||
$userDb = SqlHelper::ormSelectOne
|
||||
($this->_getMysql($name),
|
||||
't_user',
|
||||
array(
|
||||
'name' => $name
|
||||
)
|
||||
);
|
||||
if (!$userDb) {
|
||||
$this->_rspErr(1, 'not found');
|
||||
return;
|
||||
}
|
||||
$channel = phpcommon\extractChannel($userDb['account_id']);
|
||||
if ($channel != BC_CHANNEL) {
|
||||
$this->_rspErr(1, 'not found');
|
||||
return;
|
||||
}
|
||||
$this->_rspData(array(
|
||||
'info' => User::info($userDb)
|
||||
));
|
||||
}
|
||||
|
||||
public function detailInfo()
|
||||
{
|
||||
$targetId = getReqVal('target_id', '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user