增加排号卓型添加顺延字段
This commit is contained in:
@@ -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("名称或前缀已存在");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user