PC端添加本地打印机
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbPrintPCMachine;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.PrintMachineDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPrintPCMachineService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* PC端添加打印机
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-04-01 10:52:52
|
||||
*/
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("tbPrintMachine")
|
||||
public class TbPrintPCMachineController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbPrintPCMachineService tbPrintPCMachineService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param tbPrintMachine 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping
|
||||
public Result queryByPage(TbPrintPCMachine tbPrintMachine) {
|
||||
return this.tbPrintPCMachineService.queryByPage(tbPrintMachine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public Result queryById(@PathVariable("id") Integer id) {
|
||||
return tbPrintPCMachineService.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbPrintMachine 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public Result add(@RequestBody PrintMachineDto tbPrintMachine) {
|
||||
return tbPrintPCMachineService.insert(tbPrintMachine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param tbPrintMachine 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody PrintMachineDto tbPrintMachine) {
|
||||
return tbPrintPCMachineService.update(tbPrintMachine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public Result deleteById(Integer id) {
|
||||
return tbPrintPCMachineService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user