init
This commit is contained in:
34
admin/admin-api/pom.xml
Normal file
34
admin/admin-api/pom.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>admin</artifactId>
|
||||
<groupId>cn.fateverse</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>admin-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.fateverse</groupId>
|
||||
<artifactId>common-dubbo</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.fateverse</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.fateverse</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.fateverse</groupId>
|
||||
<artifactId>common-decrypt</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,71 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import cn.fateverse.admin.entity.Config;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 参数配置表对象 sys_config
|
||||
*
|
||||
* @author clay
|
||||
* @date 2023-06-09
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("参数配置表Dto")
|
||||
public class ConfigDto {
|
||||
|
||||
/**
|
||||
* 参数主键
|
||||
*/
|
||||
@ApiModelProperty("参数主键")
|
||||
private Integer configId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@NotNull(message = "参数名称不能为空!")
|
||||
@ApiModelProperty("参数名称")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
@NotNull(message = "参数键名不能为空!")
|
||||
@ApiModelProperty("参数键名")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 参数键值
|
||||
*/
|
||||
@NotNull(message = "参数键值不能为空!")
|
||||
@ApiModelProperty("参数键值")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 系统内置(1是 0否)
|
||||
*/
|
||||
@NotNull(message = "是否系统内置不能为空!")
|
||||
@ApiModelProperty("系统内置(1是 0否)")
|
||||
private Integer configType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
public Config toConfig() {
|
||||
Config build = Config.builder()
|
||||
.configId(configId)
|
||||
.configName(configName)
|
||||
.configKey(configKey)
|
||||
.configValue(configValue)
|
||||
.configType(configType)
|
||||
.build();
|
||||
build.setRemark(remark);
|
||||
return build;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 部门表 sys_dept
|
||||
*
|
||||
* @author Clay
|
||||
* @date 2022/10/30
|
||||
*/
|
||||
@Data
|
||||
public class DeptDto {
|
||||
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 父部门ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 祖级列表
|
||||
*/
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@NotBlank(message = "部门名称不能为空!")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@NotNull(message = "显示顺序不能为空!")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@NotBlank(message = "负责人不能为空!")
|
||||
private String leader;
|
||||
|
||||
/**
|
||||
* 负责人id
|
||||
*/
|
||||
@NotNull(message = "负责人id不能为空!")
|
||||
private Long leaderId;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Pattern(message = "手机号格式错误!",regexp = "^1[0-9]{10}$")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Email(message = "邮箱格式错误!")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 部门状态:1正常,0停用
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023/5/18
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典数据实体")
|
||||
public class DictDataDto {
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
private Long dictCode;
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
@ApiModelProperty("字典排序")
|
||||
@NotNull(message = "状态不能为空!")
|
||||
private Integer dictSort;
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@ApiModelProperty("字典标签")
|
||||
@NotNull(message = "字典标签不能为空!")
|
||||
private String dictLabel;
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
@ApiModelProperty("字典键值")
|
||||
@NotNull(message = "字典键值不能为空!")
|
||||
private String dictValue;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
@NotNull(message = "字典类型不能为空!")
|
||||
private String dictType;
|
||||
/**
|
||||
* 样式属性(其他样式扩展)
|
||||
*/
|
||||
@ApiModelProperty("样式属性(其他样式扩展)")
|
||||
private Boolean isType;
|
||||
/**
|
||||
* 表格回显样式
|
||||
*/
|
||||
@ApiModelProperty("表格回显样式")
|
||||
private String listClass;
|
||||
/**
|
||||
* 字典显示主题(ui框架时)or文字颜色(自定义颜色时)
|
||||
*/
|
||||
@ApiModelProperty("字典显示主题(ui框架时)or文字颜色(自定义颜色时)")
|
||||
private String theme;
|
||||
/**
|
||||
* 是否默认(Y是 N否)
|
||||
*/
|
||||
@ApiModelProperty("是否默认(Y是 N否)")
|
||||
private Integer isDefault;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1正常 0停用)",required = true)
|
||||
@NotNull(message = "状态不能为空!")
|
||||
private String state;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典类型实体")
|
||||
public class DictTypeDto {
|
||||
|
||||
/**
|
||||
* 字典主键
|
||||
*/
|
||||
@ApiModelProperty("字典主键")
|
||||
private Long dictId;
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@ApiModelProperty("字典名称")
|
||||
@NotNull(message = "字典名称不能为空!")
|
||||
private String dictName;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
@NotNull(message = "字典类型不能为空!")
|
||||
private String dictType;
|
||||
/**
|
||||
* 字典状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("字典状态")
|
||||
@NotNull(message = "字典状态不能为空!")
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-10-22
|
||||
*/
|
||||
@Data
|
||||
public class IpBackDto {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
@NotBlank(message = "ip地址不能为空")
|
||||
@ApiModelProperty("ip地址")
|
||||
private String ipAddr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import cn.fateverse.common.decrypt.annotation.EncryptField;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2024/2/5 16:37
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("接口开关Dto")
|
||||
public class MappingSwitchDto {
|
||||
/**
|
||||
* key作为唯一编号
|
||||
*/
|
||||
@NotBlank(message = "唯一编号不能为空")
|
||||
@ApiModelProperty("唯一编号不能为空")
|
||||
@EncryptField
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 当前方法的状态,true为正常放行,false为关闭
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@ApiModelProperty("当前方法的状态,true为正常放行,false为关闭")
|
||||
private Boolean state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 菜单详细返回对象
|
||||
*
|
||||
* @author Clay
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("菜单")
|
||||
public class MenuDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty("菜单ID")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
|
||||
@ApiModelProperty("菜单名称")
|
||||
private String menuName;
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@ApiModelProperty("父菜单ID")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty("路由地址")
|
||||
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("路径参数")
|
||||
private String pathParams;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
@ApiModelProperty("组件路径")
|
||||
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 是否为外链(0是 1否)
|
||||
*/
|
||||
@ApiModelProperty("是否为外链(0是 1否)")
|
||||
private Boolean isFrame;
|
||||
|
||||
/**
|
||||
* 是否缓存(0缓存 1不缓存)
|
||||
*/
|
||||
@ApiModelProperty("是否缓存(0缓存 1不缓存)")
|
||||
private Boolean isCache;
|
||||
|
||||
@ApiModelProperty("不重定向")
|
||||
private Boolean noRedirect;
|
||||
|
||||
@ApiModelProperty("面包屑")
|
||||
private Boolean breadcrumb;
|
||||
|
||||
/**
|
||||
* 类型(D目录 M菜单 B按钮)
|
||||
*/
|
||||
@ApiModelProperty("类型(D目录 M菜单 B按钮)")
|
||||
@NotBlank(message = "菜单类型不能为空")
|
||||
private String menuType;
|
||||
|
||||
/**
|
||||
* 显示状态(0显示 1隐藏)
|
||||
*/
|
||||
@ApiModelProperty("显示状态(0显示 1隐藏)")
|
||||
private String visible;
|
||||
|
||||
/**
|
||||
* 菜单状态(0显示 1隐藏)
|
||||
*/
|
||||
@ApiModelProperty("菜单状态(0显示 1隐藏)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 权限字符串
|
||||
*/
|
||||
@ApiModelProperty("权限字符串")
|
||||
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
|
||||
private String perms;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty("菜单图标")
|
||||
private String icon;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/26
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("岗位实体")
|
||||
public class PostDto {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@ApiModelProperty("岗位ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
@ApiModelProperty("岗位编码")
|
||||
@NotNull(message = "岗位编码不能为空!")
|
||||
private String postCode;
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@ApiModelProperty("岗位名称")
|
||||
@NotNull(message = "岗位名称不能为空!")
|
||||
private String postName;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
@NotNull(message = "显示顺序不能为空!")
|
||||
private Integer postSort;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(1正常 0停用)")
|
||||
@NotNull(message = "状态不能为空!")
|
||||
private String state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import cn.fateverse.admin.entity.Role;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/5
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("角色接受对象")
|
||||
public class RoleDto {
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@ApiModelProperty("角色id")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
@ApiModelProperty("角色名称")
|
||||
@NotBlank(message = "角色名称不能为空!")
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 角色关键词
|
||||
*/
|
||||
@ApiModelProperty("角色关键词")
|
||||
@NotBlank(message = "角色关键词不能为空!")
|
||||
private String roleKey;
|
||||
|
||||
/**
|
||||
* 角色排序
|
||||
*/
|
||||
@ApiModelProperty("角色排序")
|
||||
@NotNull(message = "角色排序不能为空!")
|
||||
private Integer roleSort;
|
||||
|
||||
/**
|
||||
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)
|
||||
*/
|
||||
@ApiModelProperty("数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)")
|
||||
private String dataScope;
|
||||
|
||||
/**
|
||||
* 角色状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("角色状态(1正常 0停用)")
|
||||
@NotBlank(message = "角色状态不能为空!")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 菜单组
|
||||
*/
|
||||
@ApiModelProperty("菜单组")
|
||||
private Set<Long> menuIds;
|
||||
|
||||
/**
|
||||
* 部门组(数据权限)
|
||||
*/
|
||||
@ApiModelProperty("部门组(数据权限)")
|
||||
private Long[] deptIds;
|
||||
|
||||
public Role toRole() {
|
||||
return Role.builder()
|
||||
.roleId(roleId)
|
||||
.roleName(roleName)
|
||||
.roleKey(roleKey)
|
||||
.roleSort(roleSort)
|
||||
.dataScope(dataScope)
|
||||
.state(state)
|
||||
.delFlag("0")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package cn.fateverse.admin.dto;
|
||||
|
||||
import cn.fateverse.admin.entity.UserBase;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/7
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户返回实体")
|
||||
public class UserDto{
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@NotBlank(message = "用户名称不能为空")
|
||||
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@NotBlank(message = "用户昵称不能为空")
|
||||
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 岗位ids
|
||||
*/
|
||||
@ApiModelProperty("岗位ids")
|
||||
private List<Long> postIds;
|
||||
/**
|
||||
* 角色ids
|
||||
*/
|
||||
@ApiModelProperty("角色ids")
|
||||
private List<Long> roleIds;
|
||||
|
||||
|
||||
public UserBase toUser() {
|
||||
return UserBase.builder()
|
||||
.userId(userId)
|
||||
.deptId(deptId)
|
||||
.userName(userName)
|
||||
.nickName(nickName)
|
||||
.email(email)
|
||||
.phoneNumber(phoneNumber)
|
||||
.sex(sex)
|
||||
.password(password)
|
||||
.state(state)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.fateverse.admin.dubbo;
|
||||
|
||||
import cn.fateverse.admin.vo.DeptVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-02-20
|
||||
*/
|
||||
public interface DubboDeptService {
|
||||
/**
|
||||
* 通过部门id获取到部门信息
|
||||
*
|
||||
* @param deptIds 部门列表
|
||||
* @return 返回部门信息
|
||||
*/
|
||||
List<DeptVo> searchDeptByDeptId(List<Long> deptIds);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.fateverse.admin.dubbo;
|
||||
|
||||
import cn.fateverse.admin.vo.DictDataVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-02-20
|
||||
*/
|
||||
|
||||
public interface DubboDictDataService {
|
||||
|
||||
/**
|
||||
* 获取到字典缓存
|
||||
*
|
||||
* @param cacheKeys 字典缓存key
|
||||
* @return 映射完成的字典对象
|
||||
*/
|
||||
Map<String, Map<String, DictDataVo>> searchDictDataCacheKeys(List<String> cacheKeys);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package cn.fateverse.admin.dubbo;
|
||||
|
||||
import cn.fateverse.admin.dto.MenuDto;
|
||||
import cn.fateverse.admin.vo.MenuVo;
|
||||
import cn.fateverse.admin.vo.RouterVo;
|
||||
import cn.fateverse.common.core.result.Result;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-02-20
|
||||
*/
|
||||
public interface DubboMenuService {
|
||||
/**
|
||||
* 获取到用户的菜单权限信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 当前用户的权限信息
|
||||
*/
|
||||
Set<String> selectMenuPermsByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 保存登录信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 当前用户的路由信息
|
||||
*/
|
||||
List<RouterVo> selectMenuRouterByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 新增菜单
|
||||
*
|
||||
* @param menuDto 菜单对象
|
||||
* @return 操作结果
|
||||
*/
|
||||
Result<Long> insertMenu(MenuDto menuDto);
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
*
|
||||
* @param menuId 菜单id
|
||||
*/
|
||||
void removeMenu(Long menuId);
|
||||
|
||||
/**
|
||||
* 根据id查询父级菜单信息
|
||||
*
|
||||
* @param menuId 父级菜单
|
||||
* @return 菜单信息
|
||||
*/
|
||||
Result<MenuVo> selectMenuByMenuId(Long menuId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.fateverse.admin.dubbo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-05-06
|
||||
*/
|
||||
public interface DubboRoleService {
|
||||
|
||||
/**
|
||||
* 根据角色id获取到角色name
|
||||
*
|
||||
* @param roleIds 角色id
|
||||
* @return 角色名称
|
||||
*/
|
||||
List<String> searchRoleNameByIds(List<Long> roleIds);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package cn.fateverse.admin.dubbo;
|
||||
|
||||
import cn.fateverse.admin.entity.User;
|
||||
import cn.fateverse.admin.vo.UserVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-02-20
|
||||
*/
|
||||
|
||||
public interface DubboUserService {
|
||||
/**
|
||||
* 通过用户名查询用户信息
|
||||
*
|
||||
* @param username 用户名称
|
||||
* @return 用户信息
|
||||
*/
|
||||
User getUserByUsername(String username);
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 用户信息
|
||||
*/
|
||||
User getUserByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据roleId查询用户列表
|
||||
*
|
||||
* @param roleIds 角色id列表
|
||||
* @return 用户信息列表
|
||||
*/
|
||||
List<UserVo> searchUserListByRoleIds(List<Long> roleIds);
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户信息
|
||||
*
|
||||
* @param userIds 用户id列表
|
||||
* @return 用户信息列表
|
||||
*/
|
||||
List<UserVo> searchUserListByUserIds(List<Long> userIds);
|
||||
|
||||
/**
|
||||
* 根据部门id查询用户信息
|
||||
*
|
||||
* @param deptIds 部门信息列表
|
||||
* @return 部门列表
|
||||
*/
|
||||
List<UserVo> searchUserByDeptIds(List<Long> deptIds);
|
||||
|
||||
/**
|
||||
* 获取所有的用户id
|
||||
*
|
||||
* @return 所有用户的id
|
||||
*/
|
||||
List<Long> searchAllUserIds();
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* 参数配置表对象 sys_config
|
||||
*
|
||||
* @author clay
|
||||
* @date 2023-06-09
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EnableAutoField
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Config extends BaseEntity{
|
||||
|
||||
/**
|
||||
* 参数主键
|
||||
*/
|
||||
private Integer configId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 参数键值
|
||||
*/
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 系统内置(1是 0否)
|
||||
*/
|
||||
private Integer configType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 部门表 sys_dept
|
||||
*
|
||||
* @author Clay
|
||||
* @date 2022/10/30
|
||||
*/
|
||||
@Data
|
||||
@EnableAutoField
|
||||
public class Dept extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 父部门ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 祖级列表
|
||||
*/
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@NotBlank(message = "部门名称不能为空!")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@NotNull(message = "显示顺序不能为空!")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@NotBlank(message = "负责人不能为空!")
|
||||
private String leader;
|
||||
|
||||
/**
|
||||
* 负责人id
|
||||
*/
|
||||
@NotNull(message = "负责人id不能为空!")
|
||||
private Long leaderId;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Pattern(message = "手机号格式错误!",regexp = "^1[0-9]{10}$")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Email(message = "邮箱格式错误!")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 部门状态:1正常,0停用
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.admin.dto.DictDataDto;
|
||||
import cn.fateverse.admin.vo.DictDataSimpVo;
|
||||
import cn.fateverse.admin.vo.DictDataVo;
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import cn.fateverse.common.core.entity.Option;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EnableAutoField
|
||||
public class DictData extends BaseEntity {
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
private Long dictCode;
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
private Integer dictSort;
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
private String dictLabel;
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
private String dictValue;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dictType;
|
||||
/**
|
||||
* 样式属性(其他样式扩展)
|
||||
*/
|
||||
private Boolean isType;
|
||||
/**
|
||||
* 表格回显样式
|
||||
*/
|
||||
private String listClass;
|
||||
/**
|
||||
* 字典显示主题(ui框架时)or文字颜色(自定义颜色时)
|
||||
*/
|
||||
private String theme;
|
||||
/**
|
||||
* 是否默认(Y是 N否)
|
||||
*/
|
||||
private Integer isDefault;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
public static DictData toDictData(DictDataDto dto) {
|
||||
return DictData.builder()
|
||||
.dictCode(dto.getDictCode())
|
||||
.dictSort(dto.getDictSort())
|
||||
.dictLabel(dto.getDictLabel())
|
||||
.dictValue(dto.getDictValue())
|
||||
.dictType(dto.getDictType())
|
||||
.isType(dto.getIsType())
|
||||
.listClass(dto.getListClass())
|
||||
.theme(dto.getTheme())
|
||||
.isDefault(dto.getIsDefault())
|
||||
.state(dto.getState())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static DictDataVo toDictDataListVo(DictData dict) {
|
||||
return DictDataVo.builder()
|
||||
.dictCode(dict.getDictCode())
|
||||
.dictLabel(dict.getDictLabel())
|
||||
.dictSort(dict.getDictSort())
|
||||
.dictValue(dict.getDictValue())
|
||||
.dictType(dict.getDictType())
|
||||
.isDefault(dict.getIsDefault())
|
||||
.isType(dict.getIsType())
|
||||
.state(dict.getState())
|
||||
.listClass(dict.getListClass())
|
||||
.theme(dict.getTheme())
|
||||
.createTime(dict.getCreateTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典对象转换成为Option对象
|
||||
*
|
||||
* @param dictData 字典对象
|
||||
* @return Option选项
|
||||
*/
|
||||
public static Option dictDataToOption(DictData dictData) {
|
||||
return Option.builder()
|
||||
.value(dictData.getDictValue())
|
||||
.label(dictData.getDictLabel())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 将DictData对象转换为DictDataVo对象
|
||||
*
|
||||
* @param dict 待转换的DictData对象
|
||||
* @return 转换后的DictDataVo对象
|
||||
*/
|
||||
public static DictDataVo toDictDataVo(DictData dict) {
|
||||
DictDataVo dataVo = new DictDataVo();
|
||||
BeanUtils.copyProperties(dict, dataVo);
|
||||
return dataVo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 字典对象转换成为简单的字典返回Vo
|
||||
*
|
||||
* @param dictData 字典对象
|
||||
* @return 简单vo对象
|
||||
*/
|
||||
public static DictDataSimpVo toDictDataSimpVo(DictData dictData) {
|
||||
return DictDataSimpVo.builder()
|
||||
.label(dictData.getDictLabel())
|
||||
.value(dictData.getDictValue())
|
||||
.isType(dictData.getIsType())
|
||||
.listClass(dictData.getListClass())
|
||||
.theme(dictData.getTheme())
|
||||
.isDefault(dictData.getIsDefault())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
@EnableAutoField
|
||||
@ApiModel("字典类型实体")
|
||||
public class DictType extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 字典主键
|
||||
*/
|
||||
@ApiModelProperty("字典主键")
|
||||
private Long dictId;
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@ApiModelProperty("字典名称")
|
||||
@NotNull(message = "字典名称不能为空!")
|
||||
private String dictName;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
@NotNull(message = "字典类型不能为空!")
|
||||
private String dictType;
|
||||
/**
|
||||
* 字典状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("字典状态")
|
||||
@NotNull(message = "字典状态不能为空!")
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.admin.vo.IpBackVo;
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-10-22
|
||||
*/
|
||||
@Data
|
||||
@EnableAutoField
|
||||
public class IpBack extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
private String ipAddr;
|
||||
/**
|
||||
* ip类型 ipv4 ipv6
|
||||
*/
|
||||
private String type;
|
||||
|
||||
public IpBackVo toIPBackVo(){
|
||||
return IpBackVo.builder()
|
||||
.id(id)
|
||||
.ipAddr(ipAddr)
|
||||
.type(type)
|
||||
.createTime(getCreateTime())
|
||||
.remark(getRemark())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 菜单权限表 sys_menu
|
||||
*
|
||||
* @author Clay
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EnableAutoField
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Menu extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String menuName;
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 路径参数
|
||||
*/
|
||||
private String pathParams;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 是否为外链(1是 0否)
|
||||
*/
|
||||
private Boolean isFrame;
|
||||
|
||||
/**
|
||||
* 是否缓存(1 缓存 0不缓存)
|
||||
*/
|
||||
private Boolean isCache;
|
||||
|
||||
|
||||
private Boolean noRedirect;
|
||||
|
||||
|
||||
private Boolean breadcrumb;
|
||||
/**
|
||||
* 类型(D目录 M菜单 B按钮)
|
||||
*/
|
||||
private String menuType;
|
||||
|
||||
/**
|
||||
* 显示状态(1显示 0隐藏)
|
||||
*/
|
||||
private String visible;
|
||||
|
||||
/**
|
||||
* 菜单状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 权限字符串
|
||||
*/
|
||||
private String perms;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/13
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("在线用户实体")
|
||||
public class OnlineUser {
|
||||
|
||||
/**
|
||||
* 会话id
|
||||
*/
|
||||
@ApiModelProperty("会话id")
|
||||
private String tokenId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty("用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
/**
|
||||
* 登录ip
|
||||
*/
|
||||
@ApiModelProperty("登录ip")
|
||||
private String ipAddr;
|
||||
/**
|
||||
* 登录地点
|
||||
*/
|
||||
@ApiModelProperty("登录地点")
|
||||
private String loginLocation;
|
||||
/**
|
||||
* 浏览器类型
|
||||
*/
|
||||
@ApiModelProperty("浏览器类型")
|
||||
private String browser;
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@ApiModelProperty("操作系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
@ApiModelProperty("登录时间")
|
||||
private Date loginTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/26
|
||||
*/
|
||||
@Data
|
||||
@EnableAutoField
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Post extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
private Long postId;
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
private String postCode;
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
private String postName;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer postSort;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Clay
|
||||
* @date 2022/10/30
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EnableAutoField
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Role extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 角色关键词
|
||||
*/
|
||||
private String roleKey;
|
||||
|
||||
/**
|
||||
* 角色排序
|
||||
*/
|
||||
private Integer roleSort;
|
||||
|
||||
/**
|
||||
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)
|
||||
*/
|
||||
private String dataScope;
|
||||
|
||||
/**
|
||||
* 角色状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String delFlag;
|
||||
|
||||
private Integer roleType = 0;
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isAdmin() {
|
||||
return isAdmin(this.roleId);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public static boolean isAdmin(Long roleId) {
|
||||
return roleId != null && 1L == roleId;
|
||||
}
|
||||
|
||||
public Role(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/6
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class RoleMenu {
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Long roleId;
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
private Long menuId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/10/27
|
||||
*/
|
||||
@Data
|
||||
public class User extends UserBase {
|
||||
|
||||
|
||||
/**
|
||||
* 部门对象
|
||||
*/
|
||||
private Dept dept;
|
||||
|
||||
/**
|
||||
* 角色对象
|
||||
*/
|
||||
private List<Role> roles;
|
||||
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isAdmin() {
|
||||
return isAdmin(super.getUserId());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public static boolean isAdmin(Long userId) {
|
||||
return userId != null && 1L == userId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.EnableAutoField;
|
||||
import cn.fateverse.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/7
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EnableAutoField
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserBase extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 盐加密
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String salt;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String delFlag;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 一个微信开放平台帐号下的应用,同一用户的 union
|
||||
*/
|
||||
private String unionId;
|
||||
/**
|
||||
* 用户唯一标识
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
private Date loginDate;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/26
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class UserPost {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Long postId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.fateverse.admin.entity;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/6
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class UserRole {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 参数配置表对象 sys_config
|
||||
*
|
||||
* @author clay
|
||||
* @date 2023-06-09
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("参数配置表Query")
|
||||
public class ConfigQuery {
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@ApiModelProperty("参数名称")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
@ApiModelProperty("参数键名")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 系统内置(1是 0否)
|
||||
*/
|
||||
@ApiModelProperty("系统内置(1是 0否)")
|
||||
private Integer configType;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
public class DictDataQuery {
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty(value = "字典名称",required = true)
|
||||
private String dictType;
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@ApiModelProperty("字典标签")
|
||||
private String dictLabel;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import cn.fateverse.common.core.entity.QueryTime;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
public class DictTypeQuery extends QueryTime {
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@ApiModelProperty("字典名称")
|
||||
private String dictName;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import cn.fateverse.common.core.annotaion.Excel;
|
||||
import cn.fateverse.common.core.entity.QueryTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-10-22
|
||||
*/
|
||||
@Data
|
||||
public class IpBackQuery extends QueryTime {
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
private String ipAddr;
|
||||
|
||||
/**
|
||||
* ip类型 ipv4 ipv6
|
||||
*/
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2024/2/5 14:35
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("接口开关Query")
|
||||
public class MappingSwitchQuery {
|
||||
|
||||
@ApiModelProperty("应用名称")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty("类别名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("方法名称")
|
||||
private String methodName;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PostQuery {
|
||||
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
@ApiModelProperty("岗位编码")
|
||||
private String postCode;
|
||||
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@ApiModelProperty("岗位名称")
|
||||
private String postName;
|
||||
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(1正常 0停用)")
|
||||
private String state;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import cn.fateverse.common.core.entity.QueryTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/4
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("角色查询实体")
|
||||
public class RoleQuery extends QueryTime {
|
||||
/**
|
||||
* 权限字符
|
||||
*/
|
||||
@ApiModelProperty("角色名称")
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 权限字符
|
||||
*/
|
||||
@ApiModelProperty("权限字符")
|
||||
private String roleKey;
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.fateverse.admin.query;
|
||||
|
||||
import cn.fateverse.common.core.entity.QueryTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户查询对象")
|
||||
public class UserQuery extends QueryTime {
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@ApiModelProperty("部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.Config;
|
||||
import cn.fateverse.common.core.annotaion.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 参数配置表对象 sys_config
|
||||
*
|
||||
* @author clay
|
||||
* @date 2023-06-09
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("参数配置表Vo")
|
||||
public class ConfigVo {
|
||||
|
||||
/**
|
||||
* 参数主键
|
||||
*/
|
||||
@ApiModelProperty("参数主键")
|
||||
private Integer configId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@ApiModelProperty("参数名称")
|
||||
@Excel("参数名称")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
@ApiModelProperty("参数键名")
|
||||
@Excel("参数键名")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 参数键值
|
||||
*/
|
||||
@ApiModelProperty("参数键值")
|
||||
@Excel("参数键值")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 系统内置(1是 0否)
|
||||
*/
|
||||
@ApiModelProperty("系统内置(1是 0否)")
|
||||
@Excel("系统内置(1是 0否)")
|
||||
private Integer configType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
@Excel("备注")
|
||||
private String remark;
|
||||
|
||||
public static ConfigVo toConfigVo(Config config) {
|
||||
return ConfigVo.builder()
|
||||
.configId(config.getConfigId())
|
||||
.configName(config.getConfigName())
|
||||
.configKey(config.getConfigKey())
|
||||
.configValue(config.getConfigValue())
|
||||
.configType(config.getConfigType())
|
||||
.remark(config.getRemark())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DeptVo implements Serializable {
|
||||
|
||||
/**
|
||||
* 父部门名称
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String leader;
|
||||
/**
|
||||
* 负责人Id
|
||||
*/
|
||||
private Long leaderId;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 部门状态:1正常,0停用
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 子节点
|
||||
*/
|
||||
private List<DeptVo> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.DictData;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/11
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("Cache字典数据实体")
|
||||
public class DictDataSimpVo {
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@ApiModelProperty("字典标签")
|
||||
@NotNull(message = "字典标签不能为空!")
|
||||
private String label;
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
@ApiModelProperty("字典键值")
|
||||
@NotNull(message = "字典键值不能为空!")
|
||||
private String value;
|
||||
/**
|
||||
* 样式属性(其他样式扩展)
|
||||
*/
|
||||
@ApiModelProperty("样式属性(其他样式扩展)")
|
||||
private Boolean isType;
|
||||
/**
|
||||
* 表格回显样式
|
||||
*/
|
||||
@ApiModelProperty("表格回显样式")
|
||||
private String listClass;
|
||||
/**
|
||||
* 字典显示主题(ui框架时)or文字颜色(自定义颜色时)
|
||||
*/
|
||||
@ApiModelProperty("字典显示主题(ui框架时)or文字颜色(自定义颜色时)")
|
||||
private String theme;
|
||||
/**
|
||||
* 是否默认(Y是 N否)
|
||||
*/
|
||||
@ApiModelProperty("是否默认(Y是 N否)")
|
||||
private Integer isDefault;
|
||||
|
||||
|
||||
/**
|
||||
* 字典对象转换成为简单的字典返回Vo
|
||||
*
|
||||
* @param dictData 字典对象
|
||||
* @return 简单vo对象
|
||||
*/
|
||||
public static DictDataSimpVo dictDataToDictDataVo(DictData dictData) {
|
||||
return DictDataSimpVo.builder()
|
||||
.label(dictData.getDictLabel())
|
||||
.value(dictData.getDictValue())
|
||||
.isType(dictData.getIsType())
|
||||
.listClass(dictData.getListClass())
|
||||
.isDefault(dictData.getIsDefault())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据返回vo
|
||||
*
|
||||
* @author Clay
|
||||
* @date 2023/05/18
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DictDataVo implements Serializable {
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
private Long dictCode;
|
||||
/**
|
||||
* 字典排序
|
||||
*/
|
||||
@ApiModelProperty("字典排序")
|
||||
private Integer dictSort;
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
@ApiModelProperty("字典标签")
|
||||
private String dictLabel;
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
@ApiModelProperty("字典键值")
|
||||
private String dictValue;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
/**
|
||||
* 样式属性(其他样式扩展)
|
||||
*/
|
||||
@ApiModelProperty("样式属性(其他样式扩展)")
|
||||
private Boolean isType;
|
||||
/**
|
||||
* 表格回显样式
|
||||
*/
|
||||
@ApiModelProperty("表格回显样式")
|
||||
private String listClass;
|
||||
/**
|
||||
* 字典显示主题(ui框架时)or文字颜色(自定义颜色时)
|
||||
*/
|
||||
@ApiModelProperty("字典显示主题(ui框架时)or文字颜色(自定义颜色时)")
|
||||
private String theme;
|
||||
/**
|
||||
* 是否默认(Y是 N否)
|
||||
*/
|
||||
@ApiModelProperty("是否默认(Y是 N否)")
|
||||
private Integer isDefault;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("字典返回实体")
|
||||
public class DictTypeVo {
|
||||
/**
|
||||
* 字典id
|
||||
*/
|
||||
@ApiModelProperty("字典id")
|
||||
private Long dictId;
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@ApiModelProperty("字典名称")
|
||||
private String dictName;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.IpBack;
|
||||
import cn.fateverse.common.core.annotaion.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-10-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("ip黑名单")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IpBackVo {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty("主键id")
|
||||
@Excel("id")
|
||||
private Long id;
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
@ApiModelProperty("ip地址")
|
||||
@Excel("ip地址")
|
||||
private String ipAddr;
|
||||
/**
|
||||
* ip类型 ipv4 ipv6
|
||||
*/
|
||||
@ApiModelProperty("ip类型 ipv4 ipv6")
|
||||
@Excel("ip类型 ipv4 ipv6")
|
||||
private String type;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Excel("备注信息")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@Excel("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
public static IpBackVo toIpBackVo(IpBack ipBack) {
|
||||
return IpBackVo.builder()
|
||||
.id(ipBack.getId())
|
||||
.ipAddr(ipBack.getIpAddr())
|
||||
.type(ipBack.getType())
|
||||
.remark(ipBack.getRemark())
|
||||
.createTime(ipBack.getCreateTime())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/5
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("菜单返回实体")
|
||||
public class MenuSimpVo {
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty("菜单ID")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty("菜单名称")
|
||||
private String menuName;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty("菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
|
||||
@ApiModelProperty("显示顺序")
|
||||
private String menuType;
|
||||
|
||||
/**
|
||||
* 权限字符串
|
||||
*/
|
||||
@ApiModelProperty("权限字符串")
|
||||
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
|
||||
private String perms;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
@ApiModelProperty("组件路径")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 菜单状态(0显示 1隐藏)
|
||||
*/
|
||||
@ApiModelProperty("菜单状态(0显示 1隐藏)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private List<MenuSimpVo> children;
|
||||
|
||||
}
|
||||
104
admin/admin-api/src/main/java/cn/fateverse/admin/vo/MenuVo.java
Normal file
104
admin/admin-api/src/main/java/cn/fateverse/admin/vo/MenuVo.java
Normal file
@@ -0,0 +1,104 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 菜单详细返回对象
|
||||
*
|
||||
* @author Clay
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("菜单")
|
||||
public class MenuVo implements Serializable {
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@ApiModelProperty("菜单ID")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@ApiModelProperty("菜单名称")
|
||||
private String menuName;
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@ApiModelProperty("父菜单ID")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
@ApiModelProperty("路由地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("路径参数")
|
||||
private String pathParams;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
@ApiModelProperty("组件路径")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 是否为外链(0是 1否)
|
||||
*/
|
||||
@ApiModelProperty("是否为外链(0是 1否)")
|
||||
private Boolean isFrame;
|
||||
|
||||
/**
|
||||
* 是否缓存(0缓存 1不缓存)
|
||||
*/
|
||||
@ApiModelProperty("是否缓存(0缓存 1不缓存)")
|
||||
private Boolean isCache;
|
||||
|
||||
@ApiModelProperty("不重定向")
|
||||
private Boolean noRedirect;
|
||||
|
||||
@ApiModelProperty("面包屑")
|
||||
private Boolean breadcrumb;
|
||||
/**
|
||||
* 类型(D目录 M菜单 B按钮)
|
||||
*/
|
||||
@ApiModelProperty("类型(D目录 M菜单 B按钮)")
|
||||
private String menuType;
|
||||
|
||||
/**
|
||||
* 显示状态(0显示 1隐藏)
|
||||
*/
|
||||
@ApiModelProperty("显示状态(0显示 1隐藏)")
|
||||
private String visible;
|
||||
|
||||
/**
|
||||
* 菜单状态(0显示 1隐藏)
|
||||
*/
|
||||
@ApiModelProperty("菜单状态(0显示 1隐藏)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 权限字符串
|
||||
*/
|
||||
@ApiModelProperty("权限字符串")
|
||||
private String perms;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@ApiModelProperty("菜单图标")
|
||||
private String icon;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/10/30
|
||||
*/
|
||||
@Data
|
||||
public class MetaVo implements Serializable {
|
||||
/**
|
||||
* 设置该路由在侧边栏和面包屑中展示的名字
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 设置该路由的图标,对应路径src/assets/icons/svg
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 设置为true,则不会被 <keep-alive>缓存
|
||||
*/
|
||||
private Boolean noCache;
|
||||
|
||||
/**
|
||||
* 是否重定向
|
||||
*/
|
||||
private Boolean noRedirect;
|
||||
|
||||
/**
|
||||
* 是否开起面包屑
|
||||
*/
|
||||
private Boolean breadcrumb;
|
||||
|
||||
private Boolean isFrame;
|
||||
|
||||
public MetaVo() {
|
||||
}
|
||||
|
||||
public MetaVo(String title, String icon) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public MetaVo(String title, String icon, Boolean noCache) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.noCache = noCache;
|
||||
}
|
||||
|
||||
public MetaVo(String title, String icon, Boolean noCache, Boolean noRedirect, Boolean breadcrumb,Boolean isFrame) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.noCache = noCache;
|
||||
this.noRedirect = noRedirect;
|
||||
this.breadcrumb = breadcrumb;
|
||||
this.isFrame = isFrame;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.common.core.entity.OptionTree;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/6
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("角色修改时菜单返回实体")
|
||||
public class OptionMenuVo {
|
||||
|
||||
@ApiModelProperty("已选择的")
|
||||
private Set<Long> checked;
|
||||
@ApiModelProperty("菜单选择option")
|
||||
private List<OptionTree> menuOption;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.Post;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-05-05
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("岗位实体")
|
||||
public class PostVo {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@ApiModelProperty("岗位ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 岗位编码
|
||||
*/
|
||||
@ApiModelProperty("岗位编码")
|
||||
@NotNull(message = "岗位编码不能为空!")
|
||||
private String postCode;
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@ApiModelProperty("岗位名称")
|
||||
@NotNull(message = "岗位名称不能为空!")
|
||||
private String postName;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
@NotNull(message = "显示顺序不能为空!")
|
||||
private Integer postSort;
|
||||
/**
|
||||
* 状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("状态(1正常 0停用)")
|
||||
@NotNull(message = "状态不能为空!")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
|
||||
public static PostVo toPostVo(Post post){
|
||||
return PostVo.builder()
|
||||
.postId(post.getPostId())
|
||||
.postCode(post.getPostCode())
|
||||
.postName(post.getPostName())
|
||||
.postSort(post.getPostSort())
|
||||
.state(post.getState())
|
||||
.createTime(post.getCreateTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.Role;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-05-26
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoleVo {
|
||||
|
||||
@ApiModelProperty("角色id")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
private String roleName;
|
||||
|
||||
|
||||
@ApiModelProperty("角色权限字符串")
|
||||
private String roleKey;
|
||||
|
||||
@ApiModelProperty("角色排序")
|
||||
private Integer roleSort;
|
||||
|
||||
/**
|
||||
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)
|
||||
*/
|
||||
@ApiModelProperty("数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限)")
|
||||
private String dataScope;
|
||||
|
||||
/**
|
||||
* 角色状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("角色状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 菜单组
|
||||
*/
|
||||
@ApiModelProperty("菜单组")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
private Set<Long> menuIds;
|
||||
|
||||
/**
|
||||
* 部门组(数据权限)
|
||||
*/
|
||||
@ApiModelProperty("部门组(数据权限)")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
private Long[] deptIds;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
public static RoleVo toRoleVo(Role role){
|
||||
return RoleVo.builder()
|
||||
.roleId(role.getRoleId())
|
||||
.roleName(role.getRoleName())
|
||||
.roleKey(role.getRoleKey())
|
||||
.roleSort(role.getRoleSort())
|
||||
.dataScope(role.getDataScope())
|
||||
.state(role.getState())
|
||||
.createTime(role.getCreateTime())
|
||||
.updateTime(role.getUpdateTime())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/10/30
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RouterVo implements Serializable {
|
||||
/**
|
||||
* 路由名字
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
private String path;
|
||||
/**
|
||||
* 路径参数
|
||||
*/
|
||||
private String pathParams;
|
||||
|
||||
/**
|
||||
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
|
||||
*/
|
||||
private boolean hidden;
|
||||
|
||||
/**
|
||||
* 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
|
||||
*/
|
||||
@JsonInclude(NON_NULL)
|
||||
private String redirect;
|
||||
|
||||
/**
|
||||
* 组件地址
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
|
||||
*/
|
||||
@JsonInclude(NON_NULL)
|
||||
private Boolean alwaysShow;
|
||||
|
||||
/**
|
||||
* 其他元素
|
||||
*/
|
||||
private MetaVo meta;
|
||||
|
||||
/**
|
||||
* 子路由
|
||||
*/
|
||||
@JsonInclude(NON_NULL)
|
||||
private List<RouterVo> children;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.Role;
|
||||
import cn.fateverse.admin.entity.Dept;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2023-03-02
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class UserChooseVo {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer type;
|
||||
|
||||
private String value;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private List<UserChooseVo> children;
|
||||
|
||||
|
||||
public static UserChooseVo toUserChooseByDept(Dept dept, Long id) {
|
||||
return UserChooseVo.builder()
|
||||
.id(dept.getDeptId())
|
||||
.type(2)
|
||||
.value(id + "-" + dept.getDeptId())
|
||||
.children(new ArrayList<>())
|
||||
.name(dept.getDeptName())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UserChooseVo toUserChooseByRole(Role role) {
|
||||
return UserChooseVo.builder()
|
||||
.id(role.getRoleId())
|
||||
.type(1)
|
||||
.value("0-" + role.getRoleId())
|
||||
.children(new ArrayList<>())
|
||||
.name(role.getRoleName())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UserChooseVo toUserChooseByUser(UserVo user, long id) {
|
||||
return UserChooseVo.builder()
|
||||
.id(user.getUserId())
|
||||
.type(0)
|
||||
.value(id + "-" + user.getUserId())
|
||||
.children(new ArrayList<>())
|
||||
.avatar(user.getAvatar())
|
||||
.name(user.getNickName())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.fateverse.admin.entity.User;
|
||||
import cn.fateverse.common.core.entity.Option;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/4
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel("用户详细信息")
|
||||
public class UserDetailVo {
|
||||
@ApiModelProperty("用户基本细腻系")
|
||||
private User user;
|
||||
|
||||
@ApiModelProperty("用户所在的岗位")
|
||||
private List<Long> postIds;
|
||||
|
||||
@ApiModelProperty("岗位option选择数组")
|
||||
private List<Option> postList;
|
||||
|
||||
@ApiModelProperty("用户所拥有的的角色信息")
|
||||
private List<Long> roleIds;
|
||||
|
||||
@ApiModelProperty("角色option选择数组")
|
||||
private List<Option> roleList;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package cn.fateverse.admin.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author Clay
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户返回实体")
|
||||
public class UserVo implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
private Long leaderDeptId;
|
||||
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userName;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private String email;
|
||||
|
||||
private String userType;
|
||||
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ApiModelProperty("用户昵称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 帐号状态(1正常 0停用)
|
||||
*/
|
||||
@ApiModelProperty("帐号状态(1正常 0停用)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
public boolean checkEmail(){
|
||||
if (StrUtil.isEmpty(email)){
|
||||
return false;
|
||||
}
|
||||
Pattern pattern =Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
|
||||
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");
|
||||
return pattern.matcher(email).matches();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user