|
|
@ -33,13 +33,11 @@ import com.epmet.dao.SpecialSubjectDao; |
|
|
|
import com.epmet.dto.SpecialSubjectDTO; |
|
|
|
import com.epmet.dto.TagCustomerDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.AddSpecialSubjectResultDTO; |
|
|
|
import com.epmet.dto.result.MineResultDTO; |
|
|
|
import com.epmet.dto.result.TagInfoResultDTO; |
|
|
|
import com.epmet.dto.result.WorkSpecialSubjectResultDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.SpecialSubjectEntity; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.redis.TagRedis; |
|
|
|
import com.epmet.service.ArticleService; |
|
|
|
import com.epmet.service.SpecialSubjectService; |
|
|
|
import com.epmet.service.TagCustomerService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -68,9 +66,12 @@ import java.util.stream.Stream; |
|
|
|
public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao, SpecialSubjectEntity> implements SpecialSubjectService { |
|
|
|
@Autowired |
|
|
|
private TagCustomerService tagCustomerService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private TagRedis tagRedis; |
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
@Resource |
|
|
|
private ArticleService articleService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<SpecialSubjectDTO> page(Map<String, Object> params) { |
|
|
@ -123,8 +124,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao |
|
|
|
// 逻辑删除(@TableLogic 注解)
|
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
|
} |
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 添加专题 |
|
|
@ -242,6 +242,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao |
|
|
|
} |
|
|
|
return resultDTOList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 热门标签列表 |
|
|
|
* |
|
|
@ -268,4 +269,27 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 效果预览 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @return java.util.List<com.epmet.dto.result.PreviewResultDTO> |
|
|
|
* @author zhaoqifeng |
|
|
|
* @date 2021/7/16 14:28 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<PreviewResultDTO> preview(PreviewFormDTO formDTO) { |
|
|
|
List<PreviewResultDTO> result = new ArrayList<>(); |
|
|
|
formDTO.getTagIdList().forEach(tagId -> { |
|
|
|
PreviewResultDTO previewResultDTO = new PreviewResultDTO(); |
|
|
|
SpecialSubjectEntity subjectEntity = baseDao.getInfo(tagId); |
|
|
|
previewResultDTO.setSpecialSubjectId(subjectEntity.getId()); |
|
|
|
previewResultDTO.setTagName(subjectEntity.getTagName()); |
|
|
|
previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo(), formDTO.getPageSize())); |
|
|
|
result.add(previewResultDTO); |
|
|
|
}); |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |