From 9369314986dbe8af96f1b853d1fcdfe31bf95d35 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 19 Nov 2020 15:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E4=BB=8Euser=5Fbase=5Finfo=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RegisterRelationServiceImpl.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index 67962815c1..06d33d7d93 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -32,6 +32,7 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.RegisterRelationDTO; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserRoleResultDTO; @@ -82,6 +83,9 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl strangerWechatInfo = userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); - if(null != strangerWechatInfo && strangerWechatInfo.size() > 0){ - resultObj.setNickname(strangerWechatInfo.get(0).getNickname()); - resultObj.setUserHeadPhoto(strangerWechatInfo.get(0).getHeadImgUrl()); +// List strangerWechatInfo = userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); + UserBaseInfoResultDTO strangerInfo = userBaseInfoDao.selectListByUserIdList(enterGridFormDTO.getUserId()); + if(null != strangerInfo){ + resultObj.setNickname(strangerInfo.getNickname()); + resultObj.setUserHeadPhoto(strangerInfo.getHeadImgUrl()); } //需要新增的用户关系参数 UserCustomerEntity userCustomer = new UserCustomerEntity(); @@ -246,10 +251,11 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl userWechatEntityList=userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); - if(CollectionUtils.isNotEmpty(userWechatEntityList)){ - resultObj.setNickname(StringUtils.isNotBlank(userWechatEntityList.get(0).getNickname())?userWechatEntityList.get(0).getNickname(): StrConstant.EPMETY_STR); - resultObj.setUserHeadPhoto(StringUtils.isNotBlank(userWechatEntityList.get(0).getHeadImgUrl())?userWechatEntityList.get(0).getHeadImgUrl(): StrConstant.EPMETY_STR); +// List userWechatEntityList=userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); + UserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selectListByUserIdList(enterGridFormDTO.getUserId()); + if(null != userBaseInfo){ + resultObj.setNickname(StringUtils.isNotBlank(userBaseInfo.getNickname())?userBaseInfo.getNickname(): StrConstant.EPMETY_STR); + resultObj.setUserHeadPhoto(StringUtils.isNotBlank(userBaseInfo.getHeadImgUrl())?userBaseInfo.getHeadImgUrl(): StrConstant.EPMETY_STR); } }