|  | @@ -1,5 +1,6 @@
 | 
											
												
													
														|  |  package com.ym.mec.biz.service.impl;
 |  |  package com.ym.mec.biz.service.impl;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
											
												
													
														|  |  import com.baomidou.mybatisplus.core.metadata.IPage;
 |  |  import com.baomidou.mybatisplus.core.metadata.IPage;
 | 
											
												
													
														|  |  import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 |  |  import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
											
												
													
														|  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 |  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
											
										
											
												
													
														|  | @@ -10,10 +11,12 @@ import com.ym.mec.biz.dal.dao.PlatformServeDetailDao;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dto.PlatformServeDto;
 |  |  import com.ym.mec.biz.dal.dto.PlatformServeDto;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.PlatformServe;
 |  |  import com.ym.mec.biz.dal.entity.PlatformServe;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.PlatformServeDetail;
 |  |  import com.ym.mec.biz.dal.entity.PlatformServeDetail;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.TenantProductInfo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.vo.PlatformServeInfoVo;
 |  |  import com.ym.mec.biz.dal.vo.PlatformServeInfoVo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.vo.PlatformServeModeVo;
 |  |  import com.ym.mec.biz.dal.vo.PlatformServeModeVo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.vo.PlatformServePageVo;
 |  |  import com.ym.mec.biz.dal.vo.PlatformServePageVo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.service.PlatformServeService;
 |  |  import com.ym.mec.biz.service.PlatformServeService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.TenantProductInfoService;
 | 
											
												
													
														|  |  import com.ym.mec.common.exception.BizException;
 |  |  import com.ym.mec.common.exception.BizException;
 | 
											
												
													
														|  |  import com.ym.mec.common.page.PageInfo;
 |  |  import com.ym.mec.common.page.PageInfo;
 | 
											
												
													
														|  |  import com.ym.mec.common.page.PageUtil;
 |  |  import com.ym.mec.common.page.PageUtil;
 | 
											
										
											
												
													
														|  | @@ -25,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
 | 
											
												
													
														|  |  import java.io.Serializable;
 |  |  import java.io.Serializable;
 | 
											
												
													
														|  |  import java.util.Date;
 |  |  import java.util.Date;
 | 
											
												
													
														|  |  import java.util.List;
 |  |  import java.util.List;
 | 
											
												
													
														|  | 
 |  | +import java.util.Objects;
 | 
											
												
													
														|  |  import java.util.Optional;
 |  |  import java.util.Optional;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  /**
 |  |  /**
 | 
											
										
											
												
													
														|  | @@ -38,6 +42,8 @@ public class PlatformServeServiceImpl extends ServiceImpl<PlatformServeDao, Plat
 | 
											
												
													
														|  |      private PlatformServeDetailDao platformServeDetailDao;
 |  |      private PlatformServeDetailDao platformServeDetailDao;
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private SysUserFeignService sysUserFeignService;
 |  |      private SysUserFeignService sysUserFeignService;
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private TenantProductInfoService tenantProductInfoService;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 增加
 |  |       * 增加
 | 
											
										
											
												
													
														|  | @@ -84,6 +90,13 @@ public class PlatformServeServiceImpl extends ServiceImpl<PlatformServeDao, Plat
 | 
											
												
													
														|  |          Integer userId = Optional.ofNullable(sysUserFeignService.queryUserInfo())
 |  |          Integer userId = Optional.ofNullable(sysUserFeignService.queryUserInfo())
 | 
											
												
													
														|  |                  .map(SysUser::getId)
 |  |                  .map(SysUser::getId)
 | 
											
												
													
														|  |                  .orElseThrow(() -> new BizException("用户信息获取失败"));
 |  |                  .orElseThrow(() -> new BizException("用户信息获取失败"));
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        TenantProductInfo productInfo = tenantProductInfoService.getOne(new QueryWrapper<TenantProductInfo>()
 | 
											
												
													
														|  | 
 |  | +                .eq("serve_id_", id));
 | 
											
												
													
														|  | 
 |  | +        if(Objects.isNull(productInfo)){
 | 
											
												
													
														|  | 
 |  | +            throw new BizException("该服务已关联机构无法删除!");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          PlatformServe platformServe = new PlatformServe();
 |  |          PlatformServe platformServe = new PlatformServe();
 | 
											
												
													
														|  |          platformServe.setId(id);
 |  |          platformServe.setId(id);
 | 
											
												
													
														|  |          platformServe.setDeleted(1);
 |  |          platformServe.setDeleted(1);
 |