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

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

View File

@ -24,4 +24,6 @@ public class CallTableDTO {
private Integer start;
@Min(1)
private Integer nearNum;
private Integer isPostpone;
private Integer postponeNum;
}

View File

@ -54,4 +54,10 @@ public class TbCallTable {
@Column(name = "update_time")
private Instant updateTime;
@Column(name = "is_postpone")
private Byte isPostpone;
@Column(name = "postpone_num")
private Integer postponeNum;
}

View File

@ -1,7 +1,7 @@
package cn.ysk.cashier.mybatis.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ysk.cashier.mybatis.entity.TbCallTable;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ysk.cashier.mybatis.service.TbCallTableService;
import cn.ysk.cashier.mybatis.mapper.TbCallTableMapper;
import org.springframework.context.annotation.Primary;

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("名称或前缀已存在");
}