mirror of
				https://github.com/suyiiyii/SIMS.git
				synced 2025-11-04 15:54:52 +08:00 
			
		
		
		
	表
This commit is contained in:
		
							parent
							
								
									4fb6e0566b
								
							
						
					
					
						commit
						d5e1fb4db7
					
				@ -13,3 +13,9 @@ Super Invincible Management System
 | 
			
		||||
8. require review: 请求review
 | 
			
		||||
9. merge: 合并 PR
 | 
			
		||||
10. delete: 删除分支
 | 
			
		||||
 | 
			
		||||
1. 基础rbac的五张表: user, role, permission, user_role, role_permission
 | 
			
		||||
2. 然后奖惩记录这张表,通过用户id来查到,里面有相应的记录, 有一个 奖惩类别ID是对应到奖惩类型去的
 | 
			
		||||
3. 有一个上下级关系表,想着是用户明确查上下级就可以用查,
 | 
			
		||||
4. 然后就是附件,是通过奖惩记录的id来存一个路径,然后前端通过这个路径来获取附件,同样的上传的时候也是
 | 
			
		||||
5. 通知是这样子想的,有上传的人的id和接收的人的id,然后有状态(已读,未读),然后有附件的路径,然后有通知内容,然后有通知时间,然后有通知类型(奖惩,通知)
 | 
			
		||||
							
								
								
									
										5
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								pom.xml
									
									
									
									
									
								
							@ -46,6 +46,11 @@
 | 
			
		||||
            <scope>runtime</scope>
 | 
			
		||||
            <optional>true</optional>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.tangzc</groupId>
 | 
			
		||||
            <artifactId>mybatis-plus-ext-boot-starter</artifactId>
 | 
			
		||||
            <version>3.5.5-EXT560</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.mysql</groupId>
 | 
			
		||||
            <artifactId>mysql-connector-j</artifactId>
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
package top.suyiiyii.sims;
 | 
			
		||||
 | 
			
		||||
import com.tangzc.mpe.autotable.EnableAutoTable;
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
 | 
			
		||||
@EnableAutoTable
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
public class SimsApplication {
 | 
			
		||||
 | 
			
		||||
    public static void main(String[] args) {
 | 
			
		||||
        SpringApplication.run(SimsApplication.class, args);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										26
									
								
								src/main/java/top/suyiiyii/sims/entity/Attachment.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								src/main/java/top/suyiiyii/sims/entity/Attachment.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 15:44
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: Attachment
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class Attachment {
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    private Integer recordId;
 | 
			
		||||
    // 文件路径
 | 
			
		||||
    private String filePath;
 | 
			
		||||
    // 文件名
 | 
			
		||||
    private String fileName;
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,31 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 15:45
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: HierarchyRelation
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class HierarchyRelation {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
 | 
			
		||||
    // 上级用户ID
 | 
			
		||||
    private Integer superiorUserId;
 | 
			
		||||
 | 
			
		||||
    // 下级用户ID
 | 
			
		||||
    private Integer subordinateUserId;
 | 
			
		||||
 | 
			
		||||
    // 关系类型
 | 
			
		||||
    private String relationType;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								src/main/java/top/suyiiyii/sims/entity/Notification.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								src/main/java/top/suyiiyii/sims/entity/Notification.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,28 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 22:22
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: Notification
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class Notification {
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    private String title;
 | 
			
		||||
    private String content;
 | 
			
		||||
    private Integer senderId;
 | 
			
		||||
    private LocalDateTime createdAt;
 | 
			
		||||
    private String status;
 | 
			
		||||
    private String type;
 | 
			
		||||
    private Integer targetUserId;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										26
									
								
								src/main/java/top/suyiiyii/sims/entity/Permissions.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								src/main/java/top/suyiiyii/sims/entity/Permissions.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:03
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: Permissions
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class Permissions {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    //权限id
 | 
			
		||||
    private Integer permissionId;
 | 
			
		||||
    // 权限描述
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,28 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 15:43
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: RewardPunishmentCategory
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class RewardPunishmentCategory {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
 | 
			
		||||
    private Integer categoryId;
 | 
			
		||||
    // 类别名称
 | 
			
		||||
    private String categoryName;
 | 
			
		||||
    // 类别说明
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,54 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:04
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: RewardPunishmentRecord
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class RewardPunishmentRecord {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    // 用户ID
 | 
			
		||||
    private Integer userId;
 | 
			
		||||
    // 奖惩类型
 | 
			
		||||
    private String type;
 | 
			
		||||
    // 奖惩类别ID
 | 
			
		||||
    private Integer categoryId;
 | 
			
		||||
    // 奖惩日期
 | 
			
		||||
    private LocalDateTime date;
 | 
			
		||||
    // 奖惩内容
 | 
			
		||||
    private String content;
 | 
			
		||||
    // 奖惩原因
 | 
			
		||||
    private String reason;
 | 
			
		||||
    // 奖惩金额
 | 
			
		||||
    private Double amount;
 | 
			
		||||
    // 奖惩备注
 | 
			
		||||
    private String remark;
 | 
			
		||||
    // 是否撤销
 | 
			
		||||
    private Boolean isRevoked;
 | 
			
		||||
    // 撤销日期
 | 
			
		||||
    private LocalDateTime revokeDate;
 | 
			
		||||
    // 撤销原因
 | 
			
		||||
    private String revokeReason;
 | 
			
		||||
    // 撤销备注
 | 
			
		||||
    private String revokeRemark;
 | 
			
		||||
    // 操作人ID
 | 
			
		||||
    private Integer operatorUserId;
 | 
			
		||||
    // 最近一次更新时间
 | 
			
		||||
    private LocalDateTime lastUpdateTime;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										24
									
								
								src/main/java/top/suyiiyii/sims/entity/Role.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/main/java/top/suyiiyii/sims/entity/Role.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:02
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: Role
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class Role {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    private Integer roleId;
 | 
			
		||||
    private String roleName;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								src/main/java/top/suyiiyii/sims/entity/RolePermission.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/main/java/top/suyiiyii/sims/entity/RolePermission.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.security.Permission;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:03
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: RolePermission
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class RolePermission {
 | 
			
		||||
    private Integer rolePermissionId;
 | 
			
		||||
    private Integer roleId;
 | 
			
		||||
    private Integer permissionId;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										29
									
								
								src/main/java/top/suyiiyii/sims/entity/User.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/main/java/top/suyiiyii/sims/entity/User.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,29 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:02
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: User
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class User {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    private Integer userId;
 | 
			
		||||
    private String username;
 | 
			
		||||
    private String password;
 | 
			
		||||
    private String name;
 | 
			
		||||
    private String email;
 | 
			
		||||
    private String group;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								src/main/java/top/suyiiyii/sims/entity/UserRole.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/main/java/top/suyiiyii/sims/entity/UserRole.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
package top.suyiiyii.sims.entity;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Author tortoise
 | 
			
		||||
 * @Date 2024/8/9 14:02
 | 
			
		||||
 * @PackageName:top.suyiiyii.sims.entity
 | 
			
		||||
 * @ClassName: UserRole
 | 
			
		||||
 * @Description: TODO
 | 
			
		||||
 * @Version 1.0
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@Table
 | 
			
		||||
public class UserRole {
 | 
			
		||||
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    private Integer userId;
 | 
			
		||||
    private Integer roleId;
 | 
			
		||||
}
 | 
			
		||||
@ -1 +0,0 @@
 | 
			
		||||
spring.application.name=SIMS
 | 
			
		||||
							
								
								
									
										0
									
								
								src/main/resources/mapper/UserMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/main/resources/mapper/UserMapper.xml
									
									
									
									
									
										Normal file
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user