diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 29b300e417..4b2f19d4d1 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -765,20 +765,21 @@ public class FunctionalCaseService { handleTags(request, userId, ids); //自定义字段处理 handleCustomFields(request, userId, ids); - } - - } - - private void handleCustomFields(FunctionalCaseBatchEditRequest request, String userId, List ids) { - Optional.ofNullable(request.getCustomField()).ifPresent(customField -> { - functionalCaseCustomFieldService.batchUpdate(customField, ids); - + //基本信息 FunctionalCase functionalCase = new FunctionalCase(); functionalCase.setProjectId(request.getProjectId()); functionalCase.setUpdateTime(System.currentTimeMillis()); functionalCase.setUpdateUser(userId); extFunctionalCaseMapper.batchUpdate(functionalCase, ids); - }); + } + + } + + private void handleCustomFields(FunctionalCaseBatchEditRequest request, String userId, List ids) { + boolean customField = Optional.ofNullable(request.getCustomField()).map(o -> o.getFieldId()).isPresent(); + if(customField){ + functionalCaseCustomFieldService.batchUpdate(request.getCustomField(), ids); + } } private void handleTags(FunctionalCaseBatchEditRequest request, String userId, List ids) {