Commit bbb18f7e by rongkailun

【修改】支持查询全部等级数据

parent 57e56198
...@@ -53,11 +53,11 @@ ...@@ -53,11 +53,11 @@
and starttime_index BETWEEN #{indexCarouselManage.startTime} AND #{indexCarouselManage.endTime} and starttime_index BETWEEN #{indexCarouselManage.startTime} AND #{indexCarouselManage.endTime}
</if> </if>
<choose> <choose>
<when test="indexCarouselManage.levels != 0"> <when test="indexCarouselManage.levels !=null and indexCarouselManage.levels !=''">
AND t.levels = #{indexCarouselManage.levels} AND t.levels = #{indexCarouselManage.levels}
</when> </when>
<otherwise> <otherwise>
AND t.levels = 0 AND t.levels > 0
</otherwise> </otherwise>
</choose> </choose>
ORDER BY ORDER BY
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<select id="selectPartnersList" resultMap="partnersMap"> <select id="selectPartnersList" resultMap="partnersMap">
select * from Partners where 1=1 select * from Partners where 1=1
<choose> <choose>
<when test="newsParams.levels !=null"> <when test="newsParams.levels !=null and newsParams.levels !=''">
AND levels = #{newsParams.levels} AND levels = #{newsParams.levels}
</when> </when>
<otherwise> <otherwise>
......
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd} and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if> </if>
<choose> <choose>
<when test="params.pictureLevel != 0"> <when test="params.levels !=null and params.levels !=''">
AND PicLevel = #{params.pictureLevel} AND PicLevel = #{params.levels}
</when> </when>
<otherwise> <otherwise>
AND PicLevel = 0 AND PicLevel = 0
......
...@@ -44,7 +44,14 @@ ...@@ -44,7 +44,14 @@
<if test="newsParams.editor !=null and newsParams.editor !=''"> <if test="newsParams.editor !=null and newsParams.editor !=''">
and editor =#{newsParams.editor} and editor =#{newsParams.editor}
</if> </if>
and levels = #{newsParams.levels} <choose>
<when test="newsParams.levels !=null and newsParams.levels !=''">
AND levels = #{newsParams.levels}
</when>
<otherwise>
AND levels > 0
</otherwise>
</choose>
ORDER BY ORDER BY
id DESC id DESC
</select> </select>
......
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