java脚本执行方法


@Test
    public void modifyTest() throws IOException {

        File file = new File("/Users/zl/pending file/修复数据.txt");
        List<String> list = FileUtils.readLines(file, StandardCharsets.UTF_8);

        Map<String, Object> body;
        Map<String, String> header;
        for (String s : list) {
            String[] split = s.split("\\t");

            CoreHttpClient coreHttpClient = CoreHttpClient.builder().build();

            String url = "http://localhost:8080/vsd/bsadc/bd/rdasy/v1/apdsad-repaasy";

            header = new HashMap<>(4);
            header.put("unionId", split[1]);

            body = new HashMap<>(4);
            body.put("biz_order_no", split[0]);

            String post = coreHttpClient.post(url, body, header);

            System.out.println(post);
            System.out.println("bizOrderNo:" + split[0] + ",unionId:" + split[1]);
        }

    }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM