排号增加叫号记录接口
This commit is contained in:
parent
077222c9b7
commit
675569c19e
|
|
@ -102,5 +102,16 @@ public class TbCallTableController {
|
|||
return ResponseEntity.ok(tbCallService.getQueue(shopId, callTableId, state, page, size));
|
||||
}
|
||||
|
||||
@AnonymousAccess
|
||||
@GetMapping("callRecord")
|
||||
public ResponseEntity<?> getCallRecord(
|
||||
@RequestParam Integer shopId,
|
||||
@RequestParam(required = false) Integer callTableId,
|
||||
@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer size
|
||||
) {
|
||||
return ResponseEntity.ok(tbCallService.getCallRecord(shopId, callTableId, page, size));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbCallQueue;
|
||||
import cn.ysk.cashier.mybatis.vo.CallRecordVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
|
|
@ -11,6 +14,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface TbCallQueueMapper extends BaseMapper<TbCallQueue> {
|
||||
|
||||
@Select("select * 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}")
|
||||
Page<CallRecordVO> selectCallRecord(Integer shopId, Integer callTableId, Page<Object> objectPage);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package cn.ysk.cashier.mybatis.vo;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbCallQueue;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.time.Instant;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CallRecordVO extends TbCallQueue {
|
||||
private String note;
|
||||
}
|
||||
|
|
@ -20,4 +20,6 @@ public interface TbCallService {
|
|||
Object takeNumberCode(Integer shopId, Integer callTableId);
|
||||
|
||||
Object getQueue(Integer shopId, Integer callTableId, Integer state, Integer page, Integer size);
|
||||
|
||||
Object getCallRecord(Integer shopId, Integer callTableId, Integer page, Integer size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import cn.ysk.cashier.dto.calltable.*;
|
|||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.mybatis.entity.TbCallQueue;
|
||||
import cn.ysk.cashier.mybatis.entity.TbCallTable;
|
||||
import cn.ysk.cashier.mybatis.mapper.TbCallQueueMapper;
|
||||
import cn.ysk.cashier.mybatis.mapper.TbShopUserMapper;
|
||||
import cn.ysk.cashier.mybatis.service.TbCallQueueService;
|
||||
import cn.ysk.cashier.mybatis.service.TbCallTableService;
|
||||
|
|
@ -39,6 +40,7 @@ public class TbCallServiceImpl implements TbCallService {
|
|||
private final TbShopUserMapper shopUserMapper;
|
||||
private final TbShopInfoRepository shopInfoRepository;
|
||||
private final StringRedisTemplate redisTemplate;
|
||||
private final TbCallQueueMapper tbCallQueueMapper;
|
||||
|
||||
@Override
|
||||
public Object add(CallTableDTO addCallTableDTO) {
|
||||
|
|
@ -346,4 +348,9 @@ public class TbCallServiceImpl implements TbCallService {
|
|||
// 返回结果列表
|
||||
return toMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCallRecord(Integer shopId, Integer callTableId, Integer page, Integer size) {
|
||||
return tbCallQueueMapper.selectCallRecord(shopId, callTableId, new Page<>(page, size));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue