From fe7e9e0cd626d99683aba770c9ace03ae5324a00 Mon Sep 17 00:00:00 2001 From: Bill <771989711@qq.com> Date: Wed, 25 Oct 2023 14:27:10 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E8=BF=94=E8=BF=98=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E7=BD=91=E6=A0=BC?= =?UTF-8?q?ID=201.gridId=20=E5=8F=82=E6=95=B0=E4=B8=8D=E5=BF=85=E9=9C=80?= =?UTF-8?q?=202.=E8=BF=94=E5=9B=9E=E5=8F=82=E6=95=B0=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=91=E5=AE=9A=E7=9A=84=E7=BD=91=E6=A0=BC?= =?UTF-8?q?id(gridId)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/mine/dto/from/MyResiUserInfoFormDTO.java | 2 +- .../epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java | 5 +++++ .../com/epmet/modules/mine/controller/MineController.java | 4 +++- .../main/java/com/epmet/dto/form/MyResiUserInfoFormDTO.java | 2 +- .../java/com/epmet/dto/result/MyResiUserInfoResultDTO.java | 5 +++++ .../main/java/com/epmet/service/impl/UserServiceImpl.java | 4 ++++ 6 files changed, 19 insertions(+), 3 deletions(-) diff --git a/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyResiUserInfoFormDTO.java b/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyResiUserInfoFormDTO.java index edcde03d..cf3fd3c9 100644 --- a/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyResiUserInfoFormDTO.java +++ b/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyResiUserInfoFormDTO.java @@ -16,7 +16,7 @@ public class MyResiUserInfoFormDTO implements Serializable { private static final long serialVersionUID = -6534841370041338474L; @NotBlank(message = "客户Id不能为空") private String customerId; - @NotBlank(message = "网格Id不能为空") +// @NotBlank(message = "网格Id不能为空") private String gridId; @NotBlank(message = "用户Id不能为空") private String userId; diff --git a/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java b/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java index 3f3cbe0f..0ef2dcd8 100644 --- a/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java +++ b/code/smart-community/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java @@ -18,6 +18,11 @@ public class MyResiUserInfoResultDTO implements Serializable { * 用户id * */ private String userId; + + /** + * 居民所属网格ID + */ + private String gridId; /** * 是否已注册居民,true ,false * */ diff --git a/code/smart-community/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/MineController.java b/code/smart-community/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/MineController.java index 21668669..83f16e54 100644 --- a/code/smart-community/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/MineController.java +++ b/code/smart-community/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/MineController.java @@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; import java.util.Date; /** @@ -38,7 +39,7 @@ import java.util.Date; @RequestMapping("mine") public class MineController { - @Autowired + @Resource private EpmetUserFeignClient epmetUserFeignClient; @Autowired private RedisUtils redisUtils; @@ -54,6 +55,7 @@ public class MineController { Result getMyResiInfo(@LoginUser TokenDto tokenDto, @RequestBody MyResiUserInfoFormDTO myResiUserInfoFormDTO) { myResiUserInfoFormDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(myResiUserInfoFormDTO); + return epmetUserFeignClient.resiMyselfMsg(myResiUserInfoFormDTO); } diff --git a/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyResiUserInfoFormDTO.java b/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyResiUserInfoFormDTO.java index 722b93ed..719b7fc3 100644 --- a/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyResiUserInfoFormDTO.java +++ b/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyResiUserInfoFormDTO.java @@ -16,7 +16,7 @@ public class MyResiUserInfoFormDTO implements Serializable { private static final long serialVersionUID = -6534841370041338474L; @NotBlank(message = "客户Id不能为空") private String customerId; - @NotBlank(message = "网格Id不能为空") +// @NotBlank(message = "网格Id不能为空") private String gridId; @NotBlank(message = "用户Id不能为空") private String userId; diff --git a/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java b/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java index 9ab4663b..00a8fb54 100644 --- a/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java +++ b/code/smart-community/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java @@ -18,6 +18,11 @@ public class MyResiUserInfoResultDTO implements Serializable { * 用户id * */ private String userId; + + /** + * 居民所属网格ID + */ + private String gridId; /** * 是否已注册居民,true ,false * */ diff --git a/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index b52fc2f4..1669ffbf 100644 --- a/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -211,6 +211,10 @@ public class UserServiceImpl extends BaseServiceImpl implem if (null != myselfMsg) { MyResiUserInfoResultDTO result = ConvertUtils.sourceToTarget(myselfMsg, MyResiUserInfoResultDTO.class); + RegisterRelationEntity registerRelation = registerRelationDao.selectRegisteredGridIdByUserId(myResiUserInfoFormDTO.getUserId()); + if (null != registerRelation) { + result.setGridId(registerRelation.getGridId()); + } //registerFlag 是否已注册居民,true ,false result.setRegisterFlag(StringUtils.isNotBlank(myselfMsg.getResiId())); if(StringUtils.isNotBlank(myselfMsg.getIdNum()) && StringUtils.isNotBlank(myselfMsg.getResiId())){