Browse Source

bug修复

master
luogw 1 month ago
parent
commit
5ac0ae0c33
  1. 8
      src/main/java/com/project/classicpaper/application/impl/ClassicCategoryApplicationServiceImpl.java
  2. 4
      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);
}
}
// 名称去重(同父级下不可重名)
// 名称去重(同父级下不可重名,区分大小写
LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>()
.eq(ClassicCategoryEntity::getName, dto.getName())
.apply("BINARY name = {0}", dto.getName())
.eq(ClassicCategoryEntity::getParentId, dto.getParentId());
if (dto.getId() != null) {
duplicateQuery.ne(ClassicCategoryEntity::getId, dto.getId());
@ -227,9 +227,9 @@ public class ClassicCategoryApplicationServiceImpl implements ClassicCategoryApp
return Result.success(entity.toDTO(ClassicCategoryDTO::new));
}
// 4. 同父级下重名校验
// 4. 同父级下重名校验(区分大小写)
LambdaQueryWrapper<ClassicCategoryEntity> duplicateQuery = new LambdaQueryWrapper<ClassicCategoryEntity>()
.eq(ClassicCategoryEntity::getName, name)
.apply("BINARY name = {0}", name)
.eq(ClassicCategoryEntity::getParentId, entity.getParentId())
.ne(ClassicCategoryEntity::getId, id);
if (classicCategoryBaseService.count(duplicateQuery) > 0) {

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

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

Loading…
Cancel
Save