mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-02 00:16:11 +08:00
feat: 创建表
* 表 * 二级分类 * chore: 更新mybatis-plus扩展启动器版本 * 添加了实现成员申请撤销记录,管理员撤销的表 * chore: 更新mybatis-plus扩展启动器版本 * 用通知来解决:普通成员可以向管理员申请撤销某一个奖惩记录,管理员可以查看所有撤销申请,并决定是否撤销该记录 然后,那个职务的问题,我觉得可以直接放到role里面,HierarchyRelation表就只记录上下级关系 --------- Co-authored-by: suyiiyii <suyiiyii@gmail.com>
This commit is contained in:
parent
f23e9c2818
commit
ce69219012
@ -13,3 +13,10 @@ 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,然后有状态(已读,未读),然后有附件的路径,然后有通知内容,然后有通知时间,然后有通知类型(奖惩,通知)
|
||||
6. RevokeRequest: 存普通成员提出的撤销申请,跟踪申请状态 RevokedRecord: 存储管理员对奖惩记录的撤销信息,包括撤销原因
|
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-spring-boot3-starter</artifactId>
|
||||
<version>3.5.7-EXT691</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
|
@ -1,11 +1,11 @@
|
||||
package top.suyiiyii.sims;
|
||||
|
||||
import com.tangzc.autotable.springboot.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);
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package top.suyiiyii.sims.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class HelloController {
|
||||
|
||||
@ -10,4 +13,10 @@ public class HelloController {
|
||||
public String hello(String username) {
|
||||
return "Hello " + username;
|
||||
}
|
||||
@PostMapping("/hello")
|
||||
public List<String> helloPost(String username , Integer age) {
|
||||
List<String> list = List.of(username,age.toString());
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
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,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 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;
|
||||
|
||||
}
|
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;
|
||||
|
||||
}
|
31
src/main/java/top/suyiiyii/sims/entity/RevokeRequest.java
Normal file
31
src/main/java/top/suyiiyii/sims/entity/RevokeRequest.java
Normal file
@ -0,0 +1,31 @@
|
||||
package top.suyiiyii.sims.entity;
|
||||
|
||||
import com.tangzc.mpe.autotable.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author tortoise
|
||||
* @Date 2024/8/10 0:31
|
||||
* @PackageName:top.suyiiyii.sims.entity
|
||||
* @ClassName: RevokeRequest
|
||||
* @Description: 存储普通成员提出的奖惩撤销申请,并跟踪申请状态
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class RevokeRequest {
|
||||
|
||||
private Integer id;
|
||||
private Integer recordId;
|
||||
private Integer userId;
|
||||
private String reason;
|
||||
private LocalDateTime requestTime;
|
||||
private String status;
|
||||
//处理时间
|
||||
private LocalDateTime handleTime;
|
||||
private String adminRemark;
|
||||
|
||||
}
|
||||
|
31
src/main/java/top/suyiiyii/sims/entity/RevokedRecord.java
Normal file
31
src/main/java/top/suyiiyii/sims/entity/RevokedRecord.java
Normal file
@ -0,0 +1,31 @@
|
||||
package top.suyiiyii.sims.entity;
|
||||
|
||||
import com.tangzc.mpe.autotable.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author tortoise
|
||||
* @Date 2024/8/10 0:34
|
||||
* @PackageName:top.suyiiyii.sims.entity
|
||||
* @ClassName: RevokedRecord
|
||||
* @Description: 存储管理员对奖惩记录的撤销信息,包括撤销原因
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class RevokedRecord {
|
||||
|
||||
private Integer id;
|
||||
// 被撤销的奖惩记录ID
|
||||
private Integer recordId;
|
||||
// 撤销操作的管理员ID
|
||||
private Integer adminId;
|
||||
// 撤销原因
|
||||
private String reason;
|
||||
// 撤销时间
|
||||
private LocalDateTime revokedTime;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
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 subCategoryName;
|
||||
// 类别说明
|
||||
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;
|
||||
|
||||
|
||||
}
|
25
src/main/java/top/suyiiyii/sims/entity/Role.java
Normal file
25
src/main/java/top/suyiiyii/sims/entity/Role.java
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user