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) { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java index f6b920dd8..a4674ece1 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/RechargeOrderDO.java @@ -44,7 +44,7 @@ public class RechargeOrderDO extends TenantBaseDO { /** * 用户id */ - private Integer uid; + private Long uid; /** * 用户姓名 */ diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java index d4dc24d0c..2c9069099 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java @@ -1408,7 +1408,7 @@ public class StoreOrderServiceImpl extends ServiceImpl orderInfos = request.getOrderInfos(); orderDO.setOrderId(code); - orderDO.setUid(user.getId().intValue()); + orderDO.setUid(user.getId()); orderDO.setRealName(user.getNickname()); orderDO.setUserPhone(StringUtils.isEmpty(request.getUserPhone()) ? user.getMobile() : request.getUserPhone()); orderDO.setConfirmPhone(StringUtils.isEmpty(request.getConfirmPhone()) ? user.getMobile() : request.getConfirmPhone()); diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index 0f19e7b1d..3f3bbf134 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -1,6 +1,6 @@ let domain = 'http://api.cyywl.top' -// let domain = 'http://192.168.1.188:48080' +// let domain = 'http://192.168.1.147:48080' module.exports = { // 请求域名 格式: https://您的域名 @@ -8,7 +8,7 @@ module.exports = { HTTP_REQUEST_URL: domain, // #endif HTTP_ADMIN_URL:'http://api.cyywl.top', //PC后台的API请求地址,上传图片用 - // HTTP_ADMIN_URL:'http://192.168.1.188:48080', //PC后台的API请求地址,上传图片用 + // HTTP_ADMIN_URL:'http://192.168.1.147:48080', //PC后台的API请求地址,上传图片用 // #ifdef H5 //H5接口是浏览器地址 // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, diff --git a/yudao-ui-app/pages/member_application/index.vue b/yudao-ui-app/pages/member_application/index.vue index 076524845..246760382 100644 --- a/yudao-ui-app/pages/member_application/index.vue +++ b/yudao-ui-app/pages/member_application/index.vue @@ -87,7 +87,7 @@ }; }, - async onLoad() { + async onShow() { try{ uni.showLoading({ title: '加载中', diff --git a/yudao-ui-app/pages/member_equity/index.vue b/yudao-ui-app/pages/member_equity/index.vue index c928c5bbf..28e20545e 100644 --- a/yudao-ui-app/pages/member_equity/index.vue +++ b/yudao-ui-app/pages/member_equity/index.vue @@ -99,7 +99,7 @@ }; }, computed: mapGetters(['userInfo']), - async onLoad() { + async onShow() { const resful = await memberGradeInfo() if(resful.data.some((item) => !!parseInt(item.isExist))){ uni.setTabBarItem({ 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 77abdba74..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() @@ -77,6 +86,7 @@ quality: 0.95, cacheBust: true }); + console.log('i', i) } htmlToImage.toPng(document.getElementById('poster-wrap'), { quality: 0.95,