| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -25,6 +25,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.AppClientConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -35,7 +36,6 @@ import com.epmet.commons.tools.redis.common.bean.ResiUserInfoCache; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.NameUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.UserConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dao.*; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.RegisterRelationDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.UserBaseInfoDTO; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -546,6 +546,10 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public DingLoginResiResDTO dingResiLogin(DingLoginResiFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        DingLoginResiResDTO result = new DingLoginResiResDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setRegFlag(false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setGridId(StrConstant.EPMETY_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setGridName(StrConstant.EPMETY_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.setAgencyId(StrConstant.EPMETY_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //根据手机号从baseinfo查对应的信息,如果有则返回,没有则注册
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        LambdaQueryWrapper<UserBaseInfoEntity> wrapper = new LambdaQueryWrapper<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        wrapper.eq(UserBaseInfoEntity::getCustomerId, formDTO.getCustomerId()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -554,8 +558,8 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == baseInfo) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //注册
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            UserEntity userEntity = new UserEntity(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userEntity.setFromApp(UserConstant.APP_RESI); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userEntity.setFromClient(UserConstant.CLIENT_DING); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userEntity.setFromApp(AppClientConstant.APP_RESI); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userEntity.setFromClient(AppClientConstant.MINI_DING); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userEntity.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            userDao.insert(userEntity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //信息存入baseinfo
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -571,6 +575,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            baseDao.insert(baseInfo); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setEpmetUserId(userEntity.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setRegFlag(false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.setEpmetUserId(baseInfo.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            LambdaQueryWrapper<RegisterRelationEntity> registerWrapper = new LambdaQueryWrapper<>(); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -586,6 +591,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格信息失败", "获取网格信息失败"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                result.setGridName(gridInfo.getGridNamePath()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                result.setRegFlag(true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return result; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |