update 优化代码注释并移除冗余构造函数
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
package org.dromara.system.domain;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存信息
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class SysCache {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存名称
|
|
||||||
*/
|
|
||||||
private String cacheName = "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存键名
|
|
||||||
*/
|
|
||||||
private String cacheKey = "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存内容
|
|
||||||
*/
|
|
||||||
private String cacheValue = "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remark = "";
|
|
||||||
|
|
||||||
public SysCache(String cacheName, String remark) {
|
|
||||||
this.cacheName = cacheName;
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysCache(String cacheName, String cacheKey, String cacheValue) {
|
|
||||||
this.cacheName = StringUtils.replace(cacheName, ":", "");
|
|
||||||
this.cacheKey = StringUtils.replace(cacheKey, cacheName, "");
|
|
||||||
this.cacheValue = cacheValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.dromara.common.core.constant.SystemConstants;
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,8 +63,4 @@ public class SysDictData extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
public boolean getDefault() {
|
|
||||||
return SystemConstants.YES.equals(this.isDefault);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,4 @@ public class SysRole extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
public SysRole(Long roleId) {
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,10 +88,6 @@ public class SysRoleBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long[] deptIds;
|
private Long[] deptIds;
|
||||||
|
|
||||||
public SysRoleBo(Long roleId) {
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuperAdmin() {
|
public boolean isSuperAdmin() {
|
||||||
return SystemConstants.SUPER_ADMIN_ROLE_ID.equals(this.roleId);
|
return SystemConstants.SUPER_ADMIN_ROLE_ID.equals(this.roleId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,6 +140,4 @@ public class SysSocialBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String oauthTokenSecret;
|
private String oauthTokenSecret;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,10 +133,6 @@ public class SysUserBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Map<String, Object> params = new HashMap<>();
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
public SysUserBo(Long userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuperAdmin() {
|
public boolean isSuperAdmin() {
|
||||||
return SystemConstants.SUPER_ADMIN_USER_ID.equals(this.userId);
|
return SystemConstants.SUPER_ADMIN_USER_ID.equals(this.userId);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -14,7 +14,13 @@ public class SysRoleMenuPermVo implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色ID
|
||||||
|
*/
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限字符串
|
||||||
|
*/
|
||||||
private String perms;
|
private String perms;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-1
@@ -91,7 +91,7 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu, SysMenuVo>, MPJBa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询菜单
|
* 查询全部正常状态的目录和菜单
|
||||||
*
|
*
|
||||||
* @return 菜单列表
|
* @return 菜单列表
|
||||||
*/
|
*/
|
||||||
@@ -128,6 +128,13 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu, SysMenuVo>, MPJBa
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和查询条件查询菜单列表
|
||||||
|
*
|
||||||
|
* @param menu 菜单查询条件
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 菜单列表
|
||||||
|
*/
|
||||||
default List<SysMenuVo> selectMenuListByUserId(SysMenuBo menu, Long userId) {
|
default List<SysMenuVo> selectMenuListByUserId(SysMenuBo menu, Long userId) {
|
||||||
return this.selectJoinList(SysMenuVo.class, JoinWrappers.lambda("m", SysMenu.class)
|
return this.selectJoinList(SysMenuVo.class, JoinWrappers.lambda("m", SysMenu.class)
|
||||||
.distinct()
|
.distinct()
|
||||||
@@ -146,6 +153,12 @@ public interface SysMenuMapper extends BaseMapperPlus<SysMenu, SysMenuVo>, MPJBa
|
|||||||
.orderByAsc("m", SysMenu::getOrderNum));
|
.orderByAsc("m", SysMenu::getOrderNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID查询正常状态的目录和菜单
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 菜单列表
|
||||||
|
*/
|
||||||
default List<SysMenu> selectMenuTreeByUserId(Long userId) {
|
default List<SysMenu> selectMenuTreeByUserId(Long userId) {
|
||||||
return this.selectJoinList(SysMenu.class, JoinWrappers.lambda("m", SysMenu.class)
|
return this.selectJoinList(SysMenu.class, JoinWrappers.lambda("m", SysMenu.class)
|
||||||
.distinct()
|
.distinct()
|
||||||
|
|||||||
Reference in New Issue
Block a user