18339543638 3 роки тому
батько
коміт
e03f72bce9

+ 7 - 0
nb-im/src/main/java/com/nb/im/service/dto/ImRoomQuery.java

@@ -1,5 +1,8 @@
 package com.nb.im.service.dto;
 
+import cn.hutool.core.date.DateUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -36,4 +39,8 @@ public class ImRoomQuery {
 
     @ApiModelProperty("聊天内容")
     private String record;
+
+    @ApiModelProperty(value = "成功建立连接时间,默认查询30天以内的聊天室列表",hidden = true)
+    @JsonIgnoreProperties
+    private Date successTime= DateUtil.offsetDay(new Date(),-30);
 }

+ 1 - 1
nb-im/src/main/resources/mapper/im/ImRoomMapper.xml

@@ -54,10 +54,10 @@
         rm.payload as payload,
         rm.msg_type as msg_type,
         rm.operation_type as operation_type
-
         from
         (select * from im_room
         <where>
+            (success_time =null or success_time &g0t; #{query.successTime})
             <if test="query.doctorId != null">
                 and  doctor_id=#{query.doctorId}
             </if>