类 UserController
java.lang.Object
net.sohelp.boot.admin.core.base.BaseController
net.sohelp.boot.engine.web.controller.UserController
@RestController("engine-web-user-select")
@RequestMapping("/engine/web/user")
@ConditionalOnExpression("${sohelp-boot.engine.enabled:true} && ${sohelp-boot.engine.service.enabled:true}")
public class UserController
extends BaseController
用户列表下拉选择
- 从以下版本开始:
- 2024/8/5 11:46
- 作者:
- AaronFung
-
字段概要
从类继承的字段 net.sohelp.boot.admin.core.base.BaseController
request, response -
构造器概要
构造器 -
方法概要
从类继承的方法 net.sohelp.boot.admin.core.base.BaseController
error, error, fail, fail, fail, getLoginID, getLoginName, getLoginOrgID, getLoginOrgName, getLoginUser, getNickname, getTenantId, getUserName, getUserNo, i18n, i18n, isAdministrator, isDeveloper, limit, offset, ok, ok, response, response, responseStream, success, success, success, success, validateToken
-
构造器详细资料
-
UserController
public UserController()
-
-
方法详细资料
-
avatar
@GetMapping("/avatar") @Permission("") public ApiResult<String> avatar(@RequestParam String id) throws SQLException, IOException 获取用户头像 根据用户ID获取用户的头像图片,并将图片数据写入响应流中- 参数:
id- 用户ID- 返回:
- 返回null表示已经通过输出流处理了响应
- 抛出:
SQLException- 如果数据库查询出现异常IOException- 如果文件读写出现异常
-
list
@GetMapping("/list") @Permission("") public ApiResult<List<Map<String,Object>>> list(@RequestParam(required=false) String orgId) throws TokenAuthenticationException, SQLException 获取用户列表接口 根据租户ID和部门ID获取用户列表,如果部门ID为空,则返回该租户下所有用户- 参数:
orgId- 部门ID,可选参数,如果提供则只返回该部门下的用户- 返回:
- 返回包含用户信息的ApiResult对象,用户信息包括id、user_name和avatar
- 抛出:
TokenAuthenticationException- 如果令牌认证失败,则抛出此异常SQLException- 如果数据库查询出现异常,则抛出此异常
-
page
@GetMapping("/page") @Permission("") public ApiResult<Pager<Map<String,Object>>> page(@RequestParam(required=false) String orgId) throws TokenAuthenticationException, SQLException
-