|
@@ -114,6 +114,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
Update update = new Update();
|
|
Update update = new Update();
|
|
if (!StringUtils.isBlank(reqDto.getDeviceInfo())) {
|
|
if (!StringUtils.isBlank(reqDto.getDeviceInfo())) {
|
|
update.set("deviceInfo", reqDto.getDeviceInfo());
|
|
update.set("deviceInfo", reqDto.getDeviceInfo());
|
|
|
|
+
|
|
|
|
+ syncNewUserData(existingDevice, reqDto.getDeviceInfo());
|
|
|
|
+ synActiveUserData(existingDevice, reqDto.getDeviceInfo());
|
|
}
|
|
}
|
|
if (!StringUtils.isBlank(reqDto.getHeadInfo())) {
|
|
if (!StringUtils.isBlank(reqDto.getHeadInfo())) {
|
|
update.set("headInfo", reqDto.getHeadInfo());
|
|
update.set("headInfo", reqDto.getHeadInfo());
|
|
@@ -123,17 +126,14 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
mongoTemplate.updateFirst(query, update, Device.class);
|
|
mongoTemplate.updateFirst(query, update, Device.class);
|
|
|
|
|
|
- syncNewUserData(existingDevice, reqDto.getDeviceInfo());
|
|
|
|
- synUpdateUserData(existingDevice, reqDto.getDeviceInfo());
|
|
|
|
-
|
|
|
|
return existingDevice.getId();
|
|
return existingDevice.getId();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return existingDevice.getId();
|
|
return existingDevice.getId();
|
|
}
|
|
}
|
|
|
|
|
|
- private void synUpdateUserData(Device device, String deviceInfo) {
|
|
|
|
- if (device ==null) {
|
|
|
|
|
|
+ private void synActiveUserData(Device device, String deviceInfo) {
|
|
|
|
+ if(device ==null) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
String clientID = device.getClientID();
|
|
String clientID = device.getClientID();
|
|
@@ -241,7 +241,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
String bundle = extractStringFromJson(deviceInfoJson, "bundle", "");
|
|
String bundle = extractStringFromJson(deviceInfoJson, "bundle", "");
|
|
String appId = extractStringFromJson(deviceInfoJson, "appId", bundle);
|
|
String appId = extractStringFromJson(deviceInfoJson, "appId", bundle);
|
|
String channel = extractStringFromJson(deviceInfoJson, "channel", "应用市场");
|
|
String channel = extractStringFromJson(deviceInfoJson, "channel", "应用市场");
|
|
- String version = extractStringFromJson(deviceInfoJson, "version", "1.0.0");
|
|
|
|
|
|
+ String version = extractStringFromJson(deviceInfoJson, "version", "0.0.0");
|
|
|
|
|
|
// 同步新增用户数据 -> mysql
|
|
// 同步新增用户数据 -> mysql
|
|
// 构建mkt_stat_new_user对象
|
|
// 构建mkt_stat_new_user对象
|