Browse Source

居民端头像从user_base_info获取

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
9369314986
  1. 22
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java

22
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<RegisterRelatio
@Autowired
private GridVisitedService gridVisitedService;
@Autowired
private UserBaseInfoDao userBaseInfoDao;
@Override
@ -155,10 +159,11 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl<RegisterRelatio
final String gridId = enterGridFormDTO.getGridId();
//查询用户微信关系表
List<UserWechatEntity> strangerWechatInfo = userWechatDao.selectByUserId(enterGridFormDTO.getUserId());
if(null != strangerWechatInfo && strangerWechatInfo.size() > 0){
resultObj.setNickname(strangerWechatInfo.get(0).getNickname());
resultObj.setUserHeadPhoto(strangerWechatInfo.get(0).getHeadImgUrl());
// List<UserWechatEntity> 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<RegisterRelatio
resultObj.setNickname(userResiInfo.getShowName());
resultObj.setUserHeadPhoto(userResiInfo.getHeadPhoto());
}
List<UserWechatEntity> 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<UserWechatEntity> 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);
}
}

Loading…
Cancel
Save