diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseDemandService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseDemandService.java index d77640ddea..b0dba7e8b1 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseDemandService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseDemandService.java @@ -210,7 +210,10 @@ public class FunctionalCaseDemandService { * @param id 需求关系ID */ public void deleteDemand(String id) { - FunctionalCaseDemand functionalCaseDemandInDb= functionalCaseDemandMapper.selectByPrimaryKey(id); + FunctionalCaseDemand functionalCaseDemandInDb = functionalCaseDemandMapper.selectByPrimaryKey(id); + if (functionalCaseDemandInDb == null) { + return; + } FunctionalCaseDemandExample functionalCaseDemandExample = new FunctionalCaseDemandExample(); functionalCaseDemandExample.createCriteria().andParentEqualTo(functionalCaseDemandInDb.getDemandId()); List functionalCaseDemands = functionalCaseDemandMapper.selectByExample(functionalCaseDemandExample); @@ -254,16 +257,16 @@ public class FunctionalCaseDemandService { functionalCaseDemandRequest.setCaseId(t); functionalCaseDemandRequest.setDemandPlatform(request.getDemandPlatform()); //过滤已存在的 - insertDemand(demandDTOList, functionalCaseDemandRequest, userId, existDemands, functionalCaseDemandMapper); + insertDemand(demandDTOList, functionalCaseDemandRequest, userId, existDemands, functionalCaseDemandMapper); }); sqlSession.flushStatements(); SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory); } private void insertDemand(List demandDTOList, FunctionalCaseDemandRequest request, String userId, List existDemands, FunctionalCaseDemandMapper functionalCaseDemandMapper) { - Map> existMap = existDemands.stream().filter(t->StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(FunctionalCaseDemand::getDemandId)); - Map> existParentMap = existDemands.stream().filter(t->StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(FunctionalCaseDemand::getParent)); - Map> insertMap = demandDTOList.stream().filter(t->StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(DemandDTO::getDemandId)); + Map> existMap = existDemands.stream().filter(t -> StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(FunctionalCaseDemand::getDemandId)); + Map> existParentMap = existDemands.stream().filter(t -> StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(FunctionalCaseDemand::getParent)); + Map> insertMap = demandDTOList.stream().filter(t -> StringUtils.isNotBlank(t.getDemandId())).collect(Collectors.groupingBy(DemandDTO::getDemandId)); for (DemandDTO demandDTO : demandDTOList) { FunctionalCaseDemand functionalCaseDemand = buildFunctionalCaseDemand(request.getCaseId(), request.getDemandPlatform(), userId, demandDTO); @@ -348,7 +351,7 @@ public class FunctionalCaseDemandService { public PluginPager pageDemand(FunctionalThirdDemandPageRequest request) { DemandPageRequest demandPageRequest = new DemandPageRequest(); - demandPageRequest.setQuery(StringUtils.replace(request.getKeyword(),"\\","")); + demandPageRequest.setQuery(StringUtils.replace(request.getKeyword(), "\\", "")); demandPageRequest.setFilter(request.getFilter()); demandPageRequest.setStartPage(request.getCurrent()); demandPageRequest.setPageSize(request.getPageSize()); diff --git a/backend/services/system-setting/src/main/resources/permission.json b/backend/services/system-setting/src/main/resources/permission.json index cbf69410ba..2490d8f101 100644 --- a/backend/services/system-setting/src/main/resources/permission.json +++ b/backend/services/system-setting/src/main/resources/permission.json @@ -84,7 +84,8 @@ "id": "SYSTEM_TEST_RESOURCE_POOL:READ" }, { - "id": "SYSTEM_TEST_RESOURCE_POOL:READ+ADD" + "id": "SYSTEM_TEST_RESOURCE_POOL:READ+ADD", + "license": true }, { "id": "SYSTEM_TEST_RESOURCE_POOL:READ+UPDATE" @@ -126,27 +127,33 @@ }, { "id": "SYSTEM_PARAMETER_SETTING_DISPLAY:READ", - "name": "permission.system_parameter_setting_display.read" + "name": "permission.system_parameter_setting_display.read", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_DISPLAY:READ+UPDATE", - "name": "permission.system_parameter_setting_display.update" + "name": "permission.system_parameter_setting_display.update", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_AUTH:READ", - "name": "permission.system_parameter_setting_auth.read" + "name": "permission.system_parameter_setting_auth.read", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_AUTH:READ+ADD", - "name": "permission.system_parameter_setting_auth.add" + "name": "permission.system_parameter_setting_auth.add", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE", - "name": "permission.system_parameter_setting_auth.update" + "name": "permission.system_parameter_setting_auth.update", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_AUTH:READ+DELETE", - "name": "permission.system_parameter_setting_auth.delete" + "name": "permission.system_parameter_setting_auth.delete", + "license": true }, { "id": "SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ", @@ -168,7 +175,8 @@ { "id": "SYSTEM_AUTH:READ+UPDATE" } - ] + ], + "license": true }, { "id": "SYSTEM_LOG", diff --git a/frontend/src/components/pure/ms-table/select-all.vue b/frontend/src/components/pure/ms-table/select-all.vue index c9367d7464..964e1e6d05 100644 --- a/frontend/src/components/pure/ms-table/select-all.vue +++ b/frontend/src/components/pure/ms-table/select-all.vue @@ -63,7 +63,7 @@ // 获取数据第一层级的ids,用来判断全选或者半选 const firstLevelAllIds = computed(() => { - if (isHasChildren) { + if (isHasChildren.value) { return props.currentData.map((item) => item[props.rowKey]); } return [];