Commit 1bce718e by rongkailun

【新增】新增首页党建文化接口、修改图片管理列表查询报错问题、修改知识检索排序问题

parent c90e9e87
......@@ -706,6 +706,26 @@ public class NewsController extends AbstractController {
return R.ok().put("page", pageUtils);
}
/**
*首页党建文化
*/
@RequestMapping("/api/sydjwhTop4")
// @RequiresPermissions("manage:newsmovie:info")
public R sydjwhTop4(){
List<Map<String,Object>> retList = this.newsService.sydjwhTop4();
return R.ok().put("data", retList);
}
/**
*首页党建文化
*/
@RequestMapping("/api/sydjwhTop1")
// @RequiresPermissions("manage:newsmovie:info")
public R sydjwhTop1(){
List<Map<String,Object>> retList = this.newsService.sydjwhTop1();
return R.ok().put("data", retList);
}
......
......@@ -107,4 +107,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List<Map<String, Object>> columnList();
List<NewsEntity> selectYylyList(@Param("newsParams") NewsParams newsParams, Page page);
List<Map<String, Object>> sydjwhTop4();
List<Map<String, Object>> sydjwhTop1();
}
......@@ -105,5 +105,9 @@ public interface NewsService extends IService<NewsEntity> {
List<Map<String, Object>> columnList();
Page<NewsEntity> selectYylyList(NewsParams newsParams, Page page);
List<Map<String, Object>> sydjwhTop4();
List<Map<String, Object>> sydjwhTop1();
}
......@@ -615,5 +615,17 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return page;
}
@Override
public List<Map<String, Object>> sydjwhTop4() {
List<Map<String, Object>> retList = this.newsDao.sydjwhTop4();
return retList;
}
@Override
public List<Map<String, Object>> sydjwhTop1() {
List<Map<String, Object>> retList = this.newsDao.sydjwhTop1();
return retList;
}
}
\ No newline at end of file
......@@ -418,6 +418,8 @@
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
where 1=1
and t.status = 1
AND t.levels > 0
<if test="title !=null and title !=''">
and t.Title like concat(concat('%',#{title}),'%')
</if>
......@@ -425,7 +427,7 @@
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by knowledgeInfoID desc
order by t.levels DESC,t.knowledgeInfoid DESC
</select>
<select id="searchKnowledgeInfoList" resultType="java.util.Map">
SELECT
......@@ -463,6 +465,8 @@ order by knowledgeInfoID desc
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
where 1=1
and t.status = 1
AND t.levels > 0
<if test="params.title !=null and params.title !=''">
and t.Title like concat(concat('%',#{title}),'%')
</if>
......@@ -470,6 +474,7 @@ order by knowledgeInfoID desc
<foreach collection="params.list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by t.levels DESC,t.knowledgeInfoid DESC
</select>
<select id="dsxxjyTop8" resultMap="newsMap">
......@@ -715,4 +720,50 @@ ORDER BY
</if>
order by id desc
</select>
<select id="sydjwhTop4" resultType="java.util.Map">
SELECT
TOP 4 a.classid,
a.newsid as id,
a.id AS yid,
a.newslevels,
a. TIME,
b.title,
b.author,
b.updatedate,
b.levels,
b.id
FROM
TopIcNews AS a
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
status = 1
AND a.classid = 428
ORDER BY
levels DESC,
releasedate DESC
</select>
<select id="sydjwhTop1" resultType="java.util.Map">
SELECT
TOP 1 a.classid,
a.newsid as id,
a.id AS yid,
a.newslevels,
a. TIME,
b.title,
b.author,
b.updatedate,
b.levels,
b.id
FROM
TopIcNews AS a
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
status = 1
AND a.classid = 429
ORDER BY
levels DESC,
releasedate DESC
</select>
</mapper>
\ No newline at end of file
......@@ -45,7 +45,8 @@
showtime,
auditor,
status,
editor
editor,
levels
from news_movie
where 1=1
<if test="params.title !=null and params.title !=''">
......@@ -66,7 +67,7 @@
<if test="params.clanguage !=null and params.clanguage !=''">
and clanguage =#{params.clanguage}
</if>
<if test="params.levels !=null and params.levels !=''">
<if test="params.levels !=null">
and levels = #{params.levels}
</if>
ORDER BY releasedate desc
......
......@@ -58,8 +58,8 @@
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if>
<choose>
<when test="params.levels !=null and params.levels !=''">
AND PicLevel = #{params.levels}
<when test="params.pictureLevel !=null and params.pictureLevel !=''">
AND PicLevel = #{params.pictureLevel}
</when>
<otherwise>
AND PicLevel = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment