|
|
@@ -80,7 +80,6 @@ public class YtAppUserServiceImpl implements YtAppUserService {
|
|
|
String appIds = ytApps.stream().map(YtApp::getAppId).collect(Collectors.joining(","));
|
|
|
Map<String, YtApp> appMap = ytApps.stream().collect(Collectors.toMap(YtApp::getAppId, o->o));
|
|
|
param.setAppIds(appIds);
|
|
|
- //远程调用各应用查询用户数据 目前先只有好运答题王
|
|
|
ResultTable<YtAppUserListView> resultTable = appFeign.queryAll(param);
|
|
|
setUserExtInfo(resultTable,appMap);
|
|
|
return resultTable;
|
|
|
@@ -90,17 +89,16 @@ public class YtAppUserServiceImpl implements YtAppUserService {
|
|
|
* 设置用户扩展信息
|
|
|
*/
|
|
|
private void setUserExtInfo(ResultTable<YtAppUserListView> resultTable, Map<String, YtApp> appMap) {
|
|
|
-
|
|
|
List<YtAppUserListView> data = resultTable.getData();
|
|
|
for (YtAppUserListView datum : data) {
|
|
|
List<YtDyzLoginRecord> recordList = datum.getLoginRecordList();
|
|
|
- datum = new YtAppUserListView();
|
|
|
YtApp ytApp = appMap.get(datum.getAppId());
|
|
|
if(Objects.nonNull(ytApp)) {
|
|
|
datum.setAppId(ytApp.getAppId());
|
|
|
datum.setAppName(ytApp.getAppName());
|
|
|
datum.setAppType(ytApp.getAppType());
|
|
|
datum.setChannelId(ytApp.getChannelId());
|
|
|
+ datum.setVersionCode(ytApp.getVersionCode());
|
|
|
}
|
|
|
if(CollUtil.isNotEmpty(recordList)){
|
|
|
datum.setDeviceRepeatCount((int) recordList.stream().map(YtDyzLoginRecord::getDeviceModel).distinct().count());
|