From 30ba4eb878b73c8c462aa817d930531aabee0b04 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Mon, 23 Sep 2024 17:02:10 +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=E5=8F=B7=E8=BF=94=E5=9B=9E=E5=8F=96=E5=8F=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashierservice/controller/TbCallTableController.java | 5 +---- .../cashierservice/service/impl/TbCallServiceImpl.java | 4 ++-- 2 files changed, 3 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 525db72..77ae919 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java @@ -60,13 +60,10 @@ public class TbCallTableController { @GetMapping("state") public Result getState( - @RequestParam(required = false) String openId, + @RequestParam String openId, @RequestParam Integer shopId, @RequestParam(required = false) Integer queueId ) { - if (StrUtil.isBlank(openId) && queueId == null) { - return Result.fail("shopId和queueId不能同时为空"); - } return Result.successWithData(tbCallService.getState(openId, shopId, queueId)); } 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 f5f4974..d49a968 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 @@ -145,9 +145,9 @@ public class TbCallServiceImpl implements TbCallService { @Override public Object getState(String openId, Integer shopId, Integer queueId) { // 先根据openId查询,查询不到根据queueId - List callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), null); + List callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), queueId); if (callQueueInfoVOS.isEmpty()) { - callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, null, DateUtil.today(), queueId); + callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), null); } TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(shopId); HashMap data = new HashMap<>();