diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java index 26d9294031..6be60b5d1e 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java @@ -42,7 +42,7 @@ public class CommonArticleListFormDTO implements Serializable { /** * 标签名称(高级配置里的参数) * */ - @NotNull(message = "标签名称不能为空",groups = YanTaiShowGroup.class) + @NotBlank(message = "标签名称不能为空",groups = YanTaiShowGroup.class) private String tagName; /** * 排除的标签名称(高级配置里的参数) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java index fa4b20576e..53524c9bb7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java @@ -177,5 +177,6 @@ public interface ArticleDao extends BaseDao { */ List pageArticleListByTagName(@Param("gridId")String gridId, @Param("tagName")String tagName, - @Param("customerId")String customerId); + @Param("customerId")String customerId, + @Param("agencyId")String agencyId); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 7c447cc0f4..6d849126bb 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -2015,11 +2015,18 @@ public class ArticleServiceImpl extends BaseServiceImpl pageArticleListByTagName(Integer pageNo, Integer pageSize, String gridId, String tagName) { + // 1.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), + EpmetRequestHolder.getLoginUserId()); + if (null == staffInfo) { + throw new EpmetException("获取工作人员信息失败"); + } PageHelper.startPage(pageNo, pageSize); List list = baseDao.pageArticleListByTagName( gridId, tagName, - EpmetRequestHolder.getLoginUserCustomerId()); + EpmetRequestHolder.getLoginUserCustomerId(), + staffInfo.getAgencyId()); PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal()); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 9da11a42fb..a309c8b15a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -525,15 +525,22 @@ LEFT JOIN article_tags t ON ( art.id = t.ARTICLE_ID AND t.DEL_FLAG = '0' ) - left join article_publish_range apr + inner join article_publish_range apr on(art.ID=apr.ARTICLE_ID and apr.DEL_FLAG='0' and apr.PUBLISH_STATUS='published') WHERE art.DEL_FLAG = '0' AND art.CUSTOMER_ID = #{customerId} - AND t.TAG_NAME LIKE concat ( '%', #{tagName}, '%' ) - and apr.GRID_ID=#{gridId} + + AND t.TAG_NAME LIKE concat ( '%', #{tagName}, '%' ) + + + and apr.GRID_ID=#{gridId} + + + AND art.org_id_path like concat('%',#{agencyId},'%') + ORDER BY art.PUBLISH_DATE DESC, art.CREATED_TIME DESC