mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 03:16:48 +08:00
换字段
This commit is contained in:
@@ -4,6 +4,7 @@ import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.xboe.common.utils.StringUtil;
|
||||
import com.xboe.core.CurrentUser;
|
||||
import com.xboe.module.interaction.dto.*;
|
||||
import com.xboe.module.qa.entity.Question;
|
||||
@@ -265,10 +266,16 @@ public class FavoritesApi extends ApiBaseController {
|
||||
map(FavoriteTotalDto::getQid).collect(Collectors.toList());
|
||||
|
||||
List<Question> questions = questionService.title(qids);
|
||||
for (FavoriteTotalDto f:favoriteTotalDtoPageList.getList()) {
|
||||
for (Question q:questions) {
|
||||
if(f.getQid().equals(q.getId())){
|
||||
f.setTitle(q.getTitle());
|
||||
if(!questions.isEmpty()) {
|
||||
for (FavoriteTotalDto f : favoriteTotalDtoPageList.getList()) {
|
||||
if(StringUtils.isNotBlank(f.getQid())) {
|
||||
for (Question q : questions) {
|
||||
if(StringUtil.isNotBlank(q.getId())) {
|
||||
if (f.getQid().equals(q.getId())) {
|
||||
f.setTitle(q.getTitle());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user