From f8088f3bd3f4a1336925d415017b2a01d892aaae Mon Sep 17 00:00:00 2001 From: fanyinbo <1553199396@qq.com> Date: Tue, 28 Nov 2023 15:44:46 +0800 Subject: [PATCH] Fix query lock record error Signed-off-by: fanyinbo <1553199396@qq.com> --- .../src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java b/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java index 1f75be11..15b2d3fb 100644 --- a/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java +++ b/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java @@ -567,13 +567,13 @@ private Long annotateCommon(DataPreAnnotationBO dataPreAnnotationBO, Long serial var isFilterData = ObjectUtil.isNotNull(dataPreAnnotationBO.getIsFilterData()) ? dataPreAnnotationBO.getIsFilterData() : false; var boo = true; var dataAnnotationRecord = DataAnnotationRecord.builder() - .datasetId(dataPreAnnotationBO.getDatasetId()).type(dataPreAnnotationBO.getOperateItemType()).createdBy(userId).serialNo(serialNo).build(); + .datasetId(dataPreAnnotationBO.getDatasetId()).itemType(dataPreAnnotationBO.getOperateItemType()).createdBy(userId).serialNo(serialNo).build(); try { dataAnnotationRecordDAO.save(dataAnnotationRecord); } catch (DuplicateKeyException duplicateKeyException) { boo = false; dataAnnotationRecord = dataAnnotationRecordDAO.getOne(lambdaQueryWrapper); - if (!dataAnnotationRecord.getType().equals(dataPreAnnotationBO.getOperateItemType())) { + if (!dataAnnotationRecord.getItemType().equals(dataPreAnnotationBO.getOperateItemType())) { throw new UsecaseException(UsecaseCode.DATASET_DATA_EXIST_OTHER_TYPE_ANNOTATE); } var dataEditLambdaQueryWrapper = Wrappers.lambdaQuery(DataEdit.class);