店铺小票打印记录需求
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbPrintMachineLog;
|
||||
import com.chaozhanggui.system.cashierservice.service.ShopPrintLogService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 店铺小票打印记录
|
||||
* @author tankaikai
|
||||
* @since 2024-10-09 17:14
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
@RequestMapping("shop/print/log")
|
||||
public class ShopPrintLogController {
|
||||
|
||||
@Resource
|
||||
private ShopPrintLogService shopPrintLogService;
|
||||
|
||||
@GetMapping("page")
|
||||
public Result page(@RequestParam Map<String, Object> params) {
|
||||
PageInfo<TbPrintMachineLog> page = shopPrintLogService.page(params);
|
||||
return Result.success(CodeEnum.SUCCESS, page);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* 店铺打印机配置
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2024-09-24 16:56
|
||||
*/
|
||||
@@ -27,21 +28,21 @@ public class ShopPrinterController {
|
||||
private ShopPrinterService shopPrinterService;
|
||||
|
||||
@GetMapping("page")
|
||||
public Result page(@RequestParam Map<String, Object> params) {
|
||||
public Result page(@RequestHeader String token, @RequestParam Map<String, Object> params) {
|
||||
PageInfo<ShopPrinterDTO> page = shopPrinterService.page(params);
|
||||
return Result.success(CodeEnum.SUCCESS,page);
|
||||
return Result.success(CodeEnum.SUCCESS, page);
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public Result list(@RequestParam Map<String, Object> params) {
|
||||
List<ShopPrinterDTO> list = shopPrinterService.list(params);
|
||||
return Result.success(CodeEnum.SUCCESS,list);
|
||||
return Result.success(CodeEnum.SUCCESS, list);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
public Result get(@PathVariable("id") Integer id) {
|
||||
ShopPrinterDTO dto = shopPrinterService.get(id);
|
||||
return Result.success(CodeEnum.SUCCESS,dto);
|
||||
return Result.success(CodeEnum.SUCCESS, dto);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@@ -57,14 +58,14 @@ public class ShopPrinterController {
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
public Result delete(@PathVariable("id") Integer id){
|
||||
public Result delete(@PathVariable("id") Integer id) {
|
||||
shopPrinterService.delete(id);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
@PostMapping("update-status")
|
||||
public Result updateStatus(@RequestBody ShopPrinterDTO dto){
|
||||
shopPrinterService.updateStatus(dto.getId(),dto.getStatus());
|
||||
public Result updateStatus(@RequestBody ShopPrinterDTO dto) {
|
||||
shopPrinterService.updateStatus(dto.getId(), dto.getStatus());
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user