feat:增加测试打印接口
This commit is contained in:
@@ -21,17 +21,18 @@ public class AutoReplyPrintController {
|
||||
|
||||
/**
|
||||
* 获取打印机固件版本
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("CPPrinterGetPrinterFirmwareVersion")
|
||||
public Result<?> CPPrinterGetPrinterFirmwareVersion() {
|
||||
try {
|
||||
return autoReplyPrintService.CPPrinterGetPrinterFirmwareVersion();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info("获取打印机固件版本失败 {}", e.getMessage());
|
||||
return Result.error("获取打印机固件版本失败");
|
||||
}
|
||||
public Result<?> CPPrinterGetPrinterFirmwareVersion(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String USBName) {
|
||||
return autoReplyPrintService.CPPrinterGetPrinterFirmwareVersion(USBName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试打印
|
||||
*/
|
||||
@GetMapping("/testWrite")
|
||||
private Result<?> testWrite(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String USBName){
|
||||
return this.autoReplyPrintService.testWrite(USBName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user