소스 검색

更新!

TRX 1 년 전
부모
커밋
322a0b1ccc

+ 4 - 0
src/main/java/com/github/microservice/models/device/DeviceInfoSyncParam.java

@@ -51,6 +51,10 @@ public class DeviceInfoSyncParam {
     @Schema(description = "网关ID")
     private String gateWayId;
 
+    @Schema(description = "网关名称")
+    private String gateWayName;
+
     @Schema(description = "设备类型:消费机 闸机")
     private DeviceType deviceType;
+
 }

+ 2 - 0
src/main/java/com/github/microservice/models/device/DeviceSyncListParam.java

@@ -17,6 +17,8 @@ import java.util.List;
 @AllArgsConstructor
 @NoArgsConstructor
 public class DeviceSyncListParam {
+
     @Schema(description = "设备列表")
     private List<DeviceInfoSyncParam> list;
+
 }

+ 5 - 0
src/main/java/com/github/microservice/models/openAPI/OpenApiInfo.java

@@ -34,6 +34,11 @@ public class OpenApiInfo {
      */
     private String description;
 
+    /**
+     * api概况
+     */
+    private String summary;
+
     /**
      * 请求参数
      */

+ 12 - 8
src/main/java/com/github/microservice/types/payment/PaymentType.java

@@ -6,13 +6,13 @@ import lombok.Getter;
  * 支付方式
  */
 public enum PaymentType {
-    WeChat("微信", false, "WxPaymentMainService"),
-    UnionFrictionlessPay("银联无感支付", true, "UnionFrictionlessPayMainService"),
-    LakalaFrictionlessPay("拉卡拉无感支付", true, ""),
-    UserWallet("个人钱包", false, "WalletMainService"),
-    QrCode("微信支付", false, ""),
-    WxQrCode("微信付款码支付", false, ""),
-    ZfbQrCode("支付宝付款码支付", false, ""),
+    WeChat("微信", false, "WxPaymentMainService", null),
+    UnionFrictionlessPay("银联无感支付", true, "UnionFrictionlessPayMainService", null),
+    LakalaFrictionlessPay("拉卡拉快捷支付", true, "", PaymentChannelType.SecretFreePayment),
+    UserWallet("个人钱包", false, "WalletMainService", null),
+    QrCode("微信支付", false, "", null),
+    WxQrCode("微信付款码支付", false, "", null),
+    ZfbQrCode("支付宝付款码支付", false, "", null),
     ;
 
     @Getter
@@ -25,9 +25,13 @@ public enum PaymentType {
     @Getter
     private boolean payIsAsync;
 
-    PaymentType(String remark, boolean payIsAsync, String serviceBeanName) {
+    @Getter
+    private PaymentChannelType channelType;
+
+    PaymentType(String remark, boolean payIsAsync, String serviceBeanName, PaymentChannelType channelType) {
         this.remark = remark;
         this.payIsAsync = payIsAsync;
         this.serviceBeanName = serviceBeanName;
+        this.channelType = channelType;
     }
 }

+ 27 - 0
src/main/java/com/github/microservice/types/payment/PaymentTypeModel.java

@@ -0,0 +1,27 @@
+package com.github.microservice.types.payment;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author TRX
+ * @date 2024/10/10
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PaymentTypeModel {
+
+    private PaymentType paymentType;
+
+    private String name;
+
+    public String getName() {
+        if (paymentType != null) {
+            return paymentType.getRemark();
+        }
+        return "";
+    }
+
+}

+ 5 - 3
src/main/java/com/github/microservice/utils/OpenAPIScan.java

@@ -16,7 +16,7 @@ import java.util.List;
 @Slf4j
 public class OpenAPIScan {
 
-    public static List<OpenApiInfo> scanAPI(String str) {
+    public static List<OpenApiInfo> scanAPI(String str, String groupName) {
         List<OpenApiInfo> openAPIS = new ArrayList<>();
         try {
             JSONObject jsonObject = new JSONObject(str);
@@ -106,8 +106,10 @@ public class OpenAPIScan {
                         openAPI.setRequestMethod(method);
                         openAPI.setContentType("application/json");
                         openAPI.setDescription(object.getStr("description"));
-                        openAPI.setName(object.getStr("operationId"));
-                        openAPI.setGroup("一卡通平台");
+                        String summary = object.getStr("summary");
+                        openAPI.setSummary(summary);
+                        openAPI.setName(summary);
+                        openAPI.setGroup(groupName);
                         openAPI.setRequestParam(JSONUtil.toJsonStr(params));
                         openAPI.setResponseParam(JSONUtil.toJsonStr(response));
                         openAPIS.add(openAPI);