|
@@ -541,8 +541,8 @@ impl ClearCore {
|
|
|
info!("清仓程序结果 {:?}", result);
|
|
info!("清仓程序结果 {:?}", result);
|
|
|
// 判断是否有清仓,是否有异常
|
|
// 判断是否有清仓,是否有异常
|
|
|
if result.clear_position_num != "0" || result.clear_order_num != "0" || result.clear_other_err{
|
|
if result.clear_position_num != "0" || result.clear_order_num != "0" || result.clear_other_err{
|
|
|
- info!("上报了清仓信息!!!")
|
|
|
|
|
- // send_clear_msg_request(&result).await;
|
|
|
|
|
|
|
+ info!("上报了清仓信息!!!");
|
|
|
|
|
+ send_clear_msg_request(&result).await;
|
|
|
// 上报清仓日志
|
|
// 上报清仓日志
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -635,11 +635,11 @@ pub async fn send_clear_msg_request(body_params: &ClearPositionResult) {
|
|
|
// 创建请求头
|
|
// 创建请求头
|
|
|
let mut headers = HeaderMap::new();
|
|
let mut headers = HeaderMap::new();
|
|
|
headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
|
|
headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
|
|
|
- headers.insert("token", HeaderValue::from_static("token_value"));
|
|
|
|
|
|
|
+ headers.insert("report_token", HeaderValue::from_static("r7T$8gBV!f&L@E2+"));
|
|
|
|
|
|
|
|
// 发送 POST 请求
|
|
// 发送 POST 请求
|
|
|
let res = client
|
|
let res = client
|
|
|
- .post("https://xxxx.com")
|
|
|
|
|
|
|
+ .post("https://t4lapi.skyfffire.com/api/report/searchPositions")
|
|
|
.headers(headers)
|
|
.headers(headers)
|
|
|
.json(body_params)
|
|
.json(body_params)
|
|
|
.send()
|
|
.send()
|