Browse Source

Merge branch 'dev_personal_center' into dev_temp

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
e275b61f00
  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.RegisterRelationDTO;
import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; import com.epmet.dto.result.UserInfoOnEnterGridResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.dto.result.UserRoleResultDTO;
@ -82,6 +83,9 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl<RegisterRelatio
@Autowired @Autowired
private GridVisitedService gridVisitedService; private GridVisitedService gridVisitedService;
@Autowired
private UserBaseInfoDao userBaseInfoDao;
@Override @Override
@ -155,10 +159,11 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl<RegisterRelatio
final String gridId = enterGridFormDTO.getGridId(); final String gridId = enterGridFormDTO.getGridId();
//查询用户微信关系表 //查询用户微信关系表
List<UserWechatEntity> strangerWechatInfo = userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); // List<UserWechatEntity> strangerWechatInfo = userWechatDao.selectByUserId(enterGridFormDTO.getUserId());
if(null != strangerWechatInfo && strangerWechatInfo.size() > 0){ UserBaseInfoResultDTO strangerInfo = userBaseInfoDao.selectListByUserIdList(enterGridFormDTO.getUserId());
resultObj.setNickname(strangerWechatInfo.get(0).getNickname()); if(null != strangerInfo){
resultObj.setUserHeadPhoto(strangerWechatInfo.get(0).getHeadImgUrl()); resultObj.setNickname(strangerInfo.getNickname());
resultObj.setUserHeadPhoto(strangerInfo.getHeadImgUrl());
} }
//需要新增的用户关系参数 //需要新增的用户关系参数
UserCustomerEntity userCustomer = new UserCustomerEntity(); UserCustomerEntity userCustomer = new UserCustomerEntity();
@ -246,10 +251,11 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl<RegisterRelatio
resultObj.setNickname(userResiInfo.getShowName()); resultObj.setNickname(userResiInfo.getShowName());
resultObj.setUserHeadPhoto(userResiInfo.getHeadPhoto()); resultObj.setUserHeadPhoto(userResiInfo.getHeadPhoto());
} }
List<UserWechatEntity> userWechatEntityList=userWechatDao.selectByUserId(enterGridFormDTO.getUserId()); // List<UserWechatEntity> userWechatEntityList=userWechatDao.selectByUserId(enterGridFormDTO.getUserId());
if(CollectionUtils.isNotEmpty(userWechatEntityList)){ UserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selectListByUserIdList(enterGridFormDTO.getUserId());
resultObj.setNickname(StringUtils.isNotBlank(userWechatEntityList.get(0).getNickname())?userWechatEntityList.get(0).getNickname(): StrConstant.EPMETY_STR); if(null != userBaseInfo){
resultObj.setUserHeadPhoto(StringUtils.isNotBlank(userWechatEntityList.get(0).getHeadImgUrl())?userWechatEntityList.get(0).getHeadImgUrl(): StrConstant.EPMETY_STR); 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