mirror of
https://github.com/suyiiyii/SIMS.git
synced 2026-06-23 15:46:53 +08:00
feat: 创建表
* 表 * 二级分类 * chore: 更新mybatis-plus扩展启动器版本 * 添加了实现成员申请撤销记录,管理员撤销的表 * chore: 更新mybatis-plus扩展启动器版本 * 用通知来解决:普通成员可以向管理员申请撤销某一个奖惩记录,管理员可以查看所有撤销申请,并决定是否撤销该记录 然后,那个职务的问题,我觉得可以直接放到role里面,HierarchyRelation表就只记录上下级关系 --------- Co-authored-by: suyiiyii <suyiiyii@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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,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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user