feat:增加小票打印机接口以及获取状态接口
This commit is contained in:
@@ -28,8 +28,8 @@ public class TemplateController {
|
||||
@RequestParam Integer height,
|
||||
@PathVariable String templateName,
|
||||
@RequestParam(defaultValue = "E:\\images") String saveDir) {
|
||||
StringBuilder fileDir = new StringBuilder(saveDir);
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), templateName, width, height, fileDir);
|
||||
StringBuilder filePath = new StringBuilder();
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), templateName, width, height, filePath);
|
||||
return Result.ok("模板生成成功");
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ public class TemplateController {
|
||||
"<h2><span th:text='${name}'> </span></h2>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
StringBuilder fileDir = new StringBuilder(saveDir);
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), html, width, height, fileDir);
|
||||
StringBuilder filePath = new StringBuilder();
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), html, width, height, filePath);
|
||||
return Result.ok("模板生成成功");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user