浏览监控代码优化

This commit is contained in:
zhaol 2025-07-16 16:12:01 +08:00 committed by zhaolei
parent 25db7c86dc
commit 67975ed706
4 changed files with 42 additions and 55 deletions

File diff suppressed because one or more lines are too long

View File

@ -659,8 +659,7 @@
constructor() {
this.startTime = null;
this.lastReportTime = null;
this.reportInterval = 10000; // 60秒报告一次
this.isActive = false;
this.reportInterval = 60000; // 60秒报告一次
this.isPageVisible = true; // 默认页面是可见的
this.visibilityBound = false; // 是否已绑定可见性事件
}

View File

@ -42,19 +42,6 @@ public class InsertReadingLogService extends ActionWeb
ro = ResponseObject.newOkResponse();
/*params.get("startTime");
// 会话结束计算总停留时间
Duration totalStayTime = Duration.between(
session.getStartTime(),
Instant.parse(request.getCurrentTime())
);
session.setTotalStayTime(totalStayTime.toMillis());*/
Long begintime=Long.valueOf(params.get("startTime"));
Long endtime=Long.valueOf(params.get("currentTime"));
@ -91,7 +78,7 @@ public class InsertReadingLogService extends ActionWeb
bo.set("READING_END_TIME",endDate);
bo.set("CUMULATIVE_DURATION_STAY",remainTime);
bo.set("BROWSERID",params.get("browserId"));
bo.set("ISACTIVE",params.get("isActive"));
bo.set("ISACTIVE","true");
ProcessInstance processInstance = SDK.getProcessAPI()
.createBOProcessInstance("obj_9af2004d87b3472da210b43dc1ca32ab", uc.getUID(), "浏览数据监听");
SDK.getBOAPI().create("BO_EU_READING_DURATION",bo,processInstance.getId(),uc.getUID());