1.排队取号 取号打印小票,增加订阅接口
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.BaseCallTableDTO;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.CallSubMsgDTO;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.CancelCallQueueDTO;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.TakeNumberDTO;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbCallService;
|
||||
@@ -35,10 +37,14 @@ public class TbCallTableController {
|
||||
*/
|
||||
@GetMapping("queue")
|
||||
public Result get(
|
||||
@RequestParam String openId,
|
||||
@RequestParam Integer shopId
|
||||
@RequestParam(required = false) String openId,
|
||||
@RequestParam Integer shopId,
|
||||
@RequestParam(required = false) Integer queueId
|
||||
) {
|
||||
return Result.successWithData(tbCallService.getList(shopId, openId));
|
||||
if (StrUtil.isBlank(openId) && queueId == null) {
|
||||
return Result.fail("shopId和queueId不能同时为空");
|
||||
}
|
||||
return Result.successWithData(tbCallService.getList(shopId, openId, queueId));
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@@ -57,10 +63,21 @@ public class TbCallTableController {
|
||||
|
||||
@GetMapping("state")
|
||||
public Result getState(
|
||||
@RequestParam String openId,
|
||||
@RequestParam Integer shopId
|
||||
@RequestParam(required = false) String openId,
|
||||
@RequestParam Integer shopId,
|
||||
@RequestParam(required = false) Integer queueId
|
||||
) {
|
||||
return Result.successWithData(tbCallService.getState(openId, shopId));
|
||||
if (StrUtil.isBlank(openId) && queueId == null) {
|
||||
return Result.fail("shopId和queueId不能同时为空");
|
||||
}
|
||||
return Result.successWithData(tbCallService.getState(openId, shopId, queueId));
|
||||
}
|
||||
|
||||
@PutMapping("subMsg")
|
||||
public Result subMsg(
|
||||
@RequestBody CallSubMsgDTO subMsgDTO
|
||||
) {
|
||||
return Result.successWithData(tbCallService.subMsg(subMsgDTO));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user