同步平台业务模块能力
This commit is contained in:
@@ -90,7 +90,10 @@ public class LogApplicationServiceImpl extends AbstractTaskExecuteService implem
|
||||
if (traceContext0 == null) {
|
||||
return;
|
||||
}
|
||||
redisUtil.rightPush("log:queue", JSON.toJSONString(((TraceContext) traceContext0).getLog()));
|
||||
TraceContext traceContext = (TraceContext) traceContext0;
|
||||
LogDocument logDocument = (LogDocument) traceContext.getLog();
|
||||
logDocument.setApiKey(TraceContext.maskApiKey(traceContext.getApiKey()));
|
||||
redisUtil.rightPush("log:queue", JSON.toJSONString(logDocument));
|
||||
((TraceContext) traceContext0).setLog(null);
|
||||
redisUtil.rightPush("bill:queue", JSON.toJSONString(traceContext0));
|
||||
}
|
||||
|
||||
@@ -69,6 +69,9 @@ public class LogDocument extends SearchDocument {
|
||||
@Schema(description = "缓存输入token数量")
|
||||
private Integer cacheInputToken;
|
||||
|
||||
@Schema(description = "缓存创建输入token数量")
|
||||
private Integer cacheCreationInputToken;
|
||||
|
||||
@Schema(description = "输入token数量")
|
||||
private Integer inputToken;
|
||||
|
||||
@@ -81,6 +84,9 @@ public class LogDocument extends SearchDocument {
|
||||
@Schema(description = "请求结束时间")
|
||||
private Long requestEndTime;
|
||||
|
||||
@Schema(description = "API Key")
|
||||
private String apiKey;
|
||||
|
||||
@Schema(description = "执行结果码 0000为成功")
|
||||
@SearchField(keyword = true)
|
||||
private String resultCode;
|
||||
|
||||
@@ -138,6 +138,8 @@ public abstract class BaseController {
|
||||
page.setRecords(items.stream().map(item -> {
|
||||
LogDocument document = (LogDocument) item.getDocument();
|
||||
document.setProcessData(null);
|
||||
document.setInput(document.getInput() == null ? null : StringUtils.abbreviate(document.getInput(), 100));
|
||||
document.setOutput(document.getOutput() == null ? null : StringUtils.abbreviate(document.getOutput(), 100));
|
||||
return document;
|
||||
}).collect(Collectors.toList()));
|
||||
return ReqResult.success(page);
|
||||
|
||||
Reference in New Issue
Block a user