请求错误信息显示优化
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,12 @@ public interface IRequestLogService
|
||||
*/
|
||||
public List<RequestLog> selectRequestLogList(RequestLog requestLog);
|
||||
|
||||
/**
|
||||
* 获取最新的任务请求响应记录
|
||||
* @return
|
||||
*/
|
||||
public RequestLog selectRequestLogByLatestTask();
|
||||
|
||||
/**
|
||||
* 新增接口记录
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user