Explorar el Código

修改公告通知bug

ouyang hace 2 años
padre
commit
362d20fbc3

+ 50 - 29
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/vo/CoreAnnouncementNotificationPageVo.java

@@ -23,56 +23,77 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 
-@ApiModel(value = "CoreAnnouncementNotification对象" , description = "公告通知")
-public class CoreAnnouncementNotificationPageVo
-        {
-private static final long serialVersionUID=1L;
+@ApiModel(value = "CoreAnnouncementNotification对象", description = "公告通知")
+public class CoreAnnouncementNotificationPageVo {
+    private static final long serialVersionUID = 1L;
 
-    /**  */
+    /**
+     *
+     */
     @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
-    /** 机构 */
+    /**
+     * 机构
+     */
     @JsonSerialize(using = ToStringSerializer.class)
     private Long orgId;
 
-    /** 创建机构 */
-            @ApiModelProperty(value = "创建机构")
+    /**
+     * 创建机构
+     */
+    @ApiModelProperty(value = "创建机构")
     private String orgName;
 
-    /** 机构 */
+    /**
+     * 机构
+     */
     private String orgPath;
 
-    /** 标题 */
+    /**
+     * 标题
+     */
     private String title;
 
-    /** 内容 */
-            @ApiModelProperty(value = "内容")
+    /**
+     * 内容
+     */
+    @ApiModelProperty(value = "内容")
     private String content;
 
-    /** 消息类型 */
-            @ApiModelProperty(value = "消息类型")
+    /**
+     * 消息类型
+     */
+    @ApiModelProperty(value = "消息类型")
     private String messagType;
-            /**
-             * 机构类型
-             */
-      private String  tagOrgType;
-    /** 目标机构 */
+    /**
+     * 机构类型
+     */
+    private String tagOrgType;
+    /**
+     * 目标机构
+     */
     private List<Long> tagOrgIds;
 
-    /** 目标角色 */
+    /**
+     * 目标角色
+     */
     private List<Long> tagRoleIds;
 
-    /** 发布时间 */
-            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-            @ApiModelProperty(value = "发布时间")
+    /**
+     * 发布时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "发布时间")
     private Date publishTime;
 
-    /** 状态 */
-            @ApiModelProperty(value = "状态")
+    /**
+     * 状态
+     */
+    @ApiModelProperty(value = "状态")
     private String messagStatus;
 
-            @ApiModelProperty(value = "附件")
-            private List<String> fileList;
-
-        }
+    @ApiModelProperty(value = "附件")
+    private List<String> fileList;
+    private String createBy;
+}

+ 2 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/message/CoreAnnouncementNotificationMapper.xml

@@ -85,10 +85,10 @@
         select T.*,T.file_list as strFileList from (select a.* from core_announcement_notification a
                          left join core_announcement_notification_to_role b on a.id = b.announcement_notification_id
                          left join core_announcement_notification_to_org c on a.id = c.announcement_notification_id
-                         where  c.org_id = #{request.orgId} and (b.role_id in
+                         where a.messag_status = 1 and c.org_id = #{request.orgId} and (a.messag_type = 0 or (b.role_id in
                             <foreach collection="request.tagRoleIds" item="item" open="(" close=")" separator=",">
                                 #{item}
-                            </foreach> and a.messag_type=1) or a.messag_type = 0
+                            </foreach> and a.messag_type=1))
                          GROUP BY a.id) T
     </select>
     <select id="selectNotificationToUsers"