From 7130b6cfbde333c426692b067710ccd449d9e24d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 22:31:21 +0800 Subject: [PATCH] =?UTF-8?q?"mydemand"=E6=8E=A5=E5=8F=A3=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E6=98=AFPC=E5=BD=95=E5=85=A5=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82+=E5=B1=85=E6=B0=91=E7=AB=AF=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=94=A8=E6=88=B7=E8=87=AA=E5=B7=B1=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E7=9A=84=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/IcResiUserDemandFromDTO.java | 5 +++++ .../service/impl/IcUserDemandRecServiceImpl.java | 12 ++++++++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 10 +++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java index 0b46c1ca4b..ad416293e9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java @@ -30,4 +30,9 @@ public class IcResiUserDemandFromDTO implements Serializable { @NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; + + /** + * 代码内自己查询的参数,赋值到此属性 + */ + private String epmetUserId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index e3b6d48d4d..29f1c20143 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -40,8 +40,10 @@ import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.form.ResiUserFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.ResiUserResDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; @@ -465,6 +467,16 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryMyDemand(IcResiUserDemandFromDTO formDTO) { + //1、查询当前居民在小程序里是否有用户id + ResiUserFormDTO resiUserFormDTO=new ResiUserFormDTO(); + resiUserFormDTO.setCustomerId(formDTO.getCustomerId()); + resiUserFormDTO.setIcResiUserId(formDTO.getUserId()); + Result userRes=epmetUserOpenFeignClient.findUser(resiUserFormDTO); + if(!userRes.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"/epmetuser/user/finduser接口异常","查找居民端小程序用户信息异常"); + } + formDTO.setEpmetUserId(userRes.getData().getEpmetUserId()); + //2、小程序内自己上报+赋能平台待录入的 PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO)); List list = pageInfo.getList(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4681fbdbe3..c2f1298b2c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -134,7 +134,15 @@ ic_user_demand_rec r WHERE r.DEL_FLAG = '0' - AND r.DEMAND_USER_ID = #{userId} + + + AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId}) + + + AND r.DEMAND_USER_ID = #{userId} + + + and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%')