1.添加mybatisPlus依赖

2.排队取号接口
This commit is contained in:
2024-09-13 15:03:37 +08:00
parent 62e1ec8196
commit c02ff9b895
21 changed files with 898 additions and 6 deletions

View File

@@ -0,0 +1,42 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.dto.TakeNumberDTO;
import com.chaozhanggui.system.cashierservice.service.TbCallService;
import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* 叫号
*/
@RestController
@RequestMapping("/callTable")
@AllArgsConstructor
public class TbCallTableController {
private final TbCallService tbCallService;
@PostMapping("takeNumber")
public Result takeNumber(
@Validated @RequestBody TakeNumberDTO takeNumberDTO
) {
return Result.successWithData(tbCallService.takeNumber(takeNumberDTO));
}
/**
* 排号列表
* @param openId openId
* @param shopId 店铺id
* @return data
*/
@GetMapping
public Result get(
@RequestParam String openId,
@RequestParam Integer shopId
) {
return Result.successWithData(tbCallService.getList(shopId, openId));
}
}