删代码。舒服!!

This commit is contained in:
寻欢·李 2018-03-21 16:28:07 +08:00
parent e9b1fa01eb
commit 3c299c91aa
18 changed files with 59 additions and 811 deletions

View File

@ -2,6 +2,7 @@ package com.github.pig.common.entity;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -14,6 +15,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-11-20 * @since 2017-11-20
*/ */
@Data
public class SysLog implements Serializable { public class SysLog implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -83,125 +85,6 @@ public class SysLog implements Serializable {
*/ */
private String serviceId; private String serviceId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemoteAddr() {
return remoteAddr;
}
public void setRemoteAddr(String remoteAddr) {
this.remoteAddr = remoteAddr;
}
public String getUserAgent() {
return userAgent;
}
public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}
public String getRequestUri() {
return requestUri;
}
public void setRequestUri(String requestUri) {
this.requestUri = requestUri;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getParams() {
return params;
}
public void setParams(String params) {
this.params = params;
}
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getException() {
return exception;
}
public void setException(String exception) {
this.exception = exception;
}
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
@Override @Override
public String toString() { public String toString() {

View File

@ -1,6 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -9,6 +10,7 @@ import java.io.Serializable;
* @date 2017/12/25 * @date 2017/12/25
* spring boot 的异常对象 * spring boot 的异常对象
*/ */
@Data
public class ErrorPojo implements Serializable { public class ErrorPojo implements Serializable {
@JSONField(name = "timestamp") @JSONField(name = "timestamp")
@ -23,52 +25,4 @@ public class ErrorPojo implements Serializable {
private String message; private String message;
@JSONField(name = "path") @JSONField(name = "path")
private String path; private String path;
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public String getException() {
return exception;
}
public void setException(String exception) {
this.exception = exception;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
} }

View File

@ -1,5 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import lombok.Data;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -9,6 +11,7 @@ import java.time.LocalDateTime;
* @author lengleng * @author lengleng
* @date 2017-12-18 * @date 2017-12-18
*/ */
@Data
public class ImageCode implements Serializable { public class ImageCode implements Serializable {
private String code; private String code;
@ -21,32 +24,4 @@ public class ImageCode implements Serializable {
this.code = sRand; this.code = sRand;
this.expireTime = LocalDateTime.now().plusSeconds(defaultImageExpire); this.expireTime = LocalDateTime.now().plusSeconds(defaultImageExpire);
} }
public boolean isExpried() {
return LocalDateTime.now().isAfter(expireTime);
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public LocalDateTime getExpireTime() {
return expireTime;
}
public void setExpireTime(LocalDateTime expireTime) {
this.expireTime = expireTime;
}
public BufferedImage getImage() {
return image;
}
public void setImage(BufferedImage image) {
this.image = image;
}
} }

View File

@ -1,6 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import com.github.pig.common.entity.SysLog; import com.github.pig.common.entity.SysLog;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -8,24 +9,10 @@ import java.io.Serializable;
* @author lengleng * @author lengleng
* @date 2017/11/20 * @date 2017/11/20
*/ */
@Data
public class LogVo implements Serializable { public class LogVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private SysLog sysLog; private SysLog sysLog;
private String token; private String token;
public SysLog getSysLog() {
return sysLog;
}
public void setSysLog(SysLog sysLog) {
this.sysLog = sysLog;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
} }

View File

@ -1,5 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -11,6 +13,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-11-08 * @since 2017-11-08
*/ */
@Data
public class MenuVo implements Serializable { public class MenuVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -43,6 +46,10 @@ public class MenuVo implements Serializable {
* 图标 * 图标
*/ */
private String icon; private String icon;
/**
* 一个路径
*/
private String path;
/** /**
* VUE页面 * VUE页面
*/ */
@ -68,109 +75,6 @@ public class MenuVo implements Serializable {
*/ */
private String delFlag; private String delFlag;
public Integer getMenuId() {
return menuId;
}
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getComponent() {
return component;
}
public void setComponent(String component) {
this.component = component;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@Override @Override
public int hashCode() { public int hashCode() {

View File

@ -1,5 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -11,6 +13,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-10-29 * @since 2017-10-29
*/ */
@Data
public class SysRole implements Serializable { public class SysRole implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -22,63 +25,6 @@ public class SysRole implements Serializable {
private Date updateTime; private Date updateTime;
private String delFlag; private String delFlag;
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getRoleCode() {
return roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
public String getRoleDesc() {
return roleDesc;
}
public void setRoleDesc(String roleDesc) {
this.roleDesc = roleDesc;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@Override @Override
public String toString() { public String toString() {
return "SysRole{" + return "SysRole{" +

View File

@ -1,5 +1,7 @@
package com.github.pig.common.vo; package com.github.pig.common.vo;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
@ -9,6 +11,7 @@ import java.util.List;
* @author lengleng * @author lengleng
* @date 2017/10/29 * @date 2017/10/29
*/ */
@Data
public class UserVo implements Serializable { public class UserVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -62,100 +65,4 @@ public class UserVo implements Serializable {
* 角色列表 * 角色列表
*/ */
private List<SysRole> roleList = new ArrayList<>(); private List<SysRole> roleList = new ArrayList<>();
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public List<SysRole> getRoleList() {
return roleList;
}
public void setRoleList(List<SysRole> roleList) {
this.roleList = roleList;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public Integer getDeptId() {
return deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
} }

View File

@ -10,7 +10,8 @@ spring:
config: config:
server: server:
git: git:
uri: https://gitee.com/cqzqxq_lxh/pig-config.git # uri: https://gitee.com/cqzqxq_lxh/pig-config.git
uri: https://gitee.com/boding1/pig-config.git
--- ---
spring: spring:
profiles: dev profiles: dev

View File

@ -1,5 +1,6 @@
package com.github.pig.admin.model.dto; package com.github.pig.admin.model.dto;
import com.github.pig.common.vo.MenuVo;
import lombok.Data; import lombok.Data;
/** /**
@ -36,4 +37,16 @@ public class MenuTree extends TreeNode {
this.name = name; this.name = name;
this.label = name; this.label = name;
} }
public MenuTree(MenuVo menuVo) {
this.id = menuVo.getMenuId();
this.parentId = menuVo.getParentId();
this.icon = menuVo.getIcon();
this.name = menuVo.getName();
this.url = menuVo.getUrl();
this.path = menuVo.getPath();
this.component = menuVo.getComponent();
this.type = menuVo.getType();
this.label = menuVo.getName();
}
} }

View File

@ -1,5 +1,7 @@
package com.github.pig.admin.model.dto; package com.github.pig.admin.model.dto;
import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -7,6 +9,7 @@ import java.util.List;
* @author lengleng * @author lengleng
* @date 2017年11月9日23:33:45 * @date 2017年11月9日23:33:45
*/ */
@Data
public class TreeNode { public class TreeNode {
protected int id; protected int id;
protected int parentId; protected int parentId;

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -18,6 +19,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-11-19 * @since 2017-11-19
*/ */
@Data
@TableName("sys_dict") @TableName("sys_dict")
public class SysDict extends Model<SysDict> { public class SysDict extends Model<SysDict> {
@ -69,86 +71,6 @@ public class SysDict extends Model<SysDict> {
private String delFlag; private String delFlag;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public BigDecimal getSort() {
return sort;
}
public void setSort(BigDecimal sort) {
this.sort = sort;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.id; return this.id;

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -17,6 +18,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-11-08 * @since 2017-11-08
*/ */
@Data
@TableName("sys_menu") @TableName("sys_menu")
public class SysMenu extends Model<SysMenu> { public class SysMenu extends Model<SysMenu> {
@ -85,118 +87,6 @@ public class SysMenu extends Model<SysMenu> {
private String path; private String path;
public Integer getMenuId() {
return menuId;
}
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getComponent() {
return component;
}
public void setComponent(String component) {
this.component = component;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.menuId; return this.menuId;

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -16,6 +17,7 @@ import java.io.Serializable;
* @author lengleng * @author lengleng
* @since 2018-01-20 * @since 2018-01-20
*/ */
@Data
@TableName("sys_role_dept") @TableName("sys_role_dept")
public class SysRoleDept extends Model<SysRoleDept> { public class SysRoleDept extends Model<SysRoleDept> {
@ -35,30 +37,6 @@ public class SysRoleDept extends Model<SysRoleDept> {
private Integer deptId; private Integer deptId;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getDeptId() {
return deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.id; return this.id;

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -15,6 +16,7 @@ import java.io.Serializable;
* @author lengleng * @author lengleng
* @since 2017-10-29 * @since 2017-10-29
*/ */
@Data
@TableName("sys_role_menu") @TableName("sys_role_menu")
public class SysRoleMenu extends Model<SysRoleMenu> { public class SysRoleMenu extends Model<SysRoleMenu> {
@ -31,23 +33,6 @@ public class SysRoleMenu extends Model<SysRoleMenu> {
@TableId(type = IdType.INPUT) @TableId(type = IdType.INPUT)
private Integer menuId; private Integer menuId;
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getMenuId() {
return menuId;
}
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.roleId; return this.roleId;

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -17,6 +18,7 @@ import java.util.Date;
* @author lengleng * @author lengleng
* @since 2017-10-29 * @since 2017-10-29
*/ */
@Data
@TableName("sys_user") @TableName("sys_user")
public class SysUser extends Model<SysUser> { public class SysUser extends Model<SysUser> {
@ -69,91 +71,11 @@ public class SysUser extends Model<SysUser> {
private Integer deptId; private Integer deptId;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.userId; return this.userId;
} }
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public Integer getDeptId() {
return deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
@Override @Override
public String toString() { public String toString() {
return "SysUser{" + return "SysUser{" +

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -15,6 +16,7 @@ import java.io.Serializable;
* @author lengleng * @author lengleng
* @since 2017-10-29 * @since 2017-10-29
*/ */
@Data
@TableName("sys_user_role") @TableName("sys_user_role")
public class SysUserRole extends Model<SysUserRole> { public class SysUserRole extends Model<SysUserRole> {
@ -32,22 +34,6 @@ public class SysUserRole extends Model<SysUserRole> {
private Integer roleId; private Integer roleId;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
@Override @Override
protected Serializable pkVal() { protected Serializable pkVal() {
return this.userId; return this.userId;

View File

@ -91,23 +91,14 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
*/ */
@Override @Override
public List<MenuTree> findUserMenuTree(String roleName) { public List<MenuTree> findUserMenuTree(String roleName) {
// 获取符合条件得菜单
Set<MenuVo> all = findMenuByRole(roleName); Set<MenuVo> all = findMenuByRole(roleName);
List<MenuTree> menuTreeList = new ArrayList<>(); final List<MenuTree> menuTreeList = new ArrayList<>();
MenuTree node = null; all.stream().forEach((menuVo -> {
for (MenuVo menuVo : all) {
if (CommonConstant.MENU.equals(menuVo.getType())) { if (CommonConstant.MENU.equals(menuVo.getType())) {
node = new MenuTree(); menuTreeList.add(new MenuTree(menuVo));
node.setId(menuVo.getMenuId());
node.setParentId(menuVo.getParentId());
node.setName(menuVo.getName());
node.setUrl(menuVo.getUrl());
node.setCode(menuVo.getPermission());
node.setLabel(menuVo.getName());
node.setComponent(menuVo.getComponent());
node.setIcon(menuVo.getIcon());
menuTreeList.add(node);
} }
} }));
return TreeUtil.bulid(menuTreeList, -1); return TreeUtil.bulid(menuTreeList, -1);
} }
} }

View File

@ -28,6 +28,7 @@
<result column="method" property="method" /> <result column="method" property="method" />
<result column="parent_id" property="parentId" /> <result column="parent_id" property="parentId" />
<result column="icon" property="icon" /> <result column="icon" property="icon" />
<result column="path" property="path" />
<result column="component" property="component" /> <result column="component" property="component" />
<result column="sort" property="sort" /> <result column="sort" property="sort" />
<result column="type" property="type" /> <result column="type" property="type" />