|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.jingcheng.cms.controller;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.jingcheng.cms.model.PopularLabel;
|
|
|
|
|
import com.jingcheng.cms.service.PopularLabelService;
|
|
|
|
|
import com.jingcheng.cms.util.AjaxResult;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -8,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/api/popularLabel")
|
|
|
|
|
public class PopularLabelController {
|
|
|
|
@ -55,4 +58,21 @@ public class PopularLabelController {
|
|
|
|
|
ajaxResult= popularLabelService.delPopularLabel(id);
|
|
|
|
|
return ajaxResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取所有热门标签分页
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("/get-all-popular-label")
|
|
|
|
|
public AjaxResult getPopularLabelListByPage() {
|
|
|
|
|
AjaxResult ajaxResult = new AjaxResult();
|
|
|
|
|
List<PopularLabel> popularLabelList= popularLabelService.getAllPopularLabel();
|
|
|
|
|
if (popularLabelList.size() == 0){
|
|
|
|
|
ajaxResult.setRetmsg("无热门标签");
|
|
|
|
|
}else {
|
|
|
|
|
ajaxResult.setData(popularLabelList);
|
|
|
|
|
}
|
|
|
|
|
return ajaxResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|