|
|
@ -131,6 +131,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
@Autowired |
|
|
|
private DraftPublishRangeService draftPublishRangeService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CategoryDictDao categoryDictDao; |
|
|
|
|
|
|
|
@Value("${openapi.scan.server.url}") |
|
|
|
private String scanApiUrl; |
|
|
|
@Value("${openapi.scan.method.imgSyncScan}") |
|
|
@ -1759,6 +1762,20 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
//列表查询
|
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); |
|
|
|
|
|
|
|
// 查询子栏目
|
|
|
|
String categoryId; |
|
|
|
List<String> subCategories; |
|
|
|
if (StringUtils.isNotBlank(categoryId = formDTO.getCategory())) { |
|
|
|
LambdaQueryWrapper<CategoryDictEntity> cq = new LambdaQueryWrapper<>(); |
|
|
|
cq.eq(CategoryDictEntity::getPid, categoryId); |
|
|
|
List<CategoryDictEntity> subCtgs = categoryDictDao.selectList(cq); |
|
|
|
if (! CollectionUtils.isEmpty(subCtgs)) { |
|
|
|
subCategories = subCtgs.stream().map(CategoryDictEntity::getId).collect(Collectors.toList()); |
|
|
|
formDTO.setSubCategories(subCategories); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<PublishedListResultDTO> list = baseDao.selectAllArticle(formDTO); |
|
|
|
PageInfo<PublishedListResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
|
|
|
@ -1821,6 +1838,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
resultDTO.setTagIdList(contentList); |
|
|
|
} |
|
|
|
|
|
|
|
// 栏目
|
|
|
|
CategoryDictEntity categoryDict = categoryDictDao.selectById(resultDTO.getCategory()); |
|
|
|
if (categoryDict != null) { |
|
|
|
resultDTO.setCategoryName(categoryDict.getCategoryName()); |
|
|
|
} |
|
|
|
|
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|