refactor(device): 设备平台只记 iOS/Android

去掉系统版本、机型与版本号上报,表结构收敛为 device_id + platform。
This commit is contained in:
jianghaifeng authored and trae-solo-agent committed 2026-10-27 14:00:12 +08:00
1 parent 2dadca6288
commit 229f1d0198
10 files changed
+39 -80

No files matched your search

@@ -18,10 +18,10 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* 收集客户端上报的设备画像(系统 / 机型 / 版本)。
* 收集客户端上报的平台(iOS / Android)。
*
* <p>客户端在请求头带 `X-Client-Platform`、`X-Client-Os`、`X-Client-Model`、`X-App-Version`,
* 这里按 device_id 建档,后台列表据此展示系统;游客请求同样入库,这是与旧会话方案的关键差异。
* <p>客户端在请求头带 `X-Client-Platform`,这里按 device_id 建档,
* 后台列表据此区分两端;游客请求同样入库,这是与旧会话方案的关键差异。
* 同一设备 60 秒内只写一次,避免每个请求都打库。
*/
@Slf4j
@@ -61,10 +61,6 @@ public class DeviceProfileFilter extends OncePerRequestFilter {
lastWriteAt.clear();
}
lastWriteAt.put(deviceId, now);
deviceProfileService.touch(deviceId,
request.getHeader("X-Client-Platform"),
request.getHeader("X-Client-Os"),
request.getHeader("X-Client-Model"),
request.getHeader("X-App-Version"));
deviceProfileService.touch(deviceId, request.getHeader("X-Client-Platform"));
}
}