|
|
@ -51,7 +51,12 @@ |
|
|
|
ip.START_DATE, |
|
|
|
ip.END_DATE, |
|
|
|
ip.TITLE, |
|
|
|
ip.CONTENT |
|
|
|
ip.CONTENT, |
|
|
|
( |
|
|
|
case when ip.END_DATE < now() then '1' |
|
|
|
when ip.END_DATE >= now() then '0' |
|
|
|
end |
|
|
|
)as expiredFlag |
|
|
|
FROM |
|
|
|
ic_policy ip |
|
|
|
WHERE |
|
|
@ -64,11 +69,12 @@ |
|
|
|
<if test="null != content and content != '' "> |
|
|
|
and ip.CONTENT like concat('%',#{content},'%') |
|
|
|
</if> |
|
|
|
<if test="'1' != expiredFlag"> |
|
|
|
<if test="'1' == expiredFlag"> |
|
|
|
and ip.END_DATE < now() |
|
|
|
</if> |
|
|
|
<if test="'0' != expiredFlag"> |
|
|
|
<if test="'0' == expiredFlag"> |
|
|
|
and ip.END_DATE >= now() |
|
|
|
</if> |
|
|
|
order by ip.CREATED_TIME desc |
|
|
|
</select> |
|
|
|
</mapper> |