Commit 92c4abc4 by zhiwj

修改展示bug

parent 23806769
......@@ -19,6 +19,7 @@ import com.gic.evaluate.service.ProblemManageApiService;
import com.gic.evaluate.service.ProblemReplyService;
import com.gic.evaluate.service.ProblemService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.curator.shaded.com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -65,7 +66,7 @@ public class ProblemManageApiServiceImpl implements ProblemManageApiService {
List<TabProblemImg> tabImgList = problemImgService.listImageByProblemId(problemId);
List<String> list = Optional.ofNullable(tabImgList).orElse(Collections.emptyList()).stream().map(TabProblemImg::getImgUrl).collect(Collectors.toList());
problemDTO.setImgList(list);
} else {
} else if (StringUtils.isNotBlank(problemDTO.getImageUrl())) {
problemDTO.setImgList(Lists.newArrayList(problemDTO.getImageUrl()));
}
List<ProblemReplyDTO> replyList = problemReplyService.listReply(problemId);
......
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