|
@ -23,10 +23,13 @@ import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.scan.param.ImgScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.ImgScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.ImgTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.ImgTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
@ -1449,4 +1452,29 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
public List<ArticleListResultDTO> getArticleListByTag(String tagId, Integer pageNo, Integer pageSize) { |
|
|
public List<ArticleListResultDTO> getArticleListByTag(String tagId, Integer pageNo, Integer pageSize) { |
|
|
return baseDao.selectArticleListByTag(tagId, pageNo, pageSize); |
|
|
return baseDao.selectArticleListByTag(tagId, pageNo, pageSize); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public PageData<PublishedListResultDTO> articleListV2(ArticleListFormDTO formDTO) { |
|
|
|
|
|
//1.获取工作人员缓存信息
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
|
|
if (null == staffInfo) { |
|
|
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
|
|
} |
|
|
|
|
|
//查询当前组织及下级数据
|
|
|
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
|
|
//列表查询
|
|
|
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); |
|
|
|
|
|
List<PublishedListResultDTO> list = baseDao.selectAllArticle(formDTO); |
|
|
|
|
|
PageInfo<PublishedListResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
|
|
|
|
|
|
|
|
//封装数据
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
|
|
|
list.forEach(l->{ |
|
|
|
|
|
l.setTagNameList(StringUtils.isNotBlank(l.getTags())?Arrays.asList(l.getTags().split("[|]")):new ArrayList<>()); |
|
|
|
|
|
l.setIsMePublished(l.getCreatedBy().equals(loginUserUtil.getLoginUserId())?true:false); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|