TRX преди 1 година
родител
ревизия
ffabf76704

+ 2 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/controller/WalletController.java

@@ -3,7 +3,7 @@ package com.zhongshu.payment.server.core.controller;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.payment.client.model.param.GetWalletParam;
-import com.zhongshu.payment.server.core.service.pay.impl.wallet.WalletService;
+import com.zhongshu.payment.server.core.service.pay.impl.wallet.WalletMainService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
 public class WalletController {
 
     @Autowired
-    WalletService walletService;
+    WalletMainService walletService;
 
 //    /** 获取钱包微信授权状态 */
 //    @Operation(summary = "获取钱包微信授权状态", description = "获取钱包微信授权状态")

+ 6 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/domain/wallet/RechargeRecord.java

@@ -26,7 +26,7 @@ import java.math.BigDecimal;
 @Document
 public class RechargeRecord extends SuperEntity {
 
-    @Schema(name = "oid", description = "项目id")
+    @Schema(name = "oid", description = "项目oid")
     @Indexed
     private String oid;
 
@@ -34,10 +34,14 @@ public class RechargeRecord extends SuperEntity {
     @Indexed
     private String userId;
 
-    @Schema(name = "schoolId", description = "学校id")
+    @Schema(name = "schoolId", description = "学校oid")
     @Indexed
     private String schoolId;
 
+    @Schema(name = "shopId", description = "商户oid")
+    @Indexed
+    private String shopId;
+
     @Schema(name = "appid", description = "小程序appid")
     @Indexed
     private String appid;

+ 9 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/common/ScanExecuteService.java

@@ -1,5 +1,6 @@
 package com.zhongshu.payment.server.core.service.common;
 
+import com.github.microservice.models.type.PaymentType;
 import com.zhongshu.payment.client.annotation.PayAnnotationService;
 import com.zhongshu.payment.server.core.dao.ExecuteMethodInfoDao;
 import com.zhongshu.payment.server.core.domain.unionFrictionlessPay.ExecuteMethodInfo;
@@ -7,6 +8,7 @@ import com.zhongshu.payment.server.core.service.other.ScanSupport;
 import com.zhongshu.payment.server.core.utils.CommonUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -42,8 +44,13 @@ public class ScanExecuteService {
                 PayAnnotationService annotation = (PayAnnotationService) cls.getAnnotation(PayAnnotationService.class);
                 ExecuteMethodInfo executeMethodInfo = new ExecuteMethodInfo();
                 executeMethodInfo.setBeanName(className);
-                executeMethodInfo.setPaymentType(annotation.paymentType());
-                executeMethodInfo.setRemark(annotation.remark());
+                PaymentType paymentType = annotation.paymentType();
+                String remark = annotation.remark();
+                if (StringUtils.isEmpty(remark)) {
+                    remark = paymentType.getRemark();
+                }
+                executeMethodInfo.setPaymentType(paymentType);
+                executeMethodInfo.setRemark(remark);
                 list.add(executeMethodInfo);
             }
         }

+ 3 - 0
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/unionFrictionlessPay/UnionFrictionlessPayMainService.java

@@ -1,6 +1,8 @@
 package com.zhongshu.payment.server.core.service.pay.impl.unionFrictionlessPay;
 
+import com.github.microservice.models.type.PaymentType;
 import com.github.microservice.net.ResultContent;
+import com.zhongshu.payment.client.annotation.PayAnnotationService;
 import com.zhongshu.payment.client.model.WalletModel;
 import com.zhongshu.payment.client.model.param.OrderParam;
 import com.zhongshu.payment.client.model.param.WalletQueryParam;
@@ -19,6 +21,7 @@ import org.springframework.stereotype.Service;
  */
 @Slf4j
 @Service
+@PayAnnotationService(paymentType = PaymentType.UnionFrictionlessPay, remark = "银联无感支付")
 public class UnionFrictionlessPayMainService extends SuperPayService {
 
     /**

+ 1 - 1
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/wallet/WalletFeignServiceImpl.java

@@ -31,7 +31,7 @@ public class WalletFeignServiceImpl implements WalletFeignService {
     WalletFlowDao walletFlowDao;
 
     @Autowired
-    WalletService walletService;
+    WalletMainService walletService;
 
     @Override
     public ResultContent<WalletModel> getWallet(String oid, WalletType walletType, String shopId, String userId) {

+ 5 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/wallet/WalletService.java → PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/wallet/WalletMainService.java

@@ -2,11 +2,13 @@ package com.zhongshu.payment.server.core.service.pay.impl.wallet;
 
 import ch.qos.logback.core.util.StringUtil;
 import com.github.microservice.auth.security.helper.AuthHelper;
+import com.github.microservice.models.type.PaymentType;
 import com.github.microservice.net.ResultContent;
 import com.zhongshu.card.client.model.feign.ProjectWxPayParam;
 import com.zhongshu.card.client.model.payment.paySetting.WxPayConfigModel;
 import com.zhongshu.card.client.service.feign.OrganizationFeignService;
 import com.zhongshu.card.client.service.feign.ProjectPaySettingFeignService;
+import com.zhongshu.payment.client.annotation.PayAnnotationService;
 import com.zhongshu.payment.client.model.WalletModel;
 import com.zhongshu.payment.client.model.WalletOrderModel;
 import com.zhongshu.payment.client.model.param.GetWalletParam;
@@ -30,14 +32,15 @@ import org.springframework.stereotype.Service;
 import java.math.BigDecimal;
 
 /**
- * 钱包信息
+ * 钱包支付信息
  *
  * @author wjf
  * @date 2024/7/24
  */
 @Slf4j
 @Service
-public class WalletService extends SuperPayService {
+@PayAnnotationService(paymentType = PaymentType.UserWallet, remark = "个人钱包")
+public class WalletMainService extends SuperPayService {
 
     @Autowired
     WalletDao walletDao;