|
@@ -5163,20 +5163,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
object.put("month",rl.get("month"));
|
|
|
array.add(object);
|
|
|
});
|
|
|
- String username = "WPG_GS";
|
|
|
- String password = "Sap_GS@12345";
|
|
|
- String authorization =username + ":" + password;
|
|
|
JSONObject header=new JSONObject();
|
|
|
- String s = "Basic "+Base64.getEncoder().encodeToString(authorization.getBytes());
|
|
|
- header.put("Authorization",s);
|
|
|
param.put("IT_TAB",array);
|
|
|
JSONObject item=new JSONObject();
|
|
|
item.put("headers",header);
|
|
|
item.put("body",param);
|
|
|
- //在请求头信息中携带Basic认证信息(这里才是实际Basic认证传递用户名密码的方式)
|
|
|
- headers.set("app_id","3bf356d5-bdba-48d4-b1f5-e91468beefa3");
|
|
|
- headers.set("app_key","f2960f3bf3c5ca58ee0c6970c1242e87-1655272886142-371814");
|
|
|
- headers.set("Authorization",s);
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
HttpEntity<String> requestEntity = new HttpEntity<String>(item.toJSONString(), headers);
|
|
|
//过滤掉账号认证失败的时候抛出的401异常
|