增加排号卓型添加顺延字段
This commit is contained in:
parent
0d06185849
commit
34c052902a
|
|
@ -24,4 +24,6 @@ public class CallTableDTO {
|
||||||
private Integer start;
|
private Integer start;
|
||||||
@Min(1)
|
@Min(1)
|
||||||
private Integer nearNum;
|
private Integer nearNum;
|
||||||
|
private Integer isPostpone;
|
||||||
|
private Integer postponeNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,4 +54,10 @@ public class TbCallTable {
|
||||||
@Column(name = "update_time")
|
@Column(name = "update_time")
|
||||||
private Instant updateTime;
|
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;
|
package cn.ysk.cashier.mybatis.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import cn.ysk.cashier.mybatis.entity.TbCallTable;
|
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.service.TbCallTableService;
|
||||||
import cn.ysk.cashier.mybatis.mapper.TbCallTableMapper;
|
import cn.ysk.cashier.mybatis.mapper.TbCallTableMapper;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,9 @@ public class TbCallServiceImpl implements TbCallService {
|
||||||
public Object add(CallTableDTO addCallTableDTO) {
|
public Object add(CallTableDTO addCallTableDTO) {
|
||||||
Long count = callTableService.lambdaQuery()
|
Long count = callTableService.lambdaQuery()
|
||||||
.eq(TbCallTable::getShopId, addCallTableDTO.getShopId())
|
.eq(TbCallTable::getShopId, addCallTableDTO.getShopId())
|
||||||
.and(q -> {
|
.and(q -> q.eq(TbCallTable::getName, addCallTableDTO.getName())
|
||||||
q.eq(TbCallTable::getName, addCallTableDTO.getName())
|
.or()
|
||||||
.or()
|
.eq(TbCallTable::getPrefix, addCallTableDTO.getPrefix())).count();
|
||||||
.eq(TbCallTable::getPrefix, addCallTableDTO.getPrefix());
|
|
||||||
}).count();
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new BadRequestException("名称或前缀已存在");
|
throw new BadRequestException("名称或前缀已存在");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue