| 
					
				 | 
			
			
				@ -1,12 +1,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package cn.stylefeng.guns.zjxl.cnotroller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import cn.stylefeng.guns.zjxl.model.ZjxlArticleContent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import cn.stylefeng.guns.zjxl.model.ZjxlSystemDict; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import cn.stylefeng.guns.zjxl.service.ZjxlArticleContentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import cn.stylefeng.guns.zjxl.service.ZjxlSystemDictService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.models.auth.In; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.Logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.LoggerFactory; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -37,6 +40,9 @@ public class ZjxlArticleContentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ZjxlArticleContentService articleContentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ZjxlSystemDictService systemDictService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @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, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -72,8 +78,9 @@ public class ZjxlArticleContentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (list.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Iterator<ZjxlArticleContent> iterator = list.iterator(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                while (iterator.hasNext()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (articleContentTitle.equals(iterator.next())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return write(-1,"改文章已存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (articleContentTitle.equals(iterator.next().getArticleContentTitle())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        return write(-1,"改文章已存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -160,7 +167,20 @@ public class ZjxlArticleContentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("内容类型:articleContentType====="+articleContentType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("分类:articleContentClassify====="+articleContentClassify); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200,"操作成功","data",articleContentService.getArticleContentSubclassify(articleContentType,articleContentClassify)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<ZjxlArticleContent> list = articleContentService.getArticleContentSubclassify(articleContentType,articleContentClassify); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (list.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return write(200,"操作成功","data",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                ZjxlArticleContent content = new ZjxlArticleContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<ZjxlSystemDict> systemDictList = systemDictService.findNewsTypeA(new Integer(articleContentType),articleContentClassify); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (systemDictList.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    for (int i=0;i<systemDictList.size();i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        content.setArticleContentSubclassify(systemDictList.get(i).getSystemDictSubclassify()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        list.add(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return write(200,"操作成功","data",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(-1,"操作失败"); 
			 |