| 
						
						
							
								
							
						
						
					 | 
					@ -195,14 +195,22 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						@Override | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						public InitPointRuleResultDTO initPointRule() { | 
					 | 
					 | 
						public InitPointRuleResultDTO initPointRule() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							Result<List<CustomerDTO>> customerListResult = operCrmOpenFeignClient.getAllCustomerList(); | 
					 | 
					 | 
							Result<List<CustomerDTO>> customerListResult = operCrmOpenFeignClient.getAllCustomerList(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							log.info("initPointRule operCrmOpenFeignClient.getAllCustomerList result:{}",JSON.toJSONString(customerListResult)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) { | 
					 | 
					 | 
							if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
								log.error("获取所有客户列表失败"); | 
					 | 
					 | 
								throw new RenException("获取所有客户列表失败"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							List<CustomerDTO> customerDTOList = customerListResult.getData(); | 
					 | 
					 | 
							List<CustomerDTO> customerDTOList = customerListResult.getData(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							List<PointRuleDefaultEntity> ruleDefaultEntities = pointRuleDefaultDao.selectList(null); | 
					 | 
					 | 
							List<PointRuleDefaultEntity> ruleDefaultEntities = pointRuleDefaultDao.selectList(null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (CollectionUtils.isEmpty(ruleDefaultEntities)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								log.warn("initPointRule pointRuleDefaultDao.selectList return empty"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException("获取默认规则失败"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							List<String> haveInitCustomerIds = baseDao.selectCustomerIds(); | 
					 | 
					 | 
							List<String> haveInitCustomerIds = baseDao.selectCustomerIds(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (haveInitCustomerIds == null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								haveInitCustomerIds = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							List<PointRuleEntity> insertList = new ArrayList<>(); | 
					 | 
					 | 
							List<PointRuleEntity> insertList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							ruleDefaultEntities.forEach(defaultRule -> { | 
					 | 
					 | 
							for (PointRuleDefaultEntity defaultRule : ruleDefaultEntities) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
								for (CustomerDTO customerDTO : customerDTOList) { | 
					 | 
					 | 
								for (CustomerDTO customerDTO : customerDTOList) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									if (haveInitCustomerIds.contains(customerDTO.getId())) { | 
					 | 
					 | 
									if (haveInitCustomerIds.contains(customerDTO.getId())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
										continue; | 
					 | 
					 | 
										continue; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -211,7 +219,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									entity.setCustomerId(customerDTO.getId()); | 
					 | 
					 | 
									entity.setCustomerId(customerDTO.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									insertList.add(entity); | 
					 | 
					 | 
									insertList.add(entity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								} | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							}); | 
					 | 
					 | 
							} | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							this.insertBatch(insertList, 100); | 
					 | 
					 | 
							this.insertBatch(insertList, 100); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							InitPointRuleResultDTO result = new InitPointRuleResultDTO(); | 
					 | 
					 | 
							InitPointRuleResultDTO result = new InitPointRuleResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							result.setCustomerTotal(customerDTOList.size()); | 
					 | 
					 | 
							result.setCustomerTotal(customerDTOList.size()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |