Commit d678e947 by rongkailun

【修改】挡板咨询查询列表

parent e1343de8
......@@ -33,10 +33,38 @@
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
a.classid = #{newsParams.classId}
AND levels > 0
<if test="newsParams.releaseTimeStart !=null and newsParams.releaseTimeEnd !=null">
and b.releasedate BETWEEN #{newsParams.releaseTimeStart} AND #{newsParams.releaseTimeEnd}
</if>
<if test="newsParams.updateTimeStart !=null and newsParams.updateTimeEnd !=null">
and b.updatedate BETWEEN #{newsParams.updateTimeStart} AND #{newsParams.updateTimeEnd}
</if>
<if test="newsParams.keyword !=null and newsParams.keyword !=''">
and b.keyword like concat('%',#{newsParams.keyword},'%')
</if>
<if test="newsParams.title !=null and newsParams.title !=''">
and b.title like concat('%',#{newsParams.title},'%')
</if>
<if test="newsParams.author !=null and newsParams.author !=''">
and b.author like concat('%',#{newsParams.author},'%')
</if>
<if test="newsParams.status !=null">
and b.status =#{newsParams.status}
</if>
<if test="newsParams.auditor !=null and newsParams.auditor !=''">
and b.auditor =#{newsParams.auditor}
</if>
<choose>
<when test="newsParams.levels != 0">
AND b.levels = #{newsParams.levels}
</when>
<otherwise>
AND b.levels = 0
</otherwise>
</choose>
ORDER BY
levels DESC,
releasedate DESC
b.levels DESC,
b.releasedate 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