fix: 从新生成NoticeStatus模块
从新生成NoticeStatus模块。并开始写相关代码。
This commit is contained in:
@@ -22,7 +22,7 @@ import jakarta.validation.Valid;
|
|||||||
* 用户公告状态前端控制层
|
* 用户公告状态前端控制层
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Tag(name = "用户公告状态接口")
|
@Tag(name = "用户公告状态接口")
|
||||||
@RestController
|
@RestController
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.youlai.system.model.form.NoticeStatusForm;
|
|||||||
* 用户公告状态对象转换器
|
* 用户公告状态对象转换器
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Mapper(componentModel = "spring")
|
@Mapper(componentModel = "spring")
|
||||||
public interface NoticeStatusConverter{
|
public interface NoticeStatusConverter{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
* 用户公告状态Mapper接口
|
* 用户公告状态Mapper接口
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface NoticeStatusMapper extends BaseMapper<NoticeStatus> {
|
public interface NoticeStatusMapper extends BaseMapper<NoticeStatus> {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.youlai.system.common.base.BaseEntity;
|
|||||||
* 用户公告状态实体对象
|
* 用户公告状态实体对象
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import jakarta.validation.constraints.*;
|
|||||||
* 用户公告状态表单对象
|
* 用户公告状态表单对象
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户公告状态分页查询对象
|
* 用户公告状态分页查询对象
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Schema(description ="用户公告状态查询对象")
|
@Schema(description ="用户公告状态查询对象")
|
||||||
@Getter
|
@Getter
|
||||||
@@ -18,4 +19,15 @@ import java.time.LocalDateTime;
|
|||||||
public class NoticeStatusQuery extends BasePageQuery {
|
public class NoticeStatusQuery extends BasePageQuery {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
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 List<String> readTiem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
|||||||
* 用户公告状态视图对象
|
* 用户公告状态视图对象
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -22,4 +22,14 @@ public class NoticeStatusVO implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
* 用户公告状态服务类
|
* 用户公告状态服务类
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
public interface NoticeStatusService extends IService<NoticeStatus> {
|
public interface NoticeStatusService extends IService<NoticeStatus> {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
* 用户公告状态服务实现类
|
* 用户公告状态服务实现类
|
||||||
*
|
*
|
||||||
* @author youlaitech
|
* @author youlaitech
|
||||||
* @since 2024-08-27 09:53
|
* @since 2024-08-28 16:56
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|||||||
@@ -5,9 +5,36 @@
|
|||||||
<!-- 获取用户公告状态分页列表 -->
|
<!-- 获取用户公告状态分页列表 -->
|
||||||
<select id="getNoticeStatusPage" resultType="com.youlai.system.model.vo.NoticeStatusVO">
|
<select id="getNoticeStatusPage" resultType="com.youlai.system.model.vo.NoticeStatusVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
id,
|
||||||
|
notice_id,
|
||||||
|
user_id,
|
||||||
|
read_status,
|
||||||
|
read_tiem
|
||||||
FROM
|
FROM
|
||||||
sys_notice_status
|
sys_notice_status
|
||||||
<where>
|
<where>
|
||||||
|
<if test="queryParams.id != null">
|
||||||
|
AND id = #{queryParams.id}
|
||||||
|
</if>
|
||||||
|
<if test="queryParams.noticeId != null">
|
||||||
|
AND notice_id = #{queryParams.noticeId}
|
||||||
|
</if>
|
||||||
|
<if test="queryParams.userId != null">
|
||||||
|
AND user_id = #{queryParams.userId}
|
||||||
|
</if>
|
||||||
|
<if test="queryParams.readStatus != null">
|
||||||
|
AND read_status = #{queryParams.readStatus}
|
||||||
|
</if>
|
||||||
|
<if test="queryParams.readTiem != null">
|
||||||
|
<if test="queryParams.readTiem[0] != null and queryParams.readTiem[0] != ''">
|
||||||
|
<bind name="startDate" value="queryParams.readTiem[0].length() == 10 ? queryParams.readTiem[0] + ' 00:00:00' : queryParams.readTiem[0]"/>
|
||||||
|
AND read_tiem >= #{startDate}
|
||||||
|
</if>
|
||||||
|
<if test="queryParams.readTiem[1] != null and queryParams.readTiem[1] != ''">
|
||||||
|
<bind name="endDate" value="queryParams.readTiem[1].length() == 10 ? queryParams.readTiem[1] + ' 23:59:59' : queryParams.readTiem[1]"/>
|
||||||
|
AND read_tiem <= #{endDate}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user