From fe3b0f4a3c46892f08421dd4c4d0937fb8a87f93 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 06 六月 2023 17:55:10 +0800
Subject: [PATCH] 优化代码
---
service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java b/service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java
index a96505b..fb220d3 100644
--- a/service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java
+++ b/service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java
@@ -10,6 +10,7 @@
import com.java110.core.log.LoggerFactory;
import com.java110.dto.app.AppDto;
import com.java110.dto.owner.OwnerAppUserDto;
+import com.java110.dto.payment.NotifyPaymentOrderDto;
import com.java110.dto.payment.PaymentOrderDto;
import com.java110.dto.smallWeChat.SmallWeChatDto;
import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
@@ -89,7 +90,7 @@
String appId = context.getReqHeaders().get("app-id");
String userId = context.getReqHeaders().get("user-id");
String tradeType = reqJson.getString("tradeType");
- String notifyUrl = UrlCache.getOwnerUrl()+"/app/payment/notify/wechat/992020011134400001";
+ String notifyUrl = UrlCache.getOwnerUrl()+"/app/payment/notify/wechat/992020011134400001/"+smallWeChatDto.getObjId();
String openId = reqJson.getString("openId");
@@ -223,14 +224,15 @@
@Override
- public PaymentOrderDto java110NotifyPayment(String param) {
+ public PaymentOrderDto java110NotifyPayment(NotifyPaymentOrderDto notifyPaymentOrderDto) {
+ String param = notifyPaymentOrderDto.getParam();
PaymentOrderDto paymentOrderDto = new PaymentOrderDto();
JSONObject json = JSON.parseObject(param);
String signature = json.getString("signature");
String content = json.getString("content");
- String appId;
+ String appId = null;
if (json.containsKey("wId")) {
String wId = json.get("wId").toString();
wId = wId.replace(" ", "+");
@@ -241,6 +243,7 @@
JSONObject paramIn = new JSONObject();
paramIn.put("appId", appId);
+ paramIn.put("communityId",notifyPaymentOrderDto.getCommunityId());
SmallWeChatDto smallWeChatDto = getSmallWechat(paramIn);
if (smallWeChatDto == null) {
throw new IllegalArgumentException("鏈厤缃叕浼楀彿鎴栬�呭皬绋嬪簭淇℃伅");
@@ -282,6 +285,8 @@
smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
+ smallWeChatDto.setObjId(paramIn.getString("communityId"));
+
return smallWeChatDto;
}
--
Gitblit v1.8.0