Browse Source

bug修复

master
luogw 1 month ago
parent
commit
5ac0ae0c33
  1. 8
      src/main/java/com/project/classicpaper/application/impl/ClassicCategoryApplicationServiceImpl.java
  2. 2
      src/main/resources/application-test.yml

8
src/main/java/com/project/classicpaper/application/impl/ClassicCategoryApplicationServiceImpl.java

@ -187,9 +187,9 @@ public class ClassicCategoryApplicationServiceImpl implements ClassicCategoryApp
dto.setParentId(0L); dto.setParentId(0L);
} }
} }
// 名称去重(同父级下不可重名) // 名称去重(同父级下不可重名,区分大小写
LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>() LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>()
.eq(ClassicCategoryEntity::getName, dto.getName()) .apply("BINARY name = {0}", dto.getName())
.eq(ClassicCategoryEntity::getParentId, dto.getParentId()); .eq(ClassicCategoryEntity::getParentId, dto.getParentId());
if (dto.getId() != null) { if (dto.getId() != null) {
duplicateQuery.ne(ClassicCategoryEntity::getId, dto.getId()); duplicateQuery.ne(ClassicCategoryEntity::getId, dto.getId());
@ -227,9 +227,9 @@ public class ClassicCategoryApplicationServiceImpl implements ClassicCategoryApp
return Result.success(entity.toDTO(ClassicCategoryDTO::new)); return Result.success(entity.toDTO(ClassicCategoryDTO::new));
} }
// 4. 同父级下重名校验 // 4. 同父级下重名校验(区分大小写)
LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>() LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>()
.eq(ClassicCategoryEntity::getName, name) .apply("BINARY name = {0}", name)
.eq(ClassicCategoryEntity::getParentId, entity.getParentId()) .eq(ClassicCategoryEntity::getParentId, entity.getParentId())
.ne(ClassicCategoryEntity::getId, id); .ne(ClassicCategoryEntity::getId, id);
if (classicCategoryBaseService.count(duplicateQuery) > 0) { if (classicCategoryBaseService.count(duplicateQuery) > 0) {

2
src/main/resources/application-test.yml

@ -67,7 +67,7 @@ analysis:
url: /word/parse url: /word/parse
dataExtract: dataExtract:
url: http://127.0.0.1:8002/ai-check/api/documents-parse url: http://127.0.0.1:8002/ai-check/api/documents-parse
callback-url: http://127.0.0.1:7088/api/interaction/dataExtractCallback callback-url: http://127.0.0.1/evaluator-api/api/interaction/dataExtractCallback
ding: ding:
appKey: dinggl2ktuhdhoczkg2o appKey: dinggl2ktuhdhoczkg2o
appSecret: nK104mgXPbkCWjX1I-EcYiubjM0FJAYcfqBKPkVcyvrBsLMF9XK1g9Qd_QVOndcK appSecret: nK104mgXPbkCWjX1I-EcYiubjM0FJAYcfqBKPkVcyvrBsLMF9XK1g9Qd_QVOndcK

Loading…
Cancel
Save