|
|
@@ -240,12 +240,13 @@
|
|
|
a.source,
|
|
|
a.content
|
|
|
from news a
|
|
|
- where 1 =1
|
|
|
+ where
|
|
|
+ a.type != 1 and a.type != 2
|
|
|
<if test="provinceId != null">
|
|
|
and a.province_id = #{provinceId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
|
|
|
- <if test="type != null and type != 0" >
|
|
|
+ <if test="type != null and type != 0 " >
|
|
|
and a.type = #{type,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<!--
|
|
|
@@ -266,11 +267,12 @@
|
|
|
select
|
|
|
count(0)
|
|
|
from news a
|
|
|
- where 1 =1
|
|
|
+ where
|
|
|
+ a.type != 1 and a.type != 2
|
|
|
<if test="provinceId != null">
|
|
|
and a.province_id = #{provinceId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- <if test="type != null and type != 0" >
|
|
|
+ <if test="type != null and type != 0 and type != 1 and type != 2" >
|
|
|
and a.type = #{type,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<!--
|
|
|
@@ -282,4 +284,37 @@
|
|
|
and a.title like concat('%',#{keyword},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="portalNewsPolicy" resultType="com.goafanti.news.bo.NewsPortalList">
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
+ DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
|
|
|
+ a.title,
|
|
|
+ a.title_img as titleImg,
|
|
|
+ a.type,
|
|
|
+ a.hot,
|
|
|
+ a.summary,
|
|
|
+ a.source,
|
|
|
+ a.content
|
|
|
+ from news a
|
|
|
+ where
|
|
|
+ a.type =5 or a.type =4
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+ <select id="portalNewsQuestion" resultType="com.goafanti.news.bo.NewsPortalList">
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
+ DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
|
|
|
+ a.title,
|
|
|
+ a.title_img as titleImg,
|
|
|
+ a.type,
|
|
|
+ a.hot,
|
|
|
+ a.summary,
|
|
|
+ a.source,
|
|
|
+ a.content
|
|
|
+ from news a
|
|
|
+ where
|
|
|
+ a.type =2
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|