Преглед на файлове

营销系统-保存用户新增和活跃数据

lh преди 1 седмица
родител
ревизия
e8a25256cd

+ 3 - 3
pig-marketing/pig-marketing-biz/src/main/java/com/pig4cloud/pig/marketing/service/impl/TcpDataServiceImpl.java

@@ -114,6 +114,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 				Update update = new Update();
 				if (!StringUtils.isBlank(reqDto.getDeviceInfo())) {
 					update.set("deviceInfo", reqDto.getDeviceInfo());
+
+					syncNewUserData(existingDevice, reqDto.getDeviceInfo());
+					synActiveUserData(existingDevice, reqDto.getDeviceInfo());
 				}
 				if (!StringUtils.isBlank(reqDto.getHeadInfo())) {
 					update.set("headInfo", reqDto.getHeadInfo());
@@ -123,9 +126,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 
 				mongoTemplate.updateFirst(query, update, Device.class);
 
-				syncNewUserData(existingDevice, reqDto.getDeviceInfo());
-				synActiveUserData(existingDevice, reqDto.getDeviceInfo());
-
 				return existingDevice.getId();
 			}
 		}

+ 2 - 0
pig-statistics/pig-statistics-biz/src/main/java/com/pig4cloud/pig/statistics/service/impl/UserAnalyseServiceImpl.java

@@ -1178,6 +1178,7 @@ public class UserAnalyseServiceImpl implements UserAnalyseService {
 		updateWrapper.eq(MktStatNewUser::getVersion, "0.0.0");
 		updateWrapper.eq(MktStatNewUser::getChannel, "应用市场");
 		updateWrapper.set(MktStatNewUser::getAppId, data.getAppId());
+		updateWrapper.set(MktStatNewUser::getVersion, data.getVersion());
 		int update = newUserMapper.update(null, updateWrapper);
 		return update == 1;
 	}
@@ -1189,6 +1190,7 @@ public class UserAnalyseServiceImpl implements UserAnalyseService {
 		updateWrapper.eq(MktStatActiveUser::getVersion, "0.0.0");
 		updateWrapper.eq(MktStatActiveUser::getChannel, "应用市场");
 		updateWrapper.set(MktStatActiveUser::getAppId, data.getAppId());
+		updateWrapper.set(MktStatActiveUser::getVersion, data.getVersion());
 		int update = activeUserMapper.update(null, updateWrapper);
 		return update == 1;
 	}