增加排号卓型添加顺延字段
This commit is contained in:
parent
0d06185849
commit
34c052902a
|
|
@ -24,4 +24,6 @@ public class CallTableDTO {
|
|||
private Integer start;
|
||||
@Min(1)
|
||||
private Integer nearNum;
|
||||
private Integer isPostpone;
|
||||
private Integer postponeNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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("名称或前缀已存在");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue