1.排队取号 取号返回取号信息
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -145,9 +145,9 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
@Override
|
||||
public Object getState(String openId, Integer shopId, Integer 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()) {
|
||||
callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, null, DateUtil.today(), queueId);
|
||||
callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today(), null);
|
||||
}
|
||||
TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user