|
@ -39,7 +39,7 @@ public class ZjxlArticleContentService extends BaseService {
|
|
if (systemDictType != null && systemDictType > 0){
|
|
if (systemDictType != null && systemDictType > 0){
|
|
sql += " and article_content_type = "+systemDictType+"";
|
|
sql += " and article_content_type = "+systemDictType+"";
|
|
}
|
|
}
|
|
sql += " order by article_content_sort,article_content_create_time desc limit "+page+" , "+pagesiz+"";
|
|
|
|
|
|
sql += " order by concat(article_content_sort,article_content_create_time) desc limit "+page+" , "+pagesiz+"";
|
|
List<ZjxlArticleContent> articleContentList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ZjxlArticleContent.class));
|
|
List<ZjxlArticleContent> articleContentList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ZjxlArticleContent.class));
|
|
return articleContentList;
|
|
return articleContentList;
|
|
}
|
|
}
|
|
@ -79,13 +79,13 @@ public class ZjxlArticleContentService extends BaseService {
|
|
}
|
|
}
|
|
|
|
|
|
public List<ZjxlArticleContent> getArticleContent(String articleContentType,String articleContentClassify,String articleContentSubclassify){
|
|
public List<ZjxlArticleContent> getArticleContent(String articleContentType,String articleContentClassify,String articleContentSubclassify){
|
|
String sql = "select * from zjxl_article_content where article_content_type = "+articleContentType+" and article_content_classify = '"+articleContentClassify+"' and article_content_subclassify = '"+articleContentSubclassify+"' order by article_content_sort,article_content_create_time desc limit 1";
|
|
|
|
|
|
String sql = "select * from zjxl_article_content where article_content_type = "+articleContentType+" and article_content_classify = '"+articleContentClassify+"' and article_content_subclassify = '"+articleContentSubclassify+"' order by concat(article_content_sort,article_content_create_time) desc limit 1";
|
|
List<ZjxlArticleContent> articleContentList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ZjxlArticleContent.class));
|
|
List<ZjxlArticleContent> articleContentList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ZjxlArticleContent.class));
|
|
return articleContentList;
|
|
return articleContentList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<ZjxlArticleContent> findNewsList(String id,String articleContentClassify,Integer systemDictType,Integer page,Integer pagesiz){
|
|
|
|
|
|
public List<ZjxlArticleContent> findNewsList(String id,String articleContentClassify,String articleContentSubclassify,Integer systemDictType,Integer page,Integer pagesiz){
|
|
String sql = "select * from zjxl_article_content where 1=1 ";
|
|
String sql = "select * from zjxl_article_content where 1=1 ";
|
|
if (StringUtils.isNotEmpty(id)){
|
|
if (StringUtils.isNotEmpty(id)){
|
|
sql += " and article_content_id = '"+id+"'";
|
|
sql += " and article_content_id = '"+id+"'";
|
|
@ -93,6 +93,9 @@ public class ZjxlArticleContentService extends BaseService {
|
|
if (StringUtils.isNotEmpty(articleContentClassify)){
|
|
if (StringUtils.isNotEmpty(articleContentClassify)){
|
|
sql += " and article_content_classify = '"+articleContentClassify+"'";
|
|
sql += " and article_content_classify = '"+articleContentClassify+"'";
|
|
}
|
|
}
|
|
|
|
if (StringUtils.isNotEmpty(articleContentSubclassify)){
|
|
|
|
sql += " and article_content_subclassify = '"+articleContentSubclassify+"'";
|
|
|
|
}
|
|
if (systemDictType != null && systemDictType > 0){
|
|
if (systemDictType != null && systemDictType > 0){
|
|
sql += " and article_content_type = "+systemDictType+"";
|
|
sql += " and article_content_type = "+systemDictType+"";
|
|
}
|
|
}
|
|
@ -101,8 +104,8 @@ public class ZjxlArticleContentService extends BaseService {
|
|
return articleContentList;
|
|
return articleContentList;
|
|
}
|
|
}
|
|
|
|
|
|
public int allNewsCount(String articleContentClassify){
|
|
|
|
String sql = "select count(*) from zjxl_article_content where article_content_type = 3 and article_content_classify = '"+articleContentClassify+"'";
|
|
|
|
|
|
public int allNewsCount(String articleContentClassify,String articleContentSubclassify){
|
|
|
|
String sql = "select count(*) from zjxl_article_content where article_content_type = 3 and article_content_classify = '"+articleContentClassify+"' and article_content_subclassify = '"+articleContentSubclassify+"'";
|
|
Integer allCount = jdbcTemplate.queryForObject(sql, Integer.class);;
|
|
Integer allCount = jdbcTemplate.queryForObject(sql, Integer.class);;
|
|
return allCount;
|
|
return allCount;
|
|
}
|
|
}
|