|
|
@ -57,18 +57,18 @@ public class LarkUserActiveInviteRelatoinServiceImpl implements ILarkUserActiveI
|
|
|
|
public List<LarkInviteVo> queryTopTen(LarkUserActiveInviteRelatoin larkUserActiveInviteRelatoin) {
|
|
|
|
public List<LarkInviteVo> queryTopTen(LarkUserActiveInviteRelatoin larkUserActiveInviteRelatoin) {
|
|
|
|
larkUserActiveInviteRelatoin.setFlag(FlagStatus.OK.getCode());
|
|
|
|
larkUserActiveInviteRelatoin.setFlag(FlagStatus.OK.getCode());
|
|
|
|
larkUserActiveInviteRelatoin.setInviteStage(LarkActiveInviteStageEnum.ACTIVE.getCode());
|
|
|
|
larkUserActiveInviteRelatoin.setInviteStage(LarkActiveInviteStageEnum.ACTIVE.getCode());
|
|
|
|
List<LarkUserActiveInviteRelatoin> larkUserActiveInviteRelatoins = larkUserActiveInviteRelatoinMapper.queryTopTen(larkUserActiveInviteRelatoin);
|
|
|
|
List<LarkInviteVo> larkUserActiveInviteRelatoins = larkUserActiveInviteRelatoinMapper.queryTopTen(larkUserActiveInviteRelatoin);
|
|
|
|
Map<String, LarkLoginLog> userInfoMap = queryUserInfoMap(larkUserActiveInviteRelatoins);
|
|
|
|
Map<String, LarkLoginLog> userInfoMap = queryUserInfoMap(larkUserActiveInviteRelatoins);
|
|
|
|
List<LarkInviteVo> result = larkUserActiveInviteRelatoins.stream()
|
|
|
|
List<LarkInviteVo> result = larkUserActiveInviteRelatoins.stream()
|
|
|
|
.filter(r -> {
|
|
|
|
.filter(r -> {
|
|
|
|
return userInfoMap.containsKey(r.getUserName());
|
|
|
|
return userInfoMap.containsKey(r.getText());
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.map(r -> {
|
|
|
|
.map(r -> {
|
|
|
|
LarkInviteVo larkInviteVo = new LarkInviteVo();
|
|
|
|
LarkInviteVo larkInviteVo = new LarkInviteVo();
|
|
|
|
String userName = r.getUserName();
|
|
|
|
LarkLoginLog larkLoginLog = userInfoMap.get(r.getText());
|
|
|
|
LarkLoginLog larkLoginLog = userInfoMap.get(userName);
|
|
|
|
|
|
|
|
larkInviteVo.setUrl(larkLoginLog.getImageUrl());
|
|
|
|
larkInviteVo.setUrl(larkLoginLog.getImageUrl());
|
|
|
|
larkInviteVo.setText(larkLoginLog.getUserName());
|
|
|
|
larkInviteVo.setText(larkLoginLog.getUserName());
|
|
|
|
|
|
|
|
larkInviteVo.setTotal(r.getTotal());
|
|
|
|
return larkInviteVo;
|
|
|
|
return larkInviteVo;
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
@ -92,7 +92,7 @@ public class LarkUserActiveInviteRelatoinServiceImpl implements ILarkUserActiveI
|
|
|
|
public List<LarkInviteVo> queryMyInviteList(LarkUserActiveInviteRelatoin larkUserActiveInviteRelatoin) {
|
|
|
|
public List<LarkInviteVo> queryMyInviteList(LarkUserActiveInviteRelatoin larkUserActiveInviteRelatoin) {
|
|
|
|
larkUserActiveInviteRelatoin.setFlag(FlagStatus.OK.getCode());
|
|
|
|
larkUserActiveInviteRelatoin.setFlag(FlagStatus.OK.getCode());
|
|
|
|
List<LarkUserActiveInviteRelatoin> larkUserActiveInviteRelatoins = larkUserActiveInviteRelatoinMapper.selectLarkUserActiveInviteRelatoinList(larkUserActiveInviteRelatoin);
|
|
|
|
List<LarkUserActiveInviteRelatoin> larkUserActiveInviteRelatoins = larkUserActiveInviteRelatoinMapper.selectLarkUserActiveInviteRelatoinList(larkUserActiveInviteRelatoin);
|
|
|
|
Map<String, LarkLoginLog> userInfoMap = queryUserInfoMap(larkUserActiveInviteRelatoins);
|
|
|
|
Map<String, LarkLoginLog> userInfoMap = queryInviteUserInfoMap(larkUserActiveInviteRelatoins);
|
|
|
|
List<LarkInviteVo> result = larkUserActiveInviteRelatoins.stream().map(r -> {
|
|
|
|
List<LarkInviteVo> result = larkUserActiveInviteRelatoins.stream().map(r -> {
|
|
|
|
LarkInviteVo larkInviteVo = new LarkInviteVo();
|
|
|
|
LarkInviteVo larkInviteVo = new LarkInviteVo();
|
|
|
|
String inviteUserName = r.getInviteUserName();
|
|
|
|
String inviteUserName = r.getInviteUserName();
|
|
|
@ -110,7 +110,20 @@ public class LarkUserActiveInviteRelatoinServiceImpl implements ILarkUserActiveI
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, LarkLoginLog> queryUserInfoMap(List<LarkUserActiveInviteRelatoin> larkUserActiveInviteRelatoins) {
|
|
|
|
private Map<String, LarkLoginLog> queryUserInfoMap(List<LarkInviteVo> larkUserActiveInviteRelatoins) {
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(larkUserActiveInviteRelatoins)) {
|
|
|
|
|
|
|
|
return new HashMap<>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<String> openIdList = larkUserActiveInviteRelatoins.stream()
|
|
|
|
|
|
|
|
.filter(r -> {
|
|
|
|
|
|
|
|
return StringUtils.isNotBlank(r.getText());
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.map(LarkInviteVo::getText)
|
|
|
|
|
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
return larkLoginLogService.queryByOpenId(openIdList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, LarkLoginLog> queryInviteUserInfoMap(List<LarkUserActiveInviteRelatoin> larkUserActiveInviteRelatoins) {
|
|
|
|
if (CollectionUtils.isEmpty(larkUserActiveInviteRelatoins)) {
|
|
|
|
if (CollectionUtils.isEmpty(larkUserActiveInviteRelatoins)) {
|
|
|
|
return new HashMap<>();
|
|
|
|
return new HashMap<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|