fix:优化小票打印逻辑
This commit is contained in:
@@ -28,7 +28,8 @@ public class TemplateController {
|
||||
@RequestParam Integer height,
|
||||
@PathVariable String templateName,
|
||||
@RequestParam(defaultValue = "E:\\images") String saveDir) {
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), templateName, width, height, saveDir);
|
||||
StringBuilder fileDir = new StringBuilder(saveDir);
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), templateName, width, height, fileDir);
|
||||
return Result.ok("模板生成成功");
|
||||
}
|
||||
|
||||
@@ -44,7 +45,8 @@ public class TemplateController {
|
||||
"<h2><span th:text='${name}'> </span></h2>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), html, width, height, saveDir);
|
||||
StringBuilder fileDir = new StringBuilder(saveDir);
|
||||
this.templateService.generateReceiptImage(JSONObject.parseObject(jsonData), html, width, height, fileDir);
|
||||
return Result.ok("模板生成成功");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user