소스 검색

add 本地枚举接口返回

GITZYY 2 달 전
부모
커밋
6229415403

+ 4 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/business/EgOperateBusinessService.java

@@ -5,6 +5,7 @@ import com.hrsk.cloud.eg.app.request.api.EgApiEndpointReq;
 import com.hrsk.cloud.eg.app.request.api.EgApiLoanExtendReq;
 import com.hrsk.cloud.eg.app.request.api.EgApiProductExtendReq;
 import com.hrsk.cloud.eg.app.request.api.EgApiReq;
+import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
 import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiDo;
 import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiEndpointDo;
 import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiLoanExtendDo;
@@ -68,6 +69,9 @@ public class EgOperateBusinessService {
         }
         copy.setApiName(apiDo.getApiName());
         copy.setApiCode(apiDo.getApiCode());
+        copy.setApiConfig(HessianUtils.serialize(req.getApiConfig()));
+        copy.setRequestConfig(HessianUtils.serialize(req.getRequestConfig()));
+        copy.setResponseConfig(HessianUtils.serialize(req.getResponseConfig()));
         egApiEndpointService.save(copy);
         return copy.getId();
     }

+ 2 - 2
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/entity/EgApiEndpointDo.java

@@ -36,12 +36,12 @@ public class EgApiEndpointDo extends BaseDo implements Serializable {
     /**
      * 请求配置
      */
-    private String requestConfig;
+    private byte[] requestConfig;
 
     /**
      * 响应配置
      */
-    private String responseConfig;
+    private byte[] responseConfig;
 
     /**
      * 备注