| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -167,12 +167,12 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Result updateCustomized(UpdateCustomizedFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 1.客户定制功能详情表 ,没查到就是没人在使用
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 1. 客户定制功能详情表 ,没查到就是没人在使用
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<CustomerFunctionDetailDTO> customizedId = customerFunctionDetailDao.selectCustomerIdByFunctionId(formDTO.getFunctionId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (customizedId != null && customizedId.size() > NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 根据功能id,查询功能的详细信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 2.1 根据功能id,查询功能的详细信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomizedDTO customizedDTO = baseDao.selectCustomized(formDTO.getFunctionId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 该集合,用户统一修改 客户定制功能详情表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 该集合,统一修改 客户定制功能详情表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<CustomerFunctionDetailEntity> upCustomizedInfo = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 统一提示 不能进行修改的客户id
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            StringBuilder tipCustomizedInfoUserId = new StringBuilder(); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -180,24 +180,24 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 如果这个功能,被客户重新定义了,则不会修改
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            for (int i = 0; i < customizedId.size(); i++){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (null != customizedDTO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    // 功能信息和客户信息:判断这个功能,用户使用的是默认的,还是自定义的
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    // 3.1 功能信息和客户信息:判断这个功能,用户使用的是默认的,还是自定义的
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (customizedDTO.getCustomizedName().equals(customizedId.get(i).getFunctionName()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            && customizedDTO.getIconLargeImg().equals(customizedId.get(i).getIconLargeImg()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            && customizedDTO.getIconSmallImg().equals(customizedId.get(i).getIconSmallImg()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            && customizedDTO.getDomainName().equals(customizedId.get(i).getDomainName()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            && customizedDTO.getTargetLink().equals(customizedId.get(i).getTargetLink()) ){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        // 这个功能,客户使用的是默认的,则判断本次修改的字段,如果是功能名称和大小图标,则批量更新客户数据,负责提示 不能修改
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // 这个功能,客户使用的是默认的,则判断本次修改的字段,如果是功能名称和大小图标,则批量更新客户数据,负责提示 不能修改
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            if (!formDTO.getShoppingStatus().equals(customizedDTO.getShoppingStatus()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    || !formDTO.getFunctionExplain().equals(customizedDTO.getFunctionExplain()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    || !formDTO.getTargetLink().equals(customizedDTO.getTargetLink()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    || !formDTO.getDomainName().equals(customizedDTO.getDomainName()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    || !formDTO.getFromApp().equals(customizedDTO.getFromApp()) ){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // 如果修改的内容是其他字段,则返回语句
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // 4.1 如果修改的内容是其他字段,则返回语句
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                tipCustomizedInfoUserId.append(customizedId.get(i).getId() + ","); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            } else if (!formDTO.getCustomizedName().equals(customizedDTO.getCustomizedName()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        || !formDTO.getIconLargeImg().equals(customizedDTO.getIconLargeImg()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        || !formDTO.getIconSmallImg().equals(customizedDTO.getIconSmallImg())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // 如果修改的内容只是:功能名称和大小图标,, 需要批量更新客户数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // 4.2 如果修改的内容只是:功能名称和大小图标,, 需要批量更新客户数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                CustomerFunctionDetailEntity customer = new CustomerFunctionDetailEntity(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                customer.setFunctionName(formDTO.getCustomizedName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                customer.setIconLargeImg(formDTO.getIconLargeImg()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -206,22 +206,21 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                upCustomizedInfo.add(customer); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    // 用户使用的是自定义的功能,则不予处理
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    // 3.2 用户使用的是自定义的功能,则不予处理
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 1.修改 客户定制功能详情表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (upCustomizedInfo != null && upCustomizedInfo.size() > NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                // 5.1 修改 客户定制功能详情表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                customerFunctionDetailService.updateBatchById(upCustomizedInfo); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                // 2.客户正在使用该功能,根据入参参数,修改功能表、定制功能表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                // 6. 客户正在使用该功能,根据入参参数,修改功能表、定制功能表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                this.functionInUse(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 3.提示哪些用户不能被修改
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 5.2 提示哪些用户不能被修改
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (tipCustomizedInfoUserId != null && tipCustomizedInfoUserId.length() >NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return new Result<>().error(8000, "客户"+ tipCustomizedInfoUserId +"正在使用该功能不允许修改上下架状态、业务域名和外链地址、所属端app!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 1. 没有客户使用该 功能,根据入参参数,修改功能表、定制功能表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 2.2 没有客户使用该 功能,根据入参参数,修改功能表、定制功能表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.functionNotUsed(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new Result(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |