diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index c88dde6e87..180877f027 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -57,6 +57,7 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.commons.CommonsMultipartFile; @@ -418,6 +419,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl { */ 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