From 7a2b8e64a3113c52c004983b4aa7dcc35f9b6fa0 Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Wed, 24 May 2023 19:01:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E6=B5=B7=E6=8A=A5?= =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/pages/users/user_spread_code/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/yudao-ui-app/pages/users/user_spread_code/index.vue b/yudao-ui-app/pages/users/user_spread_code/index.vue index a9374e9b9..22264c274 100644 --- a/yudao-ui-app/pages/users/user_spread_code/index.vue +++ b/yudao-ui-app/pages/users/user_spread_code/index.vue @@ -11,7 +11,7 @@ 可享一年返回{{item.refundAmount}}元话费 - 三个活动可同时参与,每个手机号仅限一次,最高可反1920元话费!!! + 三个活动可同时参与,每个手机号仅限一次,最高可返{{total}}元话费!!! {{tenantInfo.serviceMobile}} @@ -55,7 +55,16 @@ isHideBtn: false }; }, - computed: mapGetters(['isLogin', 'uid', 'userInfo', 'tenantId', 'tenantInfo']), + computed:{ + ...mapGetters(['isLogin', 'uid', 'userInfo', 'tenantId', 'tenantInfo']), + total: function(){ + let _total = 0 + for (let active of this.activityList) { + _total+= parseInt(active.refundAmount) + } + return _total + }, + }, onLoad() { if (!this.isLogin) { toLogin() From 8aa259531abdf333cef816af1f25e13ba6da757a Mon Sep 17 00:00:00 2001 From: perry <292303709@qq.com> Date: Wed, 24 May 2023 19:06:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/notify/WxPayNotifyController.java | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/notify/WxPayNotifyController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/notify/WxPayNotifyController.java index 4f1b31759..1568c8b58 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/notify/WxPayNotifyController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/notify/WxPayNotifyController.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.shop.controller.admin.notify; import cn.hutool.core.util.NumberUtil; import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO; import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper; import cn.iocoder.yudao.module.shop.service.order.StoreOrderService; @@ -115,6 +116,7 @@ public class WxPayNotifyController { * @return: */ @PostMapping("/refund_notify") + @TenantIgnore public String wxPayRefundNotify(@RequestBody String jsonData, HttpServletRequest request, HttpServletResponse response) throws Exception { // 支付结果通用通知文档: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7 // 支付成功结果通知 @@ -134,18 +136,20 @@ public class WxPayNotifyController { BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2); // 处理相关逻辑 RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.lambdaQuery().eq(RechargeOrderDO::getOrderId, result.getOutTradeNo())); - if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) { - log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal); - return "failure"; + if(orderDO!=null){ + if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) { + log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal); + return "failure"; + } + orderDO.setRefundStatus(2); + orderDO.setPaid(2); + rechargeOrderMapper.updateById(orderDO); + //删除提报记录 + phoneRecordService.deletePhoneGear(orderDO.getOrderId()); + // 修改订单状态 + // 写入 + response.setStatus(HttpServletResponse.SC_OK); } - orderDO.setRefundStatus(2); - orderDO.setPaid(2); - rechargeOrderMapper.updateById(orderDO); - //删除提报记录 - phoneRecordService.deletePhoneGear(orderDO.getOrderId()); - // 修改订单状态 - // 写入 - response.setStatus(HttpServletResponse.SC_OK); return "success"; } } catch (Exception e) {