Explorar o código

消息添加返回字段

caiaa hai 1 ano
pai
achega
b0789e1f8a

+ 2 - 1
src/main/java/com/dragon/tj/portal/auth/service/TokenService.java

@@ -62,7 +62,8 @@ public class TokenService {
                 if (StringUtils.isNotBlank(user)) {
                     return JSONUtil.toBean(user, LoginUser.class);
                 }
-            } catch (Exception ignore) {
+            } catch (Exception e) {
+                LOGGER.error("Get token info error", e);
             }
         }
         return null;

+ 3 - 0
src/main/java/com/dragon/tj/portal/entity/NoticeInfo.java

@@ -106,5 +106,8 @@ public class NoticeInfo implements Serializable {
     @TableField(exist = false)
     private Long targetId;
 
+    @TableField(exist = false)
+    private Integer readStatus;
+
 
 }

+ 4 - 4
src/main/resources/mapper/NoticeInfoMapper.xml

@@ -4,20 +4,20 @@
 
 
     <select id="queryPage" resultType="com.dragon.tj.portal.entity.NoticeInfo">
-        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,b.message_level, b.create_user, b.create_time
+        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,b.message_level, b.create_user, b.create_time,a.read_status
         from notice_info_scope a
         LEFT JOIN notice_info b on a.notice_info_id = b.id
         where b.del_flag = 0
         <if test="req.messageType != null">
             and b.message_type = #{req.messageType}
         </if>
-        <if test="req.title != null">
+        <if test="req.title != null and req.title != ''">
             and b.title = #{req.title}
         </if>
-        <if test="req.content != null">
+        <if test="req.content != null and req.content != ''">
             and b.content = #{req.content}
         </if>
-        <if test="req.deptCode != null">
+        <if test="req.deptCode != null and req.deptCode != ''">
             and a.scope_id = #{req.deptCode}
         </if>
         <if test="req.readStatus != null">