From afe65d4a2f0ffffa1f89a19ad1c4dd633c2f245a Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Sat, 14 Sep 2024 17:26:21 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8E=92=E9=98=9F=E5=8F=96=E5=8F=B7=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashierservice/controller/TbCallTableController.java | 4 ++-- .../system/cashierservice/entity/vo/CallQueueInfoVO.java | 3 +++ .../system/cashierservice/mapper/TbCallQueueMapper.java | 3 +-- .../system/cashierservice/service/impl/TbCallServiceImpl.java | 2 +- src/main/resources/mapper/TbCallQueueMapper.xml | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java index 3615389..5c6fef1 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java @@ -48,9 +48,9 @@ public class TbCallTableController { return Result.successWithData(tbCallService.getAllInfo(shopId)); } - @DeleteMapping("/cancel") + @PostMapping("/cancel") public Result cancel( - @Validated @RequestParam CancelCallQueueDTO cancelCallQueueDTO + @Validated @RequestBody CancelCallQueueDTO cancelCallQueueDTO ) { return Result.successWithData(tbCallService.cancel(cancelCallQueueDTO)); } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java index 417f470..9174ce6 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java @@ -11,4 +11,7 @@ public class CallQueueInfoVO { private Integer waitTime; private Integer state; private String callNum; + private String shopState; + private String shopName; + private String logo; } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java index 4acebd9..f9601d2 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java @@ -3,7 +3,6 @@ package com.chaozhanggui.system.cashierservice.mapper; import com.chaozhanggui.system.cashierservice.entity.TbCallQueue; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.chaozhanggui.system.cashierservice.entity.vo.CallQueueInfoVO; -import org.apache.ibatis.annotations.Select; import java.util.List; @@ -15,7 +14,7 @@ import java.util.List; */ public interface TbCallQueueMapper extends BaseMapper { - List selectInfoByOpenId(Integer shopId, String openId); + List selectInfoByOpenId(Integer shopId, String openId, String today); } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java index 961eaad..60eb167 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java @@ -98,7 +98,7 @@ public class TbCallServiceImpl implements TbCallService { @Override public Object getList(Integer shopId, String openId) { - return callQueueMapper.selectInfoByOpenId(shopId, openId); + return callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today()); } @Override diff --git a/src/main/resources/mapper/TbCallQueueMapper.xml b/src/main/resources/mapper/TbCallQueueMapper.xml index 2734db4..bd8f54c 100644 --- a/src/main/resources/mapper/TbCallQueueMapper.xml +++ b/src/main/resources/mapper/TbCallQueueMapper.xml @@ -35,6 +35,7 @@