| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -153,6 +153,19 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Result updateShoppingStatus(UpdateShoppingStatusFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 用户定制功能上架,需判断,已上架的数量是否超过12
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (NumConstant.ONE_STR.equals(formDTO.getShoppingStatus())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 根据functionId,customerId、所属端,查询当前客户 现已上架的 功能数量。
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerFunctionDetailDTO functionDetailDTO = new CustomerFunctionDetailDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            functionDetailDTO.setFunctionId(formDTO.getFunctionId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            functionDetailDTO.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerFunctionCollectResultDTO functionNum = baseDao.sumCustomerFunctionNum(functionDetailDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null != functionNum){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (NumConstant.TWELVE <= functionNum.getNum()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    return new Result().error(8000,"当前客户"+ functionNum.getFromAppName() +"已上架12个定制功能。不能继续上架!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 修改 客户定制功能详情表,上下架状态
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        baseDao.updateShoppingStatus(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 保存日志记录到  客户定制功能上下架历史表
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |