Fără Descriere

GITZYY 2e4bb5e8d3 Merge remote-tracking branch 'origin/release-checkinto-241113' into release-checkinto-241113 1 zi în urmă
db 3398484b4c add db 文件 2 luni în urmă
egress-gateway-service-adapter a88fae7b77 update check 1 săptămână în urmă
egress-gateway-service-app 29a8a550a2 update check 1 săptămână în urmă
egress-gateway-service-client 6ff64313a9 add XdApplyCmd 1 zi în urmă
egress-gateway-service-domain 7ea5c5d938 撞库 1 zi în urmă
egress-gateway-service-infrastructure da98ad3afb 1 6 zile în urmă
start d8e0203d29 update check 1 săptămână în urmă
.gitignore 23a594f517 add 日志排除文件 3 luni în urmă
README.md c62be27d89 Merge branch 'feature-butt-joint-2024-08-26' into release-checkinto-241113 2 săptămâni în urmă
pom.xml 01843af264 add commons 5 zile în urmă

README.md

egress-gateway-service

接出网关工程:egress-gateway-service,提供业务/数据的接出能力。

统一返回的信息封装

1 http/https 统一返回信息实体DataVo 2 spel 表达式接受并且转化所有的信息为map,map解析的结果用#root “#root” 为map 的根

eg eg_api

1 redis key code 编码信息 eg+前缀+'历史loan-web-api对接code值'

mybatis plus meta handler

1 使用 BaseDo 进行填充 2 BaseDo 添加了 @TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.UPDATE) 注解

http 加载信息 初始化 参考

 JSONObject jsonObject=JSONObject.parseObject(param);
        HttpApiConfig httpApiConfig = new HttpApiConfig();
        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
        httpApiConfig.setMethod("POST");
        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
        List<KeyValueObject> headers = Lists.newArrayList();
        KeyValueObject head=new KeyValueObject();
        head.setType(ValueObjectTypeEnum.BASIC.getType());
        head.setKey("Content-Type");
        head.setValue("application/json");
        headers.add(head);
        httpApiConfig.setHeader(headers);
        JSONObject body=new  JSONObject();
        KeyValueObject attackPhone=new KeyValueObject();
        attackPhone.setType("spel");
        attackPhone.setValue("#param.user.phoneMd5");
        KeyValueObject merchantNo=new KeyValueObject();
        merchantNo.setType("spel");
        merchantNo.setValue("#param.user.merchantNo");
        body.put("attackPhone",JSONObject.toJSONString(attackPhone));
        body.put("merchantNo",JSONObject.toJSONString(merchantNo));
        //主体
        httpApiConfig.setContent(JSONObject.toJSONString(body));
        String jsonString = JSONObject.toJSONString(httpApiConfig);
        log.info("json input data {}",jsonString);
         return httpApiConfig;

格式化后的http请求格式


//
//        FunctionObject md5 = new FunctionObject();
//        md5.setCode("md5");
//        HttpApiConfig hac = new HttpApiConfig()
//                .setUrl("https://baidu.com");
//        hac.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
//        hac.setType("http");
//        List<KeyValueObject> h = Lists.newArrayList();
//        KeyValueObject h1 = new KeyValueObject();
//        h1.setKey("secretKey");
//        h1.setType("text");
//        h1.setValue("Khw99%$l%-2gF7P4jXglp_-jQqQirtYnOY5D");
//        h.add(h1);
//        KeyValueObject h2 = new KeyValueObject();
//        h2.setKey("merchantNo");
//        h2.setType("spel");
//        h2.setValue("#param.realName");
//        h.add(h2);
//        List<ValueObject> p = Lists.newArrayList();
//        ValueObject p1 = new ValueObject();
//        p1.setType("text");
//        p1.setValue("123");
//        ValueObject p2 = new ValueObject();
//        p2.setType("text");
//        p2.setValue("456");
//        p2.getFunctions().add(md5);
//        p.add(p1);
//        p.add(p2);
//        List<KeyValueObject> s = Lists.newArrayList();
//        KeyValueObject s1 = new KeyValueObject();
//        s1.setKey("username");
//        s1.setType("spel");
//        s1.setValue("#param.username");
//        KeyValueObject s2 = new KeyValueObject();
//        s2.setKey("channel");
//        s2.setType("spel");
//        s2.setValue("#param.channel");
//        s.add(s2);
//        hac.setPath(p).setSearch(s).setHeader(h).setMethod("GET");
//        hac.setContent("{\"merchant\":\"xxxxxxfffff\",\"phone\":\"#{\\\"value\\\":\\\"#param.userMobile\\\",\\\"type\\\": \\\"spel\\\",\\\"functions\\\":[ {\\\"code\\\": \\\"md5\\\"}]}\"}");