排号获取桌型列表fix

This commit is contained in:
SongZhang 2024-09-18 10:01:27 +08:00
parent 5a6d4ce854
commit d0cec6c5ed
3 changed files with 5 additions and 1 deletions

View File

@ -3,12 +3,15 @@ package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@EqualsAndHashCode(callSuper = true)
@Data
public class TakeNumberDTO extends BaseCallTableDTO{
@NotNull
private Integer userId;
@NotEmpty
private String phone;
private String note;
private String name;

View File

@ -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 " +
"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);
}

View File

@ -310,6 +310,7 @@ public class TbCallServiceImpl implements TbCallService {
Long totalCount = 0L;
for (TbCallTable item : pageInfo.getRecords()) {
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
.eq(TbCallQueue::getCallTableId, item.getId())
.eq(TbCallQueue::getCreateDay, DateUtil.today())
.in(TbCallQueue::getState, 0, 1);
Long count = q.count();