Jelajahi Sumber

add 提交锦碟crm

GITZYY 7 bulan lalu
induk
melakukan
cd7d225860

+ 7 - 7
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/business/GenerateCheckIntoHttpApiConfigService.java

@@ -206,12 +206,12 @@ public class GenerateCheckIntoHttpApiConfigService {
         JSONObject resultObj=new  JSONObject();
         KeyValueObject status=new KeyValueObject();
         status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatus");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
+        status.setValue("#root[code]==400?0:1");
+//        List<FunctionObject> functionObjects = Lists.newArrayList();
+//        FunctionObject functionObject = new FunctionObject();
+//        functionObject.setCode("resultCodeConvertStatus");
+//        functionObjects.add(functionObject);
+//        status.setFunctions(functionObjects);
         resultObj.put("status","#"+JSONObject.toJSONString(status));
         httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
         String jsonString = JSONObject.toJSONString(httpApiConfig);
@@ -393,7 +393,7 @@ public class GenerateCheckIntoHttpApiConfigService {
         status.setValue("#root[code]");
         List<FunctionObject> functionObjects = Lists.newArrayList();
         FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatus");
+        functionObject.setCode("resultCodeConvertStatusInteger");
         functionObjects.add(functionObject);
         status.setFunctions(functionObjects);
         resultObj.put("status","#"+JSONObject.toJSONString(status));

+ 8 - 1
start/src/test/java/StartTest.java

@@ -67,6 +67,13 @@ public class StartTest {
         generateCHeckIntoHttpApiConfigService.generateQinYuConfig(productBusinessApiInfoDos.get(0).getThreeSystemConfig());
     }
 
+    @Test
+    public void createJinDieApiTest(){
+        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = productBusinessApiInfoService.selectByJointCodeForList("5");
+//        String jsonString = JSONObject.toJSONString(productBusinessApiInfoDos.get(0).getThreeSystemConfig());
+        generateCHeckIntoHttpApiConfigService.generateJinDieConfig(productBusinessApiInfoDos.get(1).getThreeSystemConfig());
+    }
+
 
     @Test
     public void createXinLuApiTest(){
@@ -218,7 +225,7 @@ public class StartTest {
      */
     @Test
     public void jinDieApiRsaTest(){
-        Long apiId= 441336439865408L;
+        Long apiId= 441425735573312L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");