Authored by chenly5

Merge branch 'bugfix-20200415-发现好物排序功能修复' of http://git.yoho.cn/platform/platfor…

…m-cms into bugfix-20200415-发现好物排序功能修复
... ... @@ -61,12 +61,12 @@ public class GrassTopicController {
return topicService.changeTopicHotStatus(req);
}
/*@RequestMapping("/getAllTopic")
@RequestMapping("/getAllTopic")
@ResponseBody
public ApiResponse getAllTopic(){
List<TopicRespBo> result = topicService.getAllTopic();
List<TopicRespBo> result = topicService.selectAllTopic();
return new ApiResponse.ApiResponseBuilder().data(result).build();
}*/
}
@RequestMapping("/addArticlesTop")
@ResponseBody
... ...
... ... @@ -17,6 +17,9 @@ public interface ITopicService {
List<TopicRespBo> grassTopicByGroupId(GrassTopicReq req);
List<TopicRespBo> selectAllTopic();
void changeTopicStatus(GrassTopicReq req);
ApiResponse changeTopicHotStatus(GrassTopicReq req);
... ...
... ... @@ -178,6 +178,19 @@ public class TopicServiceImpl implements ITopicService {
return rsp;
}
@Override
public List<TopicRespBo> selectAllTopic() {
List<TopicRespBo> rsp = Lists.newArrayList();
List<GrassTopic> topicList = grassTopicDAO.selectUsingTopics();
topicList.forEach(grassTopic -> {
TopicRespBo rspbo = new TopicRespBo();
rspbo.setId(grassTopic.getId());
rspbo.setTopicName(grassTopic.getTopicName());
rsp.add(rspbo);
});
return rsp;
}
//转换
private List<TopicRespBo> convertTopicRespBo(List<GrassTopic> sourceList) {
if(CollectionUtils.isEmpty(sourceList)){
... ...
... ... @@ -247,11 +247,9 @@
required: false,
prompt: "请选择话题",
selectOnNavigation : true,
url : serverContextPath + "/grassTopicManage/getGrassTopicList",
url : serverContextPath + "/grassTopicManage/getAllTopic",
loadFilter: function (data) {
var data = defaultLoadFilter(data);
data = data.list;
data.unshift({'id': '0', 'topicName': '全部'});
return data;
}
... ...