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. 14
      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; private String content;
/**
* 是否过期1已过期0未过期
*/
private String expiredFlag;
//以下三个详情接口返回 //以下三个详情接口返回
private List<IcPolicyCategoryDTO> categoryList; private List<IcPolicyCategoryDTO> categoryList;
private List<FileCommonDTO> attachmentList; private List<FileCommonDTO> attachmentList;

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

@ -51,7 +51,12 @@
ip.START_DATE, ip.START_DATE,
ip.END_DATE, ip.END_DATE,
ip.TITLE, 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 FROM
ic_policy ip ic_policy ip
WHERE WHERE
@ -64,11 +69,12 @@
<if test="null != content and content != '' "> <if test="null != content and content != '' ">
and ip.CONTENT like concat('%',#{content},'%') and ip.CONTENT like concat('%',#{content},'%')
</if> </if>
<if test="'1' != expiredFlag"> <if test="'1' == expiredFlag">
and ip.END_DATE &lt; now() and ip.END_DATE &lt; now()
</if> </if>
<if test="'0' != expiredFlag"> <if test="'0' == expiredFlag">
and ip.END_DATE &gt;= now() and ip.END_DATE &gt;= now()
</if> </if>
</select> order by ip.CREATED_TIME desc
</select>
</mapper> </mapper>
Loading…
Cancel
Save