1.添加mybatisPlus依赖
2.排队取号接口
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user