Browse Source

国企

master
yinzuomei 3 years ago
parent
commit
e3e2c148cf
  1. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyDTO.java
  2. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyDTO.java

@ -60,6 +60,11 @@ public class IcPolicyDTO implements Serializable {
*/
private String content;
/**
* 是否过期1已过期0未过期
*/
private String expiredFlag;
//以下三个详情接口返回
private List<IcPolicyCategoryDTO> categoryList;
private List<FileCommonDTO> attachmentList;

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

@ -51,7 +51,12 @@
ip.START_DATE,
ip.END_DATE,
ip.TITLE,
ip.CONTENT
ip.CONTENT,
(
case when ip.END_DATE &lt; now() then '1'
when ip.END_DATE &gt;= 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 &lt; now()
</if>
<if test="'0' != expiredFlag">
<if test="'0' == expiredFlag">
and ip.END_DATE &gt;= now()
</if>
order by ip.CREATED_TIME desc
</select>
</mapper>
Loading…
Cancel
Save