Jelajahi Sumber

创建系统管理实体

laowo 4 tahun lalu
induk
melakukan
61087eef9f

+ 7 - 5
pom.xml

@@ -15,6 +15,12 @@
         <version>2.1.4.RELEASE</version>
     </parent>
     <dependencies>
+        <!--spring配置-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
@@ -69,11 +75,7 @@
             <artifactId>shiro-spring</artifactId>
             <version>1.5.2</version>
         </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-            <optional>true</optional>
-        </dependency>
+
 
         <dependency>
             <groupId>org.apache.commons</groupId>

+ 1 - 1
src/main/java/com/usky/aspect/AutoLogAspect.java

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.serializer.PropertyFilter;
 import com.usky.annotion.AutoLog;
 import com.usky.constant.CommonConstant;
-import com.usky.entity.sys.SysLogDTO;
+import com.usky.entity.sys.log.SysLogDTO;
 import com.usky.service.log.LogService;
 import com.usky.utils.IPUtils;
 import com.usky.utils.SpringContextUtils;

+ 33 - 0
src/main/java/com/usky/controller/sys/SysController.java

@@ -0,0 +1,33 @@
+package com.usky.controller.sys;
+
+import com.usky.entity.sys.SysDeptDTO;
+import com.usky.service.sys.SysService;
+import com.usky.utils.Result;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:49
+ * @description TODO
+ **/
+@RestController
+@RequestMapping("sys")
+@Api(tags = "系统管理")
+public class SysController {
+
+    @Autowired
+    private SysService sysService;
+
+    @GetMapping("test")
+    public Result<List<SysDeptDTO>> test() {
+        List<SysDeptDTO> data = sysService.test();
+        return Result.OK(data);
+    }
+}

+ 202 - 0
src/main/java/com/usky/entity/sys/SysDeptDTO.java

@@ -0,0 +1,202 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_dept", schema = "jx_cover", catalog = "")
+@ApiModel(value = "部门DTO")
+public class SysDeptDTO {
+    @ApiModelProperty("部门id")
+    private long deptId;
+    @ApiModelProperty("父级部门id")
+    private Long parentId;
+    @ApiModelProperty("祖级部门")
+    private String ancestors;
+    @ApiModelProperty("部门名称")
+    private String deptName;
+    @ApiModelProperty("显示排序")
+    private Integer orderNum;
+    @ApiModelProperty("负责人")
+    private String leader;
+    @ApiModelProperty("联系方式")
+    private String phone;
+    @ApiModelProperty("联系邮箱")
+    private String email;
+    @ApiModelProperty("部门状态 0 正常 1停用")
+    private String status;
+    @ApiModelProperty("删除标记 0未删除 1 已删除")
+    private String delFlag;
+    @ApiModelProperty("创建人")
+    private String createBy;
+    @ApiModelProperty("创建时间")
+    private Timestamp createTime;
+    @ApiModelProperty("更新人")
+    private String updateBy;
+    @ApiModelProperty("更新时间")
+    private Timestamp updateTime;
+
+    @Id
+    @Column(name = "dept_id", nullable = false)
+    public long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Basic
+    @Column(name = "parent_id", nullable = true)
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    @Basic
+    @Column(name = "ancestors", nullable = true, length = 50)
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
+    @Basic
+    @Column(name = "dept_name", nullable = true, length = 30)
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    @Basic
+    @Column(name = "order_num", nullable = true)
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    @Basic
+    @Column(name = "leader", nullable = true, length = 20)
+    public String getLeader() {
+        return leader;
+    }
+
+    public void setLeader(String leader) {
+        this.leader = leader;
+    }
+
+    @Basic
+    @Column(name = "phone", nullable = true, length = 11)
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    @Basic
+    @Column(name = "email", nullable = true, length = 50)
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    @Basic
+    @Column(name = "status", nullable = true, length = 1)
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Basic
+    @Column(name = "del_flag", nullable = true, length = 1)
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Basic
+    @Column(name = "create_by", nullable = true, length = 64)
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Basic
+    @Column(name = "create_time", nullable = true)
+    public Timestamp getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Timestamp createTime) {
+        this.createTime = createTime;
+    }
+
+    @Basic
+    @Column(name = "update_by", nullable = true, length = 64)
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Basic
+    @Column(name = "update_time", nullable = true)
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysDeptDTO that = (SysDeptDTO) o;
+        return deptId == that.deptId && Objects.equals(parentId, that.parentId) && Objects.equals(ancestors, that.ancestors) && Objects.equals(deptName, that.deptName) && Objects.equals(orderNum, that.orderNum) && Objects.equals(leader, that.leader) && Objects.equals(phone, that.phone) && Objects.equals(email, that.email) && Objects.equals(status, that.status) && Objects.equals(delFlag, that.delFlag) && Objects.equals(createBy, that.createBy) && Objects.equals(createTime, that.createTime) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateTime, that.updateTime);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(deptId, parentId, ancestors, deptName, orderNum, leader, phone, email, status, delFlag, createBy, createTime, updateBy, updateTime);
+    }
+}

+ 225 - 0
src/main/java/com/usky/entity/sys/SysMenuDTO.java

@@ -0,0 +1,225 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_menu", schema = "jx_cover", catalog = "")
+@ApiModel(value = "系统-菜单DTO")
+public class SysMenuDTO {
+    @ApiModelProperty("菜单id")
+    private long menuId;
+    @ApiModelProperty("菜单名称")
+    private String menuName;
+    @ApiModelProperty("父级id")
+    private Long parentId;
+    @ApiModelProperty("菜单显示排序")
+    private Integer orderNum;
+    @ApiModelProperty("请求地址")
+    private String url;
+    @ApiModelProperty("打开方式menuItem页签 menuBlank新窗口")
+    private String target;
+    @ApiModelProperty("菜单类型(M目录 C菜单 F按钮)")
+    private String menuType;
+    @ApiModelProperty("菜单状态(0显示 1隐藏)")
+    private String visible;
+    @ApiModelProperty("是否刷新(0刷新 1不刷新)")
+    private String isRefresh;
+    @ApiModelProperty("权限标识")
+    private String perms;
+    @ApiModelProperty("菜单图标")
+    private String icon;
+    @ApiModelProperty("创建人")
+    private String createBy;
+    @ApiModelProperty("创建时间")
+    private Timestamp createTime;
+    @ApiModelProperty("更新人")
+    private String updateBy;
+    @ApiModelProperty("更新时间")
+    private Timestamp updateTime;
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @Id
+    @Column(name = "menu_id", nullable = false)
+    public long getMenuId() {
+        return menuId;
+    }
+
+    public void setMenuId(long menuId) {
+        this.menuId = menuId;
+    }
+
+    @Basic
+    @Column(name = "menu_name", nullable = false, length = 50)
+    public String getMenuName() {
+        return menuName;
+    }
+
+    public void setMenuName(String menuName) {
+        this.menuName = menuName;
+    }
+
+    @Basic
+    @Column(name = "parent_id", nullable = true)
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    @Basic
+    @Column(name = "order_num", nullable = true)
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    @Basic
+    @Column(name = "url", nullable = true, length = 200)
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    @Basic
+    @Column(name = "target", nullable = true, length = 20)
+    public String getTarget() {
+        return target;
+    }
+
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    @Basic
+    @Column(name = "menu_type", nullable = true, length = 1)
+    public String getMenuType() {
+        return menuType;
+    }
+
+    public void setMenuType(String menuType) {
+        this.menuType = menuType;
+    }
+
+    @Basic
+    @Column(name = "visible", nullable = true, length = 1)
+    public String getVisible() {
+        return visible;
+    }
+
+    public void setVisible(String visible) {
+        this.visible = visible;
+    }
+
+    @Basic
+    @Column(name = "is_refresh", nullable = true, length = 1)
+    public String getIsRefresh() {
+        return isRefresh;
+    }
+
+    public void setIsRefresh(String isRefresh) {
+        this.isRefresh = isRefresh;
+    }
+
+    @Basic
+    @Column(name = "perms", nullable = true, length = 100)
+    public String getPerms() {
+        return perms;
+    }
+
+    public void setPerms(String perms) {
+        this.perms = perms;
+    }
+
+    @Basic
+    @Column(name = "icon", nullable = true, length = 100)
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    @Basic
+    @Column(name = "create_by", nullable = true, length = 64)
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Basic
+    @Column(name = "create_time", nullable = true)
+    public Timestamp getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Timestamp createTime) {
+        this.createTime = createTime;
+    }
+
+    @Basic
+    @Column(name = "update_by", nullable = true, length = 64)
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Basic
+    @Column(name = "update_time", nullable = true)
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Basic
+    @Column(name = "remark", nullable = true, length = 500)
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysMenuDTO that = (SysMenuDTO) o;
+        return menuId == that.menuId && Objects.equals(menuName, that.menuName) && Objects.equals(parentId, that.parentId) && Objects.equals(orderNum, that.orderNum) && Objects.equals(url, that.url) && Objects.equals(target, that.target) && Objects.equals(menuType, that.menuType) && Objects.equals(visible, that.visible) && Objects.equals(isRefresh, that.isRefresh) && Objects.equals(perms, that.perms) && Objects.equals(icon, that.icon) && Objects.equals(createBy, that.createBy) && Objects.equals(createTime, that.createTime) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateTime, that.updateTime) && Objects.equals(remark, that.remark);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(menuId, menuName, parentId, orderNum, url, target, menuType, visible, isRefresh, perms, icon, createBy, createTime, updateBy, updateTime, remark);
+    }
+}

+ 154 - 0
src/main/java/com/usky/entity/sys/SysPostDTO.java

@@ -0,0 +1,154 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_post", schema = "jx_cover", catalog = "")
+@ApiModel(value = "系统-岗位信息DTO")
+public class SysPostDTO {
+    @ApiModelProperty("岗位id")
+    private long postId;
+    @ApiModelProperty("岗位编码")
+    private String postCode;
+    @ApiModelProperty("岗位名称")
+    private String postName;
+    @ApiModelProperty("岗位显示顺序")
+    private int postSort;
+    @ApiModelProperty("状态 0 正常 1 停用")
+    private String status;
+    @ApiModelProperty("创建人")
+    private String createBy;
+    @ApiModelProperty("创建时间")
+    private Timestamp createTime;
+    @ApiModelProperty("更新人")
+    private String updateBy;
+    @ApiModelProperty("更新时间")
+    private Timestamp updateTime;
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @Id
+    @Column(name = "post_id", nullable = false)
+    public long getPostId() {
+        return postId;
+    }
+
+    public void setPostId(long postId) {
+        this.postId = postId;
+    }
+
+    @Basic
+    @Column(name = "post_code", nullable = false, length = 64)
+    public String getPostCode() {
+        return postCode;
+    }
+
+    public void setPostCode(String postCode) {
+        this.postCode = postCode;
+    }
+
+    @Basic
+    @Column(name = "post_name", nullable = false, length = 50)
+    public String getPostName() {
+        return postName;
+    }
+
+    public void setPostName(String postName) {
+        this.postName = postName;
+    }
+
+    @Basic
+    @Column(name = "post_sort", nullable = false)
+    public int getPostSort() {
+        return postSort;
+    }
+
+    public void setPostSort(int postSort) {
+        this.postSort = postSort;
+    }
+
+    @Basic
+    @Column(name = "status", nullable = false, length = 1)
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Basic
+    @Column(name = "create_by", nullable = true, length = 64)
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Basic
+    @Column(name = "create_time", nullable = true)
+    public Timestamp getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Timestamp createTime) {
+        this.createTime = createTime;
+    }
+
+    @Basic
+    @Column(name = "update_by", nullable = true, length = 64)
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Basic
+    @Column(name = "update_time", nullable = true)
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Basic
+    @Column(name = "remark", nullable = true, length = 500)
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysPostDTO that = (SysPostDTO) o;
+        return postId == that.postId && postSort == that.postSort && Objects.equals(postCode, that.postCode) && Objects.equals(postName, that.postName) && Objects.equals(status, that.status) && Objects.equals(createBy, that.createBy) && Objects.equals(createTime, that.createTime) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateTime, that.updateTime) && Objects.equals(remark, that.remark);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(postId, postCode, postName, postSort, status, createBy, createTime, updateBy, updateTime, remark);
+    }
+}

+ 177 - 0
src/main/java/com/usky/entity/sys/SysRoleDTO.java

@@ -0,0 +1,177 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_role", schema = "jx_cover", catalog = "")
+@ApiModel(value = "角色DTO")
+public class SysRoleDTO {
+    @ApiModelProperty("角色id")
+    private long roleId;
+    @ApiModelProperty("角色名称")
+    private String roleName;
+    @ApiModelProperty("角色权限字符")
+    private String roleKey;
+    @ApiModelProperty("角色显示排序")
+    private int roleSort;
+    @ApiModelProperty("数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)")
+    private String dataScope;
+    @ApiModelProperty("角色状态(0正常 1停用)")
+    private String status;
+    @ApiModelProperty("删除标志(0代表存在 1代表删除)")
+    private String delFlag;
+    @ApiModelProperty("创建人")
+    private String createBy;
+    @ApiModelProperty("创建时间")
+    private Timestamp createTime;
+    @ApiModelProperty("更新人")
+    private String updateBy;
+    @ApiModelProperty("更新时间")
+    private Timestamp updateTime;
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @Id
+    @Column(name = "role_id", nullable = false)
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Basic
+    @Column(name = "role_name", nullable = false, length = 30)
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    @Basic
+    @Column(name = "role_key", nullable = false, length = 100)
+    public String getRoleKey() {
+        return roleKey;
+    }
+
+    public void setRoleKey(String roleKey) {
+        this.roleKey = roleKey;
+    }
+
+    @Basic
+    @Column(name = "role_sort", nullable = false)
+    public int getRoleSort() {
+        return roleSort;
+    }
+
+    public void setRoleSort(int roleSort) {
+        this.roleSort = roleSort;
+    }
+
+    @Basic
+    @Column(name = "data_scope", nullable = true, length = 1)
+    public String getDataScope() {
+        return dataScope;
+    }
+
+    public void setDataScope(String dataScope) {
+        this.dataScope = dataScope;
+    }
+
+    @Basic
+    @Column(name = "status", nullable = false, length = 1)
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Basic
+    @Column(name = "del_flag", nullable = true, length = 1)
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Basic
+    @Column(name = "create_by", nullable = true, length = 64)
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Basic
+    @Column(name = "create_time", nullable = true)
+    public Timestamp getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Timestamp createTime) {
+        this.createTime = createTime;
+    }
+
+    @Basic
+    @Column(name = "update_by", nullable = true, length = 64)
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Basic
+    @Column(name = "update_time", nullable = true)
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Basic
+    @Column(name = "remark", nullable = true, length = 500)
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysRoleDTO that = (SysRoleDTO) o;
+        return roleId == that.roleId && roleSort == that.roleSort && Objects.equals(roleName, that.roleName) && Objects.equals(roleKey, that.roleKey) && Objects.equals(dataScope, that.dataScope) && Objects.equals(status, that.status) && Objects.equals(delFlag, that.delFlag) && Objects.equals(createBy, that.createBy) && Objects.equals(createTime, that.createTime) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateTime, that.updateTime) && Objects.equals(remark, that.remark);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(roleId, roleName, roleKey, roleSort, dataScope, status, delFlag, createBy, createTime, updateBy, updateTime, remark);
+    }
+}

+ 53 - 0
src/main/java/com/usky/entity/sys/SysRoleDeptDTO.java

@@ -0,0 +1,53 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_role_dept", schema = "jx_cover", catalog = "")
+@IdClass(SysRoleDeptDTOPK.class)
+public class SysRoleDeptDTO {
+    private long roleId;
+    private long deptId;
+
+    @Id
+    @Column(name = "role_id", nullable = false)
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Id
+    @Column(name = "dept_id", nullable = false)
+    public long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysRoleDeptDTO that = (SysRoleDeptDTO) o;
+        return roleId == that.roleId && deptId == that.deptId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(roleId, deptId);
+    }
+}

+ 56 - 0
src/main/java/com/usky/entity/sys/SysRoleDeptDTOPK.java

@@ -0,0 +1,56 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@ApiModel(value = "角色部门DTO")
+public class SysRoleDeptDTOPK implements Serializable {
+    @ApiModelProperty("角色id")
+    private long roleId;
+    @ApiModelProperty("部门id")
+    private long deptId;
+
+    @Column(name = "role_id", nullable = false)
+    @Id
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Column(name = "dept_id", nullable = false)
+    @Id
+    public long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysRoleDeptDTOPK that = (SysRoleDeptDTOPK) o;
+        return roleId == that.roleId && deptId == that.deptId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(roleId, deptId);
+    }
+}

+ 51 - 0
src/main/java/com/usky/entity/sys/SysRoleMenuDTO.java

@@ -0,0 +1,51 @@
+package com.usky.entity.sys;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_role_menu", schema = "jx_cover", catalog = "")
+@IdClass(SysRoleMenuDTOPK.class)
+public class SysRoleMenuDTO {
+    private long roleId;
+    private long menuId;
+
+    @Id
+    @Column(name = "role_id", nullable = false)
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Id
+    @Column(name = "menu_id", nullable = false)
+    public long getMenuId() {
+        return menuId;
+    }
+
+    public void setMenuId(long menuId) {
+        this.menuId = menuId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysRoleMenuDTO that = (SysRoleMenuDTO) o;
+        return roleId == that.roleId && menuId == that.menuId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(roleId, menuId);
+    }
+}

+ 56 - 0
src/main/java/com/usky/entity/sys/SysRoleMenuDTOPK.java

@@ -0,0 +1,56 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@ApiModel(value = "角色-菜单DTO")
+public class SysRoleMenuDTOPK implements Serializable {
+    @ApiModelProperty("角色id")
+    private long roleId;
+    @ApiModelProperty("菜单ID")
+    private long menuId;
+
+    @Column(name = "role_id", nullable = false)
+    @Id
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Column(name = "menu_id", nullable = false)
+    @Id
+    public long getMenuId() {
+        return menuId;
+    }
+
+    public void setMenuId(long menuId) {
+        this.menuId = menuId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysRoleMenuDTOPK that = (SysRoleMenuDTOPK) o;
+        return roleId == that.roleId && menuId == that.menuId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(roleId, menuId);
+    }
+}

+ 263 - 0
src/main/java/com/usky/entity/sys/SysUserDTO.java

@@ -0,0 +1,263 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+
+@Entity
+@Table(name = "sys_user", schema = "jx_cover", catalog = "")
+public class SysUserDTO {
+    private long userId;
+    private Long deptId;
+    private String loginName;
+    private String userName;
+    private String userType;
+    private String email;
+    private String phonenumber;
+    private String sex;
+    private String avatar;
+    private String password;
+    private String salt;
+    private String status;
+    private String delFlag;
+    private String loginIp;
+    private Timestamp loginDate;
+    private Timestamp pwdUpdateDate;
+    private String createBy;
+    private Timestamp createTime;
+    private String updateBy;
+    private Timestamp updateTime;
+    private String remark;
+
+    @Id
+    @Column(name = "user_id", nullable = false)
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    @Basic
+    @Column(name = "dept_id", nullable = true)
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Basic
+    @Column(name = "login_name", nullable = false, length = 30)
+    public String getLoginName() {
+        return loginName;
+    }
+
+    public void setLoginName(String loginName) {
+        this.loginName = loginName;
+    }
+
+    @Basic
+    @Column(name = "user_name", nullable = true, length = 30)
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    @Basic
+    @Column(name = "user_type", nullable = true, length = 2)
+    public String getUserType() {
+        return userType;
+    }
+
+    public void setUserType(String userType) {
+        this.userType = userType;
+    }
+
+    @Basic
+    @Column(name = "email", nullable = true, length = 50)
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    @Basic
+    @Column(name = "phonenumber", nullable = true, length = 11)
+    public String getPhonenumber() {
+        return phonenumber;
+    }
+
+    public void setPhonenumber(String phonenumber) {
+        this.phonenumber = phonenumber;
+    }
+
+    @Basic
+    @Column(name = "sex", nullable = true, length = 1)
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    @Basic
+    @Column(name = "avatar", nullable = true, length = 100)
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    @Basic
+    @Column(name = "password", nullable = true, length = 50)
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Basic
+    @Column(name = "salt", nullable = true, length = 20)
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    @Basic
+    @Column(name = "status", nullable = true, length = 1)
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    @Basic
+    @Column(name = "del_flag", nullable = true, length = 1)
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Basic
+    @Column(name = "login_ip", nullable = true, length = 128)
+    public String getLoginIp() {
+        return loginIp;
+    }
+
+    public void setLoginIp(String loginIp) {
+        this.loginIp = loginIp;
+    }
+
+    @Basic
+    @Column(name = "login_date", nullable = true)
+    public Timestamp getLoginDate() {
+        return loginDate;
+    }
+
+    public void setLoginDate(Timestamp loginDate) {
+        this.loginDate = loginDate;
+    }
+
+    @Basic
+    @Column(name = "pwd_update_date", nullable = true)
+    public Timestamp getPwdUpdateDate() {
+        return pwdUpdateDate;
+    }
+
+    public void setPwdUpdateDate(Timestamp pwdUpdateDate) {
+        this.pwdUpdateDate = pwdUpdateDate;
+    }
+
+    @Basic
+    @Column(name = "create_by", nullable = true, length = 64)
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Basic
+    @Column(name = "create_time", nullable = true)
+    public Timestamp getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Timestamp createTime) {
+        this.createTime = createTime;
+    }
+
+    @Basic
+    @Column(name = "update_by", nullable = true, length = 64)
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Basic
+    @Column(name = "update_time", nullable = true)
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Basic
+    @Column(name = "remark", nullable = true, length = 500)
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysUserDTO that = (SysUserDTO) o;
+        return userId == that.userId && Objects.equals(deptId, that.deptId) && Objects.equals(loginName, that.loginName) && Objects.equals(userName, that.userName) && Objects.equals(userType, that.userType) && Objects.equals(email, that.email) && Objects.equals(phonenumber, that.phonenumber) && Objects.equals(sex, that.sex) && Objects.equals(avatar, that.avatar) && Objects.equals(password, that.password) && Objects.equals(salt, that.salt) && Objects.equals(status, that.status) && Objects.equals(delFlag, that.delFlag) && Objects.equals(loginIp, that.loginIp) && Objects.equals(loginDate, that.loginDate) && Objects.equals(pwdUpdateDate, that.pwdUpdateDate) && Objects.equals(createBy, that.createBy) && Objects.equals(createTime, that.createTime) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateTime, that.updateTime) && Objects.equals(remark, that.remark);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(userId, deptId, loginName, userName, userType, email, phonenumber, sex, avatar, password, salt, status, delFlag, loginIp, loginDate, pwdUpdateDate, createBy, createTime, updateBy, updateTime, remark);
+    }
+}

+ 51 - 0
src/main/java/com/usky/entity/sys/SysUserPostDTO.java

@@ -0,0 +1,51 @@
+package com.usky.entity.sys;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_user_post", schema = "jx_cover", catalog = "")
+@IdClass(SysUserPostDTOPK.class)
+public class SysUserPostDTO {
+    private long userId;
+    private long postId;
+
+    @Id
+    @Column(name = "user_id", nullable = false)
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    @Id
+    @Column(name = "post_id", nullable = false)
+    public long getPostId() {
+        return postId;
+    }
+
+    public void setPostId(long postId) {
+        this.postId = postId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysUserPostDTO that = (SysUserPostDTO) o;
+        return userId == that.userId && postId == that.postId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(userId, postId);
+    }
+}

+ 56 - 0
src/main/java/com/usky/entity/sys/SysUserPostDTOPK.java

@@ -0,0 +1,56 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@ApiModel(value = "系统-用户岗位表")
+public class SysUserPostDTOPK implements Serializable {
+    @ApiModelProperty("用户id")
+    private long userId;
+    @ApiModelProperty("岗位id")
+    private long postId;
+
+    @Column(name = "user_id", nullable = false)
+    @Id
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    @Column(name = "post_id", nullable = false)
+    @Id
+    public long getPostId() {
+        return postId;
+    }
+
+    public void setPostId(long postId) {
+        this.postId = postId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysUserPostDTOPK that = (SysUserPostDTOPK) o;
+        return userId == that.userId && postId == that.postId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(userId, postId);
+    }
+}

+ 51 - 0
src/main/java/com/usky/entity/sys/SysUserRoleDTO.java

@@ -0,0 +1,51 @@
+package com.usky.entity.sys;
+
+import javax.persistence.*;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@Entity
+@Table(name = "sys_user_role", schema = "jx_cover", catalog = "")
+@IdClass(SysUserRoleDTOPK.class)
+public class SysUserRoleDTO {
+    private long userId;
+    private long roleId;
+
+    @Id
+    @Column(name = "user_id", nullable = false)
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    @Id
+    @Column(name = "role_id", nullable = false)
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysUserRoleDTO that = (SysUserRoleDTO) o;
+        return userId == that.userId && roleId == that.roleId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(userId, roleId);
+    }
+}

+ 56 - 0
src/main/java/com/usky/entity/sys/SysUserRoleDTOPK.java

@@ -0,0 +1,56 @@
+package com.usky.entity.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@ApiModel(value = "系统-用户角色表")
+public class SysUserRoleDTOPK implements Serializable {
+    @ApiModelProperty("用户id")
+    private long userId;
+    @ApiModelProperty("角色id")
+    private long roleId;
+
+    @Column(name = "user_id", nullable = false)
+    @Id
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    @Column(name = "role_id", nullable = false)
+    @Id
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        SysUserRoleDTOPK that = (SysUserRoleDTOPK) o;
+        return userId == that.userId && roleId == that.roleId;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(userId, roleId);
+    }
+}

+ 1 - 1
src/main/java/com/usky/entity/sys/SysLogDTO.java → src/main/java/com/usky/entity/sys/log/SysLogDTO.java

@@ -1,4 +1,4 @@
-package com.usky.entity.sys;
+package com.usky.entity.sys.log;
 
 import javax.persistence.*;
 import java.sql.Timestamp;

+ 63 - 0
src/main/java/com/usky/entity/sys/vo/SysUserVO.java

@@ -0,0 +1,63 @@
+package com.usky.entity.sys.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Objects;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:03
+ * @description TODO
+ **/
+@ApiModel("系统-用户DTO")
+@Data
+public class SysUserVO {
+    @ApiModelProperty("用户id")
+    private long userId;
+    @ApiModelProperty("部门id")
+    private Long deptId;
+    @ApiModelProperty("登录名")
+    private String loginName;
+    @ApiModelProperty("用户名")
+    private String userName;
+    @ApiModelProperty("用户类型 0 系统用户 1 注册用户")
+    private String userType;
+    @ApiModelProperty("邮箱地址")
+    private String email;
+    @ApiModelProperty("手机号")
+    private String phonenumber;
+    @ApiModelProperty("用户性别(0男 1女 2未知)")
+    private String sex;
+    @ApiModelProperty("头像路径")
+    private String avatar;
+    @ApiModelProperty("密码")
+    private String password;
+    @ApiModelProperty("随机盐")
+    private String salt;
+    @ApiModelProperty("账户状态 0正常 1 停用")
+    private String status;
+    @ApiModelProperty("删除标准 0 未删除 1 已删除")
+    private String delFlag;
+    @ApiModelProperty("最后登录IP")
+    private String loginIp;
+    @ApiModelProperty("最后登录时间")
+    private Timestamp loginDate;
+    @ApiModelProperty("密码最后更新时间")
+    private Timestamp pwdUpdateDate;
+    @ApiModelProperty("创建人")
+    private String createBy;
+    @ApiModelProperty("创建时间")
+    private Timestamp createTime;
+    @ApiModelProperty("更新人")
+    private String updateBy;
+    @ApiModelProperty("更新时间")
+    private Timestamp updateTime;
+    @ApiModelProperty("备注")
+    private String remark;
+
+}

+ 1 - 1
src/main/java/com/usky/service/log/LogService.java

@@ -1,6 +1,6 @@
 package com.usky.service.log;
 
-import com.usky.entity.sys.SysLogDTO;
+import com.usky.entity.sys.log.SysLogDTO;
 
 public interface LogService {
     void addLog(SysLogDTO dto);

+ 1 - 1
src/main/java/com/usky/service/log/LogServiceImpl.java

@@ -1,7 +1,7 @@
 package com.usky.service.log;
 
 import com.usky.dao.impl.BaseDaoImpl;
-import com.usky.entity.sys.SysLogDTO;
+import com.usky.entity.sys.log.SysLogDTO;
 import org.springframework.stereotype.Service;
 
 /**

+ 16 - 0
src/main/java/com/usky/service/sys/SysService.java

@@ -0,0 +1,16 @@
+package com.usky.service.sys;
+
+import com.usky.entity.sys.SysDeptDTO;
+
+import java.util.List;
+
+/**
+ * @author laowo
+ */
+public interface SysService {
+    /**
+     * 测试
+     * @return
+     */
+    List<SysDeptDTO> test();
+}

+ 21 - 0
src/main/java/com/usky/service/sys/SysServiceImpl.java

@@ -0,0 +1,21 @@
+package com.usky.service.sys;
+
+import com.usky.dao.impl.BaseDaoImpl;
+import com.usky.entity.sys.SysDeptDTO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author laowo
+ * @version v1.0
+ * @date 2021/8/19 14:53
+ * @description TODO
+ **/
+@Service
+public class SysServiceImpl extends BaseDaoImpl implements SysService {
+    @Override
+    public List<SysDeptDTO> test() {
+        return getSession().createQuery("from SysDeptDTO ").list();
+    }
+}