排号获取桌型列表fix
This commit is contained in:
@@ -3,12 +3,15 @@ package cn.ysk.cashier.dto.calltable;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
public class TakeNumberDTO extends BaseCallTableDTO{
|
public class TakeNumberDTO extends BaseCallTableDTO{
|
||||||
|
@NotNull
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
@NotEmpty
|
||||||
private String phone;
|
private String phone;
|
||||||
private String note;
|
private String note;
|
||||||
private String name;
|
private String name;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public interface TbCallQueueMapper extends BaseMapper<TbCallQueue> {
|
|||||||
|
|
||||||
@Select("select a.*, b.note, TIMESTAMPDIFF(SECOND, a.create_time, NOW()) as since_at from tb_call_queue a " +
|
@Select("select a.*, b.note, TIMESTAMPDIFF(SECOND, a.create_time, NOW()) as since_at from tb_call_queue a " +
|
||||||
"left join tb_call_table b on a.call_table_id=b.id " +
|
"left join tb_call_table b on a.call_table_id=b.id " +
|
||||||
"where a.shop_id=#{shopId} and a.call_table_id=#{callTableId}")
|
"where a.shop_id=#{shopId} and a.call_table_id=#{callTableId} and a.state in (3, 2)")
|
||||||
Page<CallRecordVO> selectCallRecord(Integer shopId, Integer callTableId, Page<Object> objectPage);
|
Page<CallRecordVO> selectCallRecord(Integer shopId, Integer callTableId, Page<Object> objectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ public class TbCallServiceImpl implements TbCallService {
|
|||||||
Long totalCount = 0L;
|
Long totalCount = 0L;
|
||||||
for (TbCallTable item : pageInfo.getRecords()) {
|
for (TbCallTable item : pageInfo.getRecords()) {
|
||||||
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
|
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
|
||||||
|
.eq(TbCallQueue::getCallTableId, item.getId())
|
||||||
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
||||||
.in(TbCallQueue::getState, 0, 1);
|
.in(TbCallQueue::getState, 0, 1);
|
||||||
Long count = q.count();
|
Long count = q.count();
|
||||||
|
|||||||
Reference in New Issue
Block a user