diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/controller/PmsProductModuleController.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/controller/PmsProductModuleController.java index 59afde017..5822085d4 100644 --- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/controller/PmsProductModuleController.java +++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/controller/PmsProductModuleController.java @@ -108,15 +108,4 @@ public class PmsProductModuleController extends BaseController { return toAjax(pmsProductModuleService.deletePmsProductModuleById(id)); } - - /** - * 初始化固定模块 - */ - @RequiresPermissions("pms:pmsProductModule:manage") - @Log(title = "产品模块", businessType = BusinessType.UPDATE) - @PutMapping("/{productIdentifier}/initModule") - @ApiOperation(value = "初始化固定模块") - public AjaxResult initProductModule(@PathVariable String productIdentifier) { - return toAjax(pmsProductModuleService.initProductModule(productIdentifier)); - } } diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java index 36fcbda45..215f0b336 100644 --- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java +++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java @@ -173,6 +173,9 @@ public class PmsProductModuleServiceImpl implements IPmsProductModuleService throw new ServiceException("[%s]不允许进行操作", NO_MODULE); } PmsProductModule oldPmsProductModule = selectPmsProductModuleById(pmsProductModule.getId(), true); + if (oldPmsProductModule.getIsFixedModule()) { + throw new ServiceException("固定模块不允许进行操作"); + } String name; // 当type为1时则取产品需求数量、为2时取测试用例数量 if (PmsConstants.PRODUCT_TAG_AND_MODULE_TYPE.equals(oldPmsProductModule.getType())) { @@ -221,7 +224,9 @@ public class PmsProductModuleServiceImpl implements IPmsProductModuleService public int deletePmsProductModuleById(Long id) { PmsProductModule oldPmsProductModule = selectPmsProductModuleById(id, true); - + if (oldPmsProductModule.getIsFixedModule()) { + throw new ServiceException("固定模块不允许进行操作"); + } PmsProductModule pmsProductModuleSearch=new PmsProductModule(); pmsProductModuleSearch.setParentId(id); List pmsProductModuleChildList=pmsProductModuleMapper.selectPmsProductModuleList(pmsProductModuleSearch);