|
@ -3,6 +3,7 @@ package cn.stylefeng.guns.zjxl.cnotroller;
|
|
|
import cn.stylefeng.guns.zjxl.model.ZjxlArticleContent;
|
|
|
import cn.stylefeng.guns.zjxl.service.ZjxlArticleContentService;
|
|
|
import cn.stylefeng.guns.zjxlUtil.BaseController;
|
|
|
import cn.stylefeng.guns.zjxlUtil.PageUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/***
|
|
|
* @ClassName: ZjxlArticleContentController
|
|
|
* @Description:文章内容管理
|
|
@ -31,10 +34,11 @@ public class ZjxlArticleContentController extends BaseController {
|
|
|
public String findArticleContentById(@ApiParam(name = "id", value = "文章id", required = false) @RequestParam(value = "id", required = false)String id,
|
|
|
@ApiParam(name = "articleContentTitle", value = "文章标题", required = false) @RequestParam(value = "articleContentTitle", required = false)String articleContentTitle,
|
|
|
@ApiParam(name = "systemDictType", value = "内容类型 1-产品与服务 2-公司案例 3-新闻中心 4-关于我们", required = false) @RequestParam(value = "systemDictType", required = false)Integer systemDictType,
|
|
|
@ApiParam(name = "page", value = "第几页", defaultValue = "0") @RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "page", value = "第几页", defaultValue = "1") @RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "分页大小", defaultValue = "10") @RequestParam(value = "pagesize", required = false) Integer pagesize){
|
|
|
try {
|
|
|
return write(200,"查询成功","data",articleContentService.findArticleContentById(id,articleContentTitle,systemDictType,page,pagesize));
|
|
|
List<ZjxlArticleContent> articleContentList = articleContentService.findArticleContentById(id,articleContentTitle,systemDictType,page-1,pagesize);
|
|
|
return write(200,"查询成功","data", PageUtil.getPage(articleContentList,page,pagesize,articleContentService.allCount()));
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return write(-1,"查询失败");
|