| 
					
				 | 
			
			
				@ -0,0 +1,93 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				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 io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RequestMethod; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RequestParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.RestController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/*** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @ClassName: ZjxlArticleContentController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Description:文章内容管理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Auther: shi kejing 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Date: 2020/11/3 17:40 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Api(description = "文章内容管理") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RequestMapping(value = "/zjxl/zjxlArticleContent") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class ZjxlArticleContentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ZjxlArticleContentService articleContentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/findArticleContentById", method = RequestMethod.GET) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询文章管理列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    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 = "page", value = "第几页", defaultValue = "0") @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,page,pagesize)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(-1,"查询失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/addArticleContent", method = RequestMethod.POST) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "添加文章") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String addArticleContent( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentTitle", value = "文章标题", required = false) @RequestParam(value = "articleContentTitle", required = false)String articleContentTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentCover", value = "封面", required = false) @RequestParam(value = "articleContentCover", required = false)String articleContentCover, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentAbstract", value = "摘要", required = false) @RequestParam(value = "articleContentAbstract", required = false) String articleContentAbstract, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentType", value = "内容类型 1-产品与服务  2-公司案例  3-新闻中心  4-关于我们", required = false) @RequestParam(value = "articleContentType", required = false)Integer articleContentType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentClassify", value = "分类", required = false) @RequestParam(value = "articleContentClassify", required = false)String articleContentClassify, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentSubclassify", value = "子分类", required = false) @RequestParam(value = "articleContentSubclassify", required = false)String articleContentSubclassify, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentSort", value = "排序", required = false) @RequestParam(value = "articleContentSort", required = false)Integer articleContentSort, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "articleContentIsLine", value = "是否上线", required = false, defaultValue = "0") @RequestParam(value = "articleContentIsLine", required = false)Integer articleContentIsLine){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ZjxlArticleContent articleContent = new ZjxlArticleContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentTitle(articleContentTitle); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentCover(articleContentCover); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentAbstract(articleContentAbstract); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentType(articleContentType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentClassify(articleContentClassify); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentSubclassify(articleContentSubclassify); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentSort(articleContentSort); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            articleContent.setArticleContentIsLine(articleContentIsLine); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200,"添加成功","data",articleContentService.addArticleContent(articleContent)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(-1,"添加失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/deleteArticleContent", method = RequestMethod.DELETE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "删除文章管理") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String deleteArticleContent(@ApiParam(name = "id", value = "文章id") @RequestParam(value = "id") String id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200,"删除成功","data",articleContentService.deleteArticleContent(id)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(-1,"删除失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "/updateArticleContent", method = RequestMethod.POST) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "修改是否上线") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String updateArticleContent(@ApiParam(name = "id", value = "文章id") @RequestParam(value = "id") String id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name = "isLine", value = "是否上线") @RequestParam(value = "isLine") Integer isLine){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200,"修改上线成功","data",articleContentService.updateArticleContent(id,isLine)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(-1,"修改上线失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |