Commit 3453c70f authored by 张辰's avatar 张辰
parents b821c2f1 59db1312
......@@ -16,6 +16,7 @@ import com.tanpu.community.api.beans.vo.feign.product.FundInfoBaseResp;
import com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO;
import com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboListResp;
import com.tanpu.community.api.enums.RelTypeEnum;
import com.tanpu.community.api.enums.UserLevelEnum;
import com.tanpu.community.dao.entity.community.FileRecordEntity;
import com.tanpu.community.dao.entity.community.TopicEntity;
import com.tanpu.community.feign.course.FeignClientForCourse;
......@@ -392,6 +393,17 @@ public class BatchFeignCallService {
themeQo.setUserInvestorType(userInfo.getUserInvestorType());
themeQo.setBelongUserOrgId(userInfo.getBelongUserOrgId());
themeQo.setBelongUserOrgName(userInfo.getBelongUserOrgName());
//工作室相关
themeQo.setWorkshopName(userInfo.getWorkshopName());
themeQo.setWorkshopStatus(userInfo.getWorkshopStatus());
themeQo.setWorkshopIntroduction(userInfo.getWorkshopIntroduction());
//首席投顾
if (UserLevelEnum.USER_CHIEF_FINANCIAL_ADVISER.getCode() == userInfo.getLevelGrade()
&& userInfo.getUserInfoNewChief() != null) {
themeQo.setNickName(userInfo.getUserInfoNewChief().getUserName());
themeQo.setUserImg(userInfo.getUserInfoNewChief().getHeadImageUrl());
themeQo.setUserIntroduction(userInfo.getUserInfoNewChief().getPersonalProfile());
}
}
if (themeQo.getContent() == null) {
continue;
......
......@@ -127,7 +127,39 @@ public class RecommendService {
}
//逐个插入
private List<String> mergeList(List<String> hotThemeIds, List<String> newThemeIds, List<String> recThemeIds) {
ArrayList<String> result = new ArrayList<>();
Integer hotIdx = 0;
Integer newIdx = 0;
Integer recIdx = 0;
while (hotThemeIds.size() > hotIdx || newThemeIds.size() > newIdx || recThemeIds.size() > recIdx) {
int hotTimes = hotRatio;
int newTimes = newRatio;
int recTimes = pythonRatio;
String id;
while (hotTimes > 0 && hotThemeIds.size() > hotIdx) {
id = hotThemeIds.get(hotIdx);
result.add(id);
hotIdx++;
hotTimes--;
}
while (newTimes > 0 && newThemeIds.size() > newIdx) {
id = newThemeIds.get(newIdx);
result.add(id);
newIdx++;
newTimes--;
}
while (recTimes > 0 && recThemeIds.size() > recIdx) {
id = recThemeIds.get(recIdx);
result.add(id);
recIdx++;
recTimes--;
}
}
return result;
}
private void getResultList(List<String> hotThemeIds, Integer hotTag, List<String> newThemeIds, Integer newTag, List<String> recThemeIds, Integer recTag, Set<String> returnedIds, List<String> result, Integer pageSize, String userId) {
if (hotThemeIds.size() <= hotTag && newThemeIds.size() <= newTag && recThemeIds.size() <= recTag) {
......
apollo.bootstrap.enabled: false
apollo.bootstrap.enabled: true
#app.id: tanpu-community
#apollo:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment