refactor(device): 设备平台只记 iOS/Android
去掉系统版本、机型与版本号上报,表结构收敛为 device_id + platform。
This commit is contained in:
1 parent
2dadca6288
commit
229f1d0198
10 files changed
+39
-80
No files matched your search
+1
-5
@@ -75,14 +75,10 @@ public class FavoriteAdminService {
|
||||
vo.setAnonymous(row.getUserId() == null);
|
||||
if (profile != null) {
|
||||
vo.setPlatform(profile.getPlatform());
|
||||
vo.setOsVersion(profile.getOsVersion());
|
||||
vo.setDeviceModel(profile.getDeviceModel());
|
||||
}
|
||||
// 已登录用户的互动行不带 device_id,设备画像查不到时退回最近一次登录会话
|
||||
// 已登录用户的互动行不带 device_id,设备平台查不到时退回最近一次登录会话
|
||||
if (!StringUtils.hasText(vo.getPlatform()) && session != null) {
|
||||
vo.setPlatform(session.getPlatform());
|
||||
vo.setOsVersion(session.getOsVersion());
|
||||
vo.setDeviceModel(session.getDeviceModel());
|
||||
}
|
||||
vo.setDramaId(row.getDramaId());
|
||||
vo.setCreatedAt(row.getCreatedAt());
|
||||
|
||||
+1
-5
@@ -149,16 +149,12 @@ public class LikeAdminService {
|
||||
AppDeviceProfile profile = row.getDeviceId() == null ? null : profiles.get(row.getDeviceId());
|
||||
if (profile != null) {
|
||||
vo.setPlatform(profile.getPlatform());
|
||||
vo.setOsVersion(profile.getOsVersion());
|
||||
vo.setDeviceModel(profile.getDeviceModel());
|
||||
}
|
||||
// 已登录用户的互动行不带 device_id,设备画像查不到时退回最近一次登录会话
|
||||
// 已登录用户的互动行不带 device_id,设备平台查不到时退回最近一次登录会话
|
||||
if (!StringUtils.hasText(vo.getPlatform()) && row.getUserId() != null) {
|
||||
AppUserSession session = sessions.get(row.getUserId());
|
||||
if (session != null) {
|
||||
vo.setPlatform(session.getPlatform());
|
||||
vo.setOsVersion(session.getOsVersion());
|
||||
vo.setDeviceModel(session.getDeviceModel());
|
||||
}
|
||||
}
|
||||
vo.setTargetType(row.getTargetType());
|
||||
|
||||
+2
-4
@@ -182,11 +182,9 @@ public class WatchHistoryAdminService {
|
||||
vo.setSource(row.getSource());
|
||||
vo.setDeviceId(row.getDeviceId());
|
||||
vo.setWatchedAt(row.getWatchedAt());
|
||||
// 设备画像不依赖登录态,优先;没有画像(老数据)再回退到登录会话
|
||||
if (profile != null && (StringUtils.hasText(profile.getPlatform())
|
||||
|| StringUtils.hasText(profile.getOsVersion()))) {
|
||||
// 设备平台不依赖登录态,优先;没有记录(老数据)再回退到登录会话
|
||||
if (profile != null && StringUtils.hasText(profile.getPlatform())) {
|
||||
vo.setPlatform(profile.getPlatform());
|
||||
vo.setOsVersion(profile.getOsVersion());
|
||||
} else if (session != null) {
|
||||
vo.setPlatform(session.getPlatform());
|
||||
vo.setOsVersion(session.getOsVersion());
|
||||
|
||||
@@ -13,10 +13,8 @@ public class AdminFavoriteVO {
|
||||
private String uid;
|
||||
private String nickname;
|
||||
private String deviceId;
|
||||
/** 客户端系统:ANDROID / IOS / WEB,来自设备画像,游客同样有值。 */
|
||||
/** 客户端平台:ANDROID / IOS / WEB,来自设备平台记录,游客同样有值。 */
|
||||
private String platform;
|
||||
private String osVersion;
|
||||
private String deviceModel;
|
||||
private Boolean anonymous;
|
||||
private Long dramaId;
|
||||
private String dramaTitle;
|
||||
|
||||
@@ -13,10 +13,8 @@ public class AdminLikeVO {
|
||||
private String uid;
|
||||
private String nickname;
|
||||
private String deviceId;
|
||||
/** 客户端系统:ANDROID / IOS / WEB,来自设备画像,游客同样有值。 */
|
||||
/** 客户端平台:ANDROID / IOS / WEB,来自设备平台记录,游客同样有值。 */
|
||||
private String platform;
|
||||
private String osVersion;
|
||||
private String deviceModel;
|
||||
private Boolean anonymous;
|
||||
private Long dramaId;
|
||||
private String dramaTitle;
|
||||
|
||||
Reference in new issue
Block a user