Browse Source

Merge branch 'dev_policy_service' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_policy_service

master
wangxianzhang 3 years ago
parent
commit
1f55c4f18a
  1. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml

8
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml

@ -53,8 +53,8 @@
ip.TITLE,
ip.CONTENT,
(
case when ip.END_DATE < now() then '1'
when ip.END_DATE >= now() then '0'
case when ip.END_DATE < DATE_FORMAT(now(),'%Y-%m-%d') then '1'
when ip.END_DATE >= DATE_FORMAT(now(),'%Y-%m-%d') then '0'
end
)as expiredFlag
FROM
@ -70,10 +70,10 @@
and ip.CONTENT like concat('%',#{content},'%')
</if>
<if test="'1' == expiredFlag">
and ip.END_DATE &lt; now()
and ip.END_DATE &lt; DATE_FORMAT(now(),'%Y-%m-%d')
</if>
<if test="'0' == expiredFlag">
and ip.END_DATE &gt;= now()
and ip.END_DATE &gt;= DATE_FORMAT(now(),'%Y-%m-%d')
</if>
order by ip.CREATED_TIME desc
</select>

Loading…
Cancel
Save