From fd3b9c0aecbcd97fadb927bef012e9ddc239490b Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Wed, 30 Oct 2024 18:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=B7=A5=E5=8D=95=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/RepairOrderInfoController.java | 2 +- .../service/impl/DlRepairTicketsServiceImpl.java | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java index 9e2cbbf4..dde61feb 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java @@ -111,6 +111,6 @@ public class RepairOrderInfoController { @GetMapping("/toPay") @Operation(summary = "PC支付按钮") public CommonResult toPay(@RequestParam("id")String id) throws IOException, NoSuchAlgorithmException, SignatureException, InvalidKeyException { - return success(repairOrderInfoService.payTransactions(id)); + return success(repairOrderInfoService.payTransactionsCode(id)); } } \ No newline at end of file diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 31d23f15..5ba05b08 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -743,11 +743,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl stringObjectMap = repairOrderInfoService.payTransactions(orderInfo.getId()); - payUrl = (String) stringObjectMap.get("prepay_id"); + Map stringObjectMap = repairOrderInfoService.payTransactionsCode(orderInfo.getId()); + payUrl = (String) stringObjectMap.get("code_url"); // 这个地方可能报错,报错就不生成二维码了,保证工单是能出来的 // 生成收款二维码 int width = 100, height = 100; @@ -1357,6 +1357,16 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, ticketId)); + RepairOrderInfo newOrderInfo = new RepairOrderInfo(); + newOrderInfo.setId(orderInfo.getId()); + // 更新商品原价和实付金额 + newOrderInfo.setGoodsPrice(tickets.getTotalPrice()); + newOrderInfo.setPayMoney(tickets.getTotalPrice()); + repairOrderInfoService.updateById(newOrderInfo); + return baseMapper.updateById(tickets) > 0; }