1.排队取号 取号返回取号信息

This commit is contained in:
2024-09-23 17:02:10 +08:00
parent 715c661a4e
commit 30ba4eb878
2 changed files with 3 additions and 6 deletions

View File

@@ -60,13 +60,10 @@ public class TbCallTableController {
@GetMapping("state") @GetMapping("state")
public Result getState( public Result getState(
@RequestParam(required = false) String openId, @RequestParam String openId,
@RequestParam Integer shopId, @RequestParam Integer shopId,
@RequestParam(required = false) Integer queueId @RequestParam(required = false) Integer queueId
) { ) {
if (StrUtil.isBlank(openId) && queueId == null) {
return Result.fail("shopId和queueId不能同时为空");
}
return Result.successWithData(tbCallService.getState(openId, shopId, queueId)); return Result.successWithData(tbCallService.getState(openId, shopId, queueId));
} }

View File

@@ -145,9 +145,9 @@ public class TbCallServiceImpl implements TbCallService {
@Override @Override
public Object getState(String openId, Integer shopId, Integer queueId) { public Object getState(String openId, Integer shopId, Integer queueId) {
// 先根据openId查询查询不到根据queueId // 先根据openId查询查询不到根据queueId
List<CallQueueInfoVO> callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), null); List<CallQueueInfoVO> callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), queueId);
if (callQueueInfoVOS.isEmpty()) { if (callQueueInfoVOS.isEmpty()) {
callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, null, DateUtil.today(), queueId); callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), null);
} }
TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(shopId); TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(shopId);
HashMap<String, Object> data = new HashMap<>(); HashMap<String, Object> data = new HashMap<>();