Commit bbb18f7e by rongkailun

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

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