Skip to content

Commit

Permalink
Fix query lock record error
Browse files Browse the repository at this point in the history
Signed-off-by: fanyinbo <[email protected]>
  • Loading branch information
fanyinbo committed Nov 28, 2023
1 parent e11589c commit f8088f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8088f3

Please sign in to comment.