|  | @ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.FieldConstant; |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.NumConstant; |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.page.PageData; |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.utils.ConvertUtils; |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.utils.Result; |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
	
		
		
			
				
					|  | @ -46,6 +47,7 @@ import org.apache.logging.log4j.Logger; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.beans.factory.annotation.Autowired; |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.stereotype.Service; |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.transaction.annotation.Transactional; |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.springframework.util.CollectionUtils; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | import java.util.*; |  |  | import java.util.*; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -127,6 +129,26 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
			
		
	
		
		
			
				
					|  |  |         baseDao.deleteBatchIds(Arrays.asList(ids)); |  |  |         baseDao.deleteBatchIds(Arrays.asList(ids)); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @param userId | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @return java.util.List<com.epmet.dto.result.UserBaseInfoResultDTO> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @author yinzuomei | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @description 传入用户id集合,返回用户的基本信息(包含微信基本信息) | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Date 2020/7/22 9:35 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      **/ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     public UserBaseInfoResultDTO queryUserBaseInfoFromCache(String userId) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         if (StringUtils.isBlank(userId)) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             throw new RenException("用户Id不能为空"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = this.queryUserBaseInfoFromCache(Arrays.asList(userId)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             logger.warn("queryUserBaseInfo return empty,userId:{}", userId); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             return null; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         return userBaseInfoResultDTOS.get(0); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     /** |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |      * @param userIdList |  |  |      * @param userIdList | 
			
		
	
		
		
			
				
					|  |  |      * @return java.util.List<com.epmet.dto.result.UserBaseInfoResultDTO> |  |  |      * @return java.util.List<com.epmet.dto.result.UserBaseInfoResultDTO> | 
			
		
	
	
		
		
			
				
					|  | @ -135,11 +157,11 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
			
		
	
		
		
			
				
					|  |  |      * @Date 2020/7/22 9:35 |  |  |      * @Date 2020/7/22 9:35 | 
			
		
	
		
		
			
				
					|  |  |      **/ |  |  |      **/ | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |     public List<UserBaseInfoResultDTO> queryUserBaseInfo(List<String> userIdList) { |  |  |     public List<UserBaseInfoResultDTO> queryUserBaseInfoFromCache(List<String> userIdList) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         if(null==userIdList||userIdList.size()<1){ |  |  |         if (null == userIdList || userIdList.size() < 1) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |             return new ArrayList<>(); |  |  |             return new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |         List<UserBaseInfoResultDTO> userBaseInfoList=new ArrayList<>(); |  |  |         List<UserBaseInfoResultDTO> userBaseInfoList = new ArrayList<>(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |        /* for(String userId:userIdList){ |  |  |        /* for(String userId:userIdList){ | 
			
		
	
		
		
			
				
					|  |  |             UserBaseInfoResultDTO userBaseInfoResultDTO=baseDao.selectListByUserIdList(userId); |  |  |             UserBaseInfoResultDTO userBaseInfoResultDTO=baseDao.selectListByUserIdList(userId); | 
			
		
	
		
		
			
				
					|  |  |             if(null!=userBaseInfoResultDTO){ |  |  |             if(null!=userBaseInfoResultDTO){ | 
			
		
	
	
		
		
			
				
					|  | @ -152,7 +174,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
			
		
	
		
		
			
				
					|  |  |             UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); |  |  |             UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); | 
			
		
	
		
		
			
				
					|  |  |             //为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里
 |  |  |             //为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里
 | 
			
		
	
		
		
			
				
					|  |  |             //if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){
 |  |  |             //if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){
 | 
			
		
	
		
		
			
				
					
					|  |  |                 userBaseInfoList.add(baseInfo); |  |  |             userBaseInfoList.add(baseInfo); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |             //}
 |  |  |             //}
 | 
			
		
	
		
		
			
				
					|  |  |         }); |  |  |         }); | 
			
		
	
		
		
			
				
					|  |  |         return userBaseInfoList; |  |  |         return userBaseInfoList; | 
			
		
	
	
		
		
			
				
					|  | @ -166,7 +188,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us | 
			
		
	
		
		
			
				
					|  |  |      **/ |  |  |      **/ | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public void initBaseInfo() { |  |  |     public void initBaseInfo() { | 
			
		
	
		
		
			
				
					
					|  |  |         List<UserWechatDTO> userWechatDTOList=userWechatDao.selectNotInUserBaseInfoTemp(); |  |  |         List<UserWechatDTO> userWechatDTOList = userWechatDao.selectNotInUserBaseInfoTemp(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         List<String> userIdList=new ArrayList<>(); |  |  |         List<String> userIdList=new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |         for(UserWechatDTO userWechatDTO:userWechatDTOList){ |  |  |         for(UserWechatDTO userWechatDTO:userWechatDTOList){ | 
			
		
	
		
		
			
				
					|  |  |             userIdList.add(userWechatDTO.getUserId()); |  |  |             userIdList.add(userWechatDTO.getUserId()); | 
			
		
	
	
		
		
			
				
					|  | 
 |