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<>();