feat: 通知公告模块
通知公告模块编写。 完成代码生成部分的bug修改
This commit is contained in:
70
src/main/java/com/youlai/system/model/entity/Notice.java
Normal file
70
src/main/java/com/youlai/system/model/entity/Notice.java
Normal file
@@ -0,0 +1,70 @@
|
||||
package com.youlai.system.model.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
|
||||
/**
|
||||
* 通知公告实体对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("sys_notice")
|
||||
public class Notice extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 通知标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 通知类型
|
||||
*/
|
||||
private Integer noticeType;
|
||||
/**
|
||||
* 发布人
|
||||
*/
|
||||
private Long release;
|
||||
/**
|
||||
* 优先级(0-低 1-中 2-高)
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 目标类型(0-全体 1-指定)
|
||||
*/
|
||||
private Integer tarType;
|
||||
/**
|
||||
* 发布状态(0-未发布 1已发布 2已撤回)
|
||||
*/
|
||||
private Integer sendStatus;
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime sendTime;
|
||||
/**
|
||||
* 撤回时间
|
||||
*/
|
||||
private LocalDateTime recallTime;
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createBy;
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
private Long updateBy;
|
||||
/**
|
||||
* 逻辑删除标识(0-未删除 1-已删除)
|
||||
*/
|
||||
private Integer isDelete;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.youlai.system.model.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户公告状态实体对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("sys_notice_status")
|
||||
public class NoticeStatus extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 公共通知id
|
||||
*/
|
||||
private Long noticeId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 读取状态,0未读,1已读取
|
||||
*/
|
||||
private Long readStatus;
|
||||
/**
|
||||
* 用户阅读时间
|
||||
*/
|
||||
private LocalDateTime readTiem;
|
||||
}
|
||||
67
src/main/java/com/youlai/system/model/form/NoticeForm.java
Normal file
67
src/main/java/com/youlai/system/model/form/NoticeForm.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package com.youlai.system.model.form;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 通知公告表单对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "通知公告表单对象")
|
||||
public class NoticeForm implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "通知标题")
|
||||
@NotBlank(message = "通知标题不能为空")
|
||||
@Size(max=50, message="通知标题长度不能超过50个字符")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "通知内容")
|
||||
@NotBlank(message = "通知内容不能为空")
|
||||
@Size(max=65535, message="通知内容长度不能超过65535个字符")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "通知类型")
|
||||
@NotNull(message = "通知类型不能为空")
|
||||
private Integer noticeType;
|
||||
|
||||
@Schema(description = "发布人")
|
||||
@NotNull(message = "发布人不能为空")
|
||||
private Long release;
|
||||
|
||||
@Schema(description = "优先级(0-低 1-中 2-高)")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "目标类型(0-全体 1-指定)")
|
||||
private Integer tarType;
|
||||
|
||||
@Schema(description = "发布状态(0-未发布 1已发布 2已撤回)")
|
||||
private Integer sendStatus;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
@NotNull(message = "发布时间不能为空")
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
@Schema(description = "撤回时间")
|
||||
@NotNull(message = "撤回时间不能为空")
|
||||
private LocalDateTime recallTime;
|
||||
|
||||
@Schema(description = "创建人ID")
|
||||
private Long createBy;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.youlai.system.model.form;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户公告状态表单对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "用户公告状态表单对象")
|
||||
public class NoticeStatusForm implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "公共通知id")
|
||||
private Long noticeId;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "读取状态,0未读,1已读取")
|
||||
private Long readStatus;
|
||||
|
||||
@Schema(description = "用户阅读时间")
|
||||
private LocalDateTime readTiem;
|
||||
|
||||
|
||||
}
|
||||
50
src/main/java/com/youlai/system/model/query/NoticeQuery.java
Normal file
50
src/main/java/com/youlai/system/model/query/NoticeQuery.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.youlai.system.model.query;
|
||||
|
||||
import com.youlai.system.common.base.BasePageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告分页查询对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Schema(description ="通知公告查询对象")
|
||||
@Getter
|
||||
@Setter
|
||||
public class NoticeQuery extends BasePageQuery {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long id;
|
||||
@Schema(description = "通知标题")
|
||||
private String title;
|
||||
@Schema(description = "通知内容")
|
||||
private String content;
|
||||
@Schema(description = "通知类型")
|
||||
private Integer noticeType;
|
||||
@Schema(description = "发布人")
|
||||
private Long release;
|
||||
@Schema(description = "优先级(0-低 1-中 2-高)")
|
||||
private Integer priority;
|
||||
@Schema(description = "目标类型(0-全体 1-指定)")
|
||||
private Integer tarType;
|
||||
@Schema(description = "发布状态(0-未发布 1已发布 2已撤回)")
|
||||
private Integer sendStatus;
|
||||
@Schema(description = "发布时间")
|
||||
private LocalDateTime sendTime;
|
||||
@Schema(description = "撤回时间")
|
||||
private LocalDateTime recallTime;
|
||||
@Schema(description = "创建人ID")
|
||||
private Long createBy;
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "更新人ID")
|
||||
private Long updateBy;
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
@Schema(description = "逻辑删除标识(0-未删除 1-已删除)")
|
||||
private Integer isDelete;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.youlai.system.model.query;
|
||||
|
||||
import com.youlai.system.common.base.BasePageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户公告状态分页查询对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Schema(description ="用户公告状态查询对象")
|
||||
@Getter
|
||||
@Setter
|
||||
public class NoticeStatusQuery extends BasePageQuery {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
@Schema(description = "公共通知id")
|
||||
private Long noticeId;
|
||||
@Schema(description = "用户id")
|
||||
private Integer userId;
|
||||
@Schema(description = "读取状态,0未读,1已读取")
|
||||
private Long readStatus;
|
||||
@Schema(description = "用户阅读时间")
|
||||
private LocalDateTime readTiem;
|
||||
}
|
||||
33
src/main/java/com/youlai/system/model/vo/NoticeStatusVO.java
Normal file
33
src/main/java/com/youlai/system/model/vo/NoticeStatusVO.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.youlai.system.model.vo;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户公告状态视图对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema( description = "用户公告状态视图对象")
|
||||
public class NoticeStatusVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "公共通知id")
|
||||
private Long noticeId;
|
||||
@Schema(description = "用户id")
|
||||
private Integer userId;
|
||||
@Schema(description = "读取状态,0未读,1已读取")
|
||||
private Long readStatus;
|
||||
@Schema(description = "用户阅读时间")
|
||||
private LocalDateTime readTiem;
|
||||
}
|
||||
41
src/main/java/com/youlai/system/model/vo/NoticeVO.java
Normal file
41
src/main/java/com/youlai/system/model/vo/NoticeVO.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.youlai.system.model.vo;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告视图对象
|
||||
*
|
||||
* @author youlaitech
|
||||
* @since 2024-08-08 11:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema( description = "通知公告视图对象")
|
||||
public class NoticeVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "通知标题")
|
||||
private String title;
|
||||
@Schema(description = "通知内容")
|
||||
private String content;
|
||||
@Schema(description = "通知类型")
|
||||
private Integer noticeType;
|
||||
@Schema(description = "发布人")
|
||||
private Long release;
|
||||
@Schema(description = "优先级(0-低 1-中 2-高)")
|
||||
private Integer priority;
|
||||
@Schema(description = "目标类型(0-全体 1-指定)")
|
||||
private Integer tarType;
|
||||
@Schema(description = "发布状态(0-未发布 1已发布 2已撤回)")
|
||||
private Integer sendStatus;
|
||||
@Schema(description = "发布时间")
|
||||
private LocalDateTime sendTime;
|
||||
}
|
||||
Reference in New Issue
Block a user