From 5e74237e0494ca9d544b3aa068bc934f9d99c136 Mon Sep 17 00:00:00 2001 From: tangqian Date: Fri, 16 Jun 2023 13:25:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=E6=8E=A8=E5=B9=BF=E5=91=98=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/impl/StoreOrderServiceImpl.java | 5 --- .../shop/support/pay/WxPayStrategy.java | 44 +++++++++---------- 2 files changed, 22 insertions(+), 27 deletions(-) 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 b037cd499..dd91bd4b5 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 @@ -1188,9 +1188,6 @@ public class StoreOrderServiceImpl extends ServiceImpl infoDOS = new ArrayList<>(); orderInfos.forEach(info -> { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/WxPayStrategy.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/WxPayStrategy.java index 94ff9e5b2..a5f91de06 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/WxPayStrategy.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/WxPayStrategy.java @@ -47,28 +47,28 @@ public class WxPayStrategy implements IPayStrategy{ Long requiredTenantId = TenantContextHolder.getRequiredTenantId(); TenantDTO tenant = tenantApi.getTenant(requiredTenantId); InitOrderResponse response = new InitOrderResponse(); -// WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService(); -// Assert.notNull(wxPayService, "获取微信支付配置失败!"); -// WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request(); -// int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue(); -// wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum)); -// wxPayRequest.setDescription(tenant.getName()); -// wxPayRequest.setOutTradeNo(orderDO.getOrderId()); -// wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl()); -// wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid)); -// wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest))); -// wxPayRequest.setAppid(payProperties.getAppId()); -// wxPayRequest.setMchid(payProperties.getMchId()); -// try { -// WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest); -// WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey()); -// InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult(); -// BeanUtils.copyProperties(jsapiResult, jsapiResultNew); -// response.setJsapiResult(jsapiResultNew); -// BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response); -// } catch (Exception e) { -// log.error(e.getMessage()); -// } + WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService(); + Assert.notNull(wxPayService, "获取微信支付配置失败!"); + WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request(); + int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue(); + wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum)); + wxPayRequest.setDescription(tenant.getName()); + wxPayRequest.setOutTradeNo(orderDO.getOrderId()); + wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl()); + wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid)); + wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest))); + wxPayRequest.setAppid(payProperties.getAppId()); + wxPayRequest.setMchid(payProperties.getMchId()); + try { + WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest); + WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey()); + InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult(); + BeanUtils.copyProperties(jsapiResult, jsapiResultNew); + response.setJsapiResult(jsapiResultNew); + BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response); + } catch (Exception e) { + log.error(e.getMessage()); + } return response; } From 77ffc74c3d13a4c60003b65505d407672351ce51 Mon Sep 17 00:00:00 2001 From: tangqian Date: Fri, 16 Jun 2023 13:30:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=E6=8E=A8=E5=B9=BF=E5=91=98=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/shop/service/order/impl/StoreOrderServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 dd91bd4b5..d3e5c6c63 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 @@ -1320,8 +1320,7 @@ public class StoreOrderServiceImpl extends ServiceImpl Date: Fri, 16 Jun 2023 14:12:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=E6=8E=A8=E5=B9=BF=E5=91=98=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/recharge/RechargeOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml index 9b671cedf..5055e3743 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderMapper.xml @@ -252,7 +252,7 @@ and b.nickname like CONCAT('%',#{data.nickname},'%') - and x.real_name like CONCAT('%',#{data.realName},'%') + and x.nickname like CONCAT('%',#{data.realName},'%') and a.user_phone like CONCAT('%',#{data.userPhone},'%') From 6be709216e9d4970656647d03c0e5e2deeca4919 Mon Sep 17 00:00:00 2001 From: tangqian Date: Fri, 16 Jun 2023 14:34:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=E6=8E=A8=E5=B9=BF=E5=91=98=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/order/StoreOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/order/StoreOrderMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/order/StoreOrderMapper.xml index dfb7aa5ac..2c43a9f54 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/order/StoreOrderMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/order/StoreOrderMapper.xml @@ -77,7 +77,7 @@ `cy_recharge_order_info` info LEFT JOIN cy_recharge_order ord ON info.recharge_order_id = ord.id WHERE - ord.paid = 1 + ord.paid != 0 and info.create_time >= #{startTime}