Commit e51979f8 by Suvalue

接口说明添加,实体字段说明添加

parent a01da4cb
...@@ -7,6 +7,7 @@ import com.bsoft.api.model.SysUser; ...@@ -7,6 +7,7 @@ import com.bsoft.api.model.SysUser;
import com.bsoft.api.service.SysMenuService; import com.bsoft.api.service.SysMenuService;
import com.bsoft.api.service.SysUserRoleRsService; import com.bsoft.api.service.SysUserRoleRsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -38,17 +39,19 @@ public class UserController { ...@@ -38,17 +39,19 @@ public class UserController {
*/ */
@GetMapping("roles") @GetMapping("roles")
@Token @Token
@ApiOperation("查询用户角色")
public Object getRoleListByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{ public Object getRoleListByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{
return Result.success(sysUserRoleRsService.getRoleListByUser(userId)); return Result.success(sysUserRoleRsService.getRoleListByUser(userId));
} }
/** /**
* 根据用户id查询用户角色 * 根据用户id查询用户菜单
* @param userId 用户id * @param userId 用户id
* @return * @return
*/ */
@GetMapping("menus") @GetMapping("menus")
@Token @Token
@ApiOperation("查询用户菜单")
public Object getMenuByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{ public Object getMenuByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{
return Result.success(sysMenuService.getMenu(userId)); return Result.success(sysMenuService.getMenu(userId));
} }
......
...@@ -24,6 +24,7 @@ public class SysUser { ...@@ -24,6 +24,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("创建时间")
private Date createDate; private Date createDate;
/** /**
...@@ -33,6 +34,7 @@ public class SysUser { ...@@ -33,6 +34,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("创建人ID")
private Long createUserid; private Long createUserid;
/** /**
...@@ -42,6 +44,7 @@ public class SysUser { ...@@ -42,6 +44,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("状态(1=启用/0=禁用)")
private Short state; private Short state;
/** /**
...@@ -51,6 +54,7 @@ public class SysUser { ...@@ -51,6 +54,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("用户编码用于登陆")
private String userCode; private String userCode;
/** /**
...@@ -60,6 +64,7 @@ public class SysUser { ...@@ -60,6 +64,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("用户名称")
private String userName; private String userName;
/** /**
...@@ -69,6 +74,7 @@ public class SysUser { ...@@ -69,6 +74,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("密码")
private String password; private String password;
/** /**
...@@ -78,6 +84,7 @@ public class SysUser { ...@@ -78,6 +84,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("身份证")
private String idcard; private String idcard;
/** /**
...@@ -87,6 +94,7 @@ public class SysUser { ...@@ -87,6 +94,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("性别")
private String sex; private String sex;
/** /**
...@@ -96,6 +104,7 @@ public class SysUser { ...@@ -96,6 +104,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("手机号码")
private String mobile; private String mobile;
/** /**
...@@ -123,6 +132,7 @@ public class SysUser { ...@@ -123,6 +132,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("错误日期")
private Date errorTime; private Date errorTime;
/** /**
...@@ -132,6 +142,7 @@ public class SysUser { ...@@ -132,6 +142,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("最后一次登陆时间")
private Date lastTime; private Date lastTime;
/** /**
...@@ -141,6 +152,7 @@ public class SysUser { ...@@ -141,6 +152,7 @@ public class SysUser {
* *
* @mbggenerated Tue Oct 22 14:44:12 CST 2019 * @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/ */
@ApiModelProperty("最后一次登陆IP")
private String lastIp; private String lastIp;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment