请求错误信息显示优化

This commit is contained in:
lsymicc
2026-05-08 13:59:03 +08:00
parent c30b7afab5
commit eafc68d1bf
5 changed files with 44 additions and 8 deletions

View File

@@ -27,6 +27,12 @@ public interface RequestLogMapper
*/
public List<RequestLog> selectRequestLogList(RequestLog requestLog);
/**
* 获取最新的任务请求响应记录
* @return
*/
public RequestLog selectRequestLogByLatestTask();
/**
* 新增接口记录
*
@@ -58,4 +64,6 @@ public interface RequestLogMapper
* @return 结果
*/
public int deleteRequestLogByRequestIds(Long[] requestIds);
}

View File

@@ -27,6 +27,12 @@ public interface IRequestLogService
*/
public List<RequestLog> selectRequestLogList(RequestLog requestLog);
/**
* 获取最新的任务请求响应记录
* @return
*/
public RequestLog selectRequestLogByLatestTask();
/**
* 新增接口记录
*

View File

@@ -60,6 +60,16 @@ public class RequestLogServiceImpl implements IRequestLogService
return requestLogMapper.selectRequestLogList(requestLog);
}
/**
* 获取最新的请求记录
* @return
*/
@Override
public RequestLog selectRequestLogByLatestTask()
{
return requestLogMapper.selectRequestLogByLatestTask();
}
/**
* 新增接口记录
*
@@ -240,7 +250,7 @@ public class RequestLogServiceImpl implements IRequestLogService
// String resStr = HttpUtil.post(url, param, header, 3000);
String resStr = HttpRequest.post(url)
.body(param)
.header("X-Service-Secret", HEADER_TOKEN)
.header("X-Service-Secret", HEADER_TOKEN) // 向wms请求头必需添加的token
.execute()
.body();
requestLog.setResponseBody(resStr);