From b130339b932a0f2908aa55dfc75d607a65d8caa9 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 17 Nov 2023 18:59:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/bweb/controller/HighOrderController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java index e70d7a9e..84a279ca 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java @@ -73,11 +73,11 @@ public class HighOrderController { @RequestMapping(value = "/print", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "打印") - public ResponseData print(@RequestParam(name = "orderId", required = true) Long orderId, + public ResponseData print(@RequestParam(name = "orderNo", required = true) String orderNo, @RequestParam(name = "printType", required = true) Integer printType) { try { - HighOrder order = highOrderService.getOrderById(orderId); + HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order == null) { log.error("HighCouponController -> getCouponList() error!","权限不足"); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, ""); From d0e309cae1b0e7e2d83d5c4f6641d366889de861 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 20 Nov 2023 10:28:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hai/config/SpPrinterTemplate.java | 4 ++-- .../src/main/java/com/hai/config/ZkcPrinterTemplate.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java b/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java index d2b3aecc..032c3345 100644 --- a/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java +++ b/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java @@ -77,7 +77,7 @@ public class SpPrinterTemplate { "------------------------------
" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "
" + "支付时间:" + payTime + "
" + - "电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "
" + + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "
" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "
" + "油枪:"+ gunNo + "号
" + "油品:" + oilNo + "#
" + @@ -122,7 +122,7 @@ public class SpPrinterTemplate { "------------------------------
" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "
" + "支付时间:" + payTime + "
" + - "电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "
" + + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "
" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "
" + "油枪:"+ gunNo + "号
" + "油品:" + oilNo + "#
" + diff --git a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java index b85b8668..ea5f3f6f 100644 --- a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java +++ b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java @@ -153,7 +153,7 @@ public class ZkcPrinterTemplate { stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(0x0A); - stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); + stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8")); stream.write(0x0A); stream.write(("来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")).getBytes("UTF-8")); @@ -257,7 +257,7 @@ public class ZkcPrinterTemplate { stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(0x0A); - stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); + stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8")); stream.write(0x0A); stream.write("来源:嗨森逛".getBytes("UTF-8"));