Ver código fonte

阳光生产配置

Qchen 1 ano atrás
pai
commit
aba9c1ae01

+ 6 - 16
src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java

@@ -8,26 +8,16 @@ import org.springframework.stereotype.Component;
 @Component
 @ConfigurationProperties(prefix = "yangguang.api")
 public class YangGuangApiConfigurationProperties {
-    // 测试地址
-    private String urlTest;
-
-    // 生产地址
-    private String urlProd;
-
-    // 测试key
-    private String testKey;
-
-    // 生产key
-    private String prodKey;
+    // 地址
+    private String url;
+    // key
+    private String key;
 
     // 支付回调地址
     private String payCallBack;
 
-    // 影像上传地址测试
-    private String uploadUrlTest;
-
-    // 影像上传地址正式
-    private String uploadUrlProd;
+    // 影像上传地址
+    private String uploadUrl;
 
     // 影像上传key
     private String secret;

+ 4 - 4
src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java

@@ -68,9 +68,9 @@ public class YangGuangRequestApiComponents {
     private <Q extends YangGuangBaseRequest, S extends YangGuangBaseResponse> S post(Q q, Class<S> tClass) throws JsonProcessingException {
 
         // 发送请求
-        String url = yangGuangApiConfigurationProperties.getUrlProd();
+        String url = yangGuangApiConfigurationProperties.getUrl();
         String encryptRequestBody = yangGuangEncryption.encryptRequestBody
-                (q, yangGuangApiConfigurationProperties.getProdKey());
+                (q, yangGuangApiConfigurationProperties.getKey());
         //设置请求头类型
         HttpHeaders headers = new HttpHeaders();
         HttpEntity<String> entity = new HttpEntity<>(encryptRequestBody, headers);
@@ -78,7 +78,7 @@ public class YangGuangRequestApiComponents {
         String body = response.getBody();
 
         // 处理解密
-        String decryptedResponse = yangGuangEncryption.authcodeDecode(body, yangGuangApiConfigurationProperties.getProdKey());
+        String decryptedResponse = yangGuangEncryption.authcodeDecode(body, yangGuangApiConfigurationProperties.getKey());
 
         InsuranceLog.infoLog(InsuranceEnum.YGBX.getPinyin(), "\n\n---------> 响应参数:{}", decryptedResponse);
         JSONObject jsonObject = JSON.parseObject(decryptedResponse);
@@ -135,7 +135,7 @@ public class YangGuangRequestApiComponents {
      */
     public String upload(String json) throws Exception {
         String responesStr = "";
-        String url = yangGuangApiConfigurationProperties.getUploadUrlProd();
+        String url = yangGuangApiConfigurationProperties.getUploadUrl();
         String secret = yangGuangApiConfigurationProperties.getSecret();
         String referer = yangGuangApiConfigurationProperties.getReferer();
         String encode = EncodeAccessParam.getEncodeParam(String.valueOf(json), 1000L,secret);

+ 3 - 6
src/main/resources/application-prod.yml

@@ -374,12 +374,9 @@ knife4j:
 # 阳光财险
 yangguang:
   api:
-    testKey: uYPP7AIc3HYsUh8rFn
-    prodKey: GVGFDsmWyvydKuCrtP
-    urlTest: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    urlProd: http://wxopenapi.sinosig.com/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    uploadUrlTest: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
-    uploadUrlProd: http://autoimage.sinosig.com/AutoImagePlatform/third/upload
+    key: GVGFDsmWyvydKuCrtP
+    url: http://wxopenapi.sinosig.com/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    uploadUrl: http://autoimage.sinosig.com/AutoImagePlatform/third/upload
     payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
     secret: 6CPxxlHwLLphTR7gVg3hJLsH
     referer: SXJZG

+ 3 - 6
src/main/resources/application-test.yml

@@ -453,12 +453,9 @@ pingan:
 # 阳光财险测试地址
 yangguang:
   api:
-    testKey: uYPP7AIc3HYsUh8rFn
-    prodKey: GVGFDsmWyvydKuCrtP
-    urlTest: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    urlProd: http://wxopenapi.sinosig.com/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    uploadUrlTest: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
-    uploadUrlProd: http://autoimage.sinosig.com/AutoImagePlatform/third/upload
+    key: uYPP7AIc3HYsUh8rFn
+    url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    uploadUrl: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
     payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
     secret: 6CPxxlHwLLphTR7gVg3hJLsH
     referer: SXJZG