Browse Source

烟台钉钉实时动态

master
yinzuomei 3 years ago
parent
commit
aef86d7566
  1. 2
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java
  2. 3
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java
  3. 9
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  4. 13
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

2
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;
/**
* 排除的标签名称(高级配置里的参数)

3
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java

@ -177,5 +177,6 @@ public interface ArticleDao extends BaseDao<ArticleEntity> {
*/
List<ArticleLatestResultDTO> pageArticleListByTagName(@Param("gridId")String gridId,
@Param("tagName")String tagName,
@Param("customerId")String customerId);
@Param("customerId")String customerId,
@Param("agencyId")String agencyId);
}

9
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<ArticleDao, ArticleEntit
*/
@Override
public PageData<ArticleLatestResultDTO> 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<ArticleLatestResultDTO> list = baseDao.pageArticleListByTagName(
gridId,
tagName,
EpmetRequestHolder.getLoginUserCustomerId());
EpmetRequestHolder.getLoginUserCustomerId(),
staffInfo.getAgencyId());
PageInfo<ArticleLatestResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}

13
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}
<if test="tagName != null and tagName != '' ">
AND t.TAG_NAME LIKE concat ( '%', #{tagName}, '%' )
</if>
<if test="gridId != null and gridId != '' ">
and apr.GRID_ID=#{gridId}
</if>
<if test="agencyId != null and agencyId != '' ">
AND art.org_id_path like concat('%',#{agencyId},'%')
</if>
ORDER BY
art.PUBLISH_DATE DESC,
art.CREATED_TIME DESC

Loading…
Cancel
Save