增加排号卓型添加顺延字段

This commit is contained in:
2024-09-20 09:49:31 +08:00
parent 0d06185849
commit 34c052902a
4 changed files with 12 additions and 6 deletions

View File

@@ -67,11 +67,9 @@ public class TbCallServiceImpl implements TbCallService {
public Object add(CallTableDTO addCallTableDTO) {
Long count = callTableService.lambdaQuery()
.eq(TbCallTable::getShopId, addCallTableDTO.getShopId())
.and(q -> {
q.eq(TbCallTable::getName, addCallTableDTO.getName())
.or()
.eq(TbCallTable::getPrefix, addCallTableDTO.getPrefix());
}).count();
.and(q -> q.eq(TbCallTable::getName, addCallTableDTO.getName())
.or()
.eq(TbCallTable::getPrefix, addCallTableDTO.getPrefix())).count();
if (count > 0) {
throw new BadRequestException("名称或前缀已存在");
}