Commit 49660f52 authored by fangxinjiang's avatar fangxinjiang

消息提醒

parent f864fb81
......@@ -22,10 +22,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
......@@ -86,7 +84,7 @@ public class MsgInfo {
@Length(max = 1, message = "0 未阅 1 已阅不能超过1个字符")
@ExcelProperty("0 未阅 1 已阅")
@Schema(description = "0 未阅 1 已阅")
private String read;
private String readStatus;
/**
* 提醒人
*/
......
......@@ -16,7 +16,6 @@
*/
package com.yifu.cloud.plus.v1.msg.service.impl;
import cn.hutool.json.JSONObject;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -124,11 +123,11 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
public void updateOverTimeMsg() {
// 1. 删除未读的超时,如果有继续生成
baseMapper.delete(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getRead,CommonConstants.ZERO_STRING)
.eq(MsgInfo::getReadStatus,CommonConstants.ZERO_STRING)
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
List<MsgInfo> temps = baseMapper.selectList(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING)
.eq(MsgInfo::getRead,CommonConstants.ONE_STRING));
.eq(MsgInfo::getReadStatus,CommonConstants.ONE_STRING));
Map<String,MsgInfo> tempMap = new HashMap<>();
if (Common.isNotNull(temps)){
for (MsgInfo msg:temps){
......
......@@ -30,7 +30,7 @@
<result property="orderNo" column="ORDER_NO"/>
<result property="alertType" column="ALERT_TYPE"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="read" column="READ"/>
<result property="readStatus" column="READ_STATUS"/>
<result property="alertUser" column="ALERT_USER"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -40,7 +40,7 @@
a.ORDER_NO,
a.ALERT_TYPE,
a.CREATE_TIME,
a.READ,
a.READ_STATUS,
a.ALERT_USER
</sql>
<sql id="msgInfo_where">
......@@ -63,8 +63,8 @@
<if test="msgInfo.createTime != null">
AND a.CREATE_TIME = #{msgInfo.createTime}
</if>
<if test="msgInfo.read != null and msgInfo.read.trim() != ''">
AND a.READ = #{msgInfo.read}
<if test="msgInfo.readStatus != null and msgInfo.readStatus.trim() != ''">
AND a.READ_STATUS = #{msgInfo.readStatus}
</if>
<if test="msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{msgInfo.alertUser}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment