From c59cdc216376e07b74fc3224be0a6d8ce3a637bd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 21 Jul 2022 09:26:29 +0800 Subject: [PATCH] list --- .../dto/form/policy/IcPolicyPageFormDTO.java | 2 -- .../src/main/java/com/epmet/dao/IcPolicyDao.java | 7 +++++-- .../epmet/service/impl/IcPolicyServiceImpl.java | 3 +-- .../src/main/resources/mapper/IcPolicyDao.xml | 15 +++++++++------ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java index c1b3591b7c..0db60d639a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java @@ -33,7 +33,5 @@ public class IcPolicyPageFormDTO extends PageFormDTO implements Serializable { */ private String expiredFlag; - private String agencyId; - } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java index d2e34e23f4..7738a3f38e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java @@ -3,7 +3,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcPolicyDTO; import com.epmet.dto.IcPolicyItemResultDTO; -import com.epmet.dto.form.policy.IcPolicyPageFormDTO; import com.epmet.entity.IcPolicyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -27,5 +26,9 @@ public interface IcPolicyDao extends BaseDao { */ List selectItemList(@Param("customerId") String customerId, @Param("groupType") String groupType); - List policyList(IcPolicyPageFormDTO formDTO); + List policyList(@Param("customerId")String customerId, + @Param("agencyId")String agencyId, + @Param("title")String title, + @Param("content")String content, + @Param("expiredFlag")String expiredFlag); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java index c8f3edeae9..951cd33f76 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java @@ -232,9 +232,8 @@ public class IcPolicyServiceImpl extends BaseServiceImpl list = baseDao.policyList(formDTO); + List list = baseDao.policyList(formDTO.getCustomerId(),staffInfo.getAgencyId(),formDTO.getTitle(),formDTO.getContent(),formDTO.getExpiredFlag()); if (CollectionUtils.isNotEmpty(list)) { for (IcPolicyDTO icPolicyDTO : list) { // 查询字典表 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml index 0bf133236c..57fdfd27cd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml @@ -43,7 +43,7 @@ order by i.SORT asc - SELECT ip.id AS POLICY_ID, ip.ORG_ID, @@ -69,11 +69,14 @@ and ip.CONTENT like concat('%',#{content},'%') - - and ip.END_DATE < DATE_FORMAT(now(),'%Y-%m-%d') - - - and ip.END_DATE >= DATE_FORMAT(now(),'%Y-%m-%d') + + and 1=1 + + and ip.END_DATE < DATE_FORMAT(now(),'%Y-%m-%d') + + + and ip.END_DATE >= DATE_FORMAT(now(),'%Y-%m-%d') + order by ip.CREATED_TIME desc