//先把对象转化为Json
String data = JSON.toJSONString(QueryCorpParam.builder().pageIndex(0).pageSize(1).corpCode(param.getCreditCode()).build());
//拼接时,用URLEncoder.encode去转译一下
String param = "&sign=".concat(sign).concat("&data=").concat(URLEncoder.encode(data,"utf-8"));
//正常调用即可
ResponseEntity<JSONObject> responseEntity = restTemplate.postForEntity(LaborConstant.ENDPOINT, param, JSONObject.class);