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); } }