提交 3a7179cb 编写于 作者: minghao.wu's avatar minghao.wu

fix: 用户头像,前缀后台返回

上级 4863bb69
......@@ -16,6 +16,11 @@ public class ExamTitleReplyDto {
private List<ReplyDto> replyList;
/**
* 是否允许回复 0: 否 1: 是
*/
private Integer replyStatus;
public Integer getAnalysisId() {
return analysisId;
}
......@@ -47,4 +52,12 @@ public class ExamTitleReplyDto {
public void setReplyList(List<ReplyDto> replyList) {
this.replyList = replyList;
}
public Integer getReplyStatus() {
return replyStatus;
}
public void setReplyStatus(Integer replyStatus) {
this.replyStatus = replyStatus;
}
}
......@@ -13,6 +13,9 @@ public class PropertiesConfiguration {
@Value("${app.foundation.token.guest.expire}")
private String guestExpire;
@Value("${common.file.url}")
private String fileUrl;
public String getUserExpire() {
return userExpire;
}
......@@ -29,6 +32,14 @@ public class PropertiesConfiguration {
this.guestExpire = guestExpire;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
@Override
public String toString() {
return "PropertiesConfiguration{" +
......
......@@ -32,9 +32,6 @@ public class AnalysisController {
@Autowired
private RedisClient redisClient;
@Autowired
private PropertiesConfiguration properties;
@Autowired
private LoadBalancerClient slb;
......
......@@ -3,6 +3,7 @@ package com.pica.cloud.online.exam.analysis.server.service.impl;
import com.pica.cloud.online.exam.analysis.common.CommonUtils;
import com.pica.cloud.online.exam.analysis.common.constants.CommonConstants;
import com.pica.cloud.online.exam.analysis.common.dto.*;
import com.pica.cloud.online.exam.analysis.server.configuration.PropertiesConfiguration;
import com.pica.cloud.online.exam.analysis.server.entity.*;
import com.pica.cloud.online.exam.analysis.server.mapper.*;
import com.pica.cloud.online.exam.analysis.server.service.CHCAnalysisService;
......@@ -41,6 +42,8 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
@Autowired
DoctorMapper doctorMapper;
@Autowired
private PropertiesConfiguration properties;
@Override
public CHCAnalysisDto getCHCAnalysisById(Integer analysisId) {
......@@ -216,7 +219,7 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
replyDto.setReplyId(reply.getId());
replyDto.setSeqNo(reply.getSeqNo());
replyDto.setUserId(reply.getUserId());
replyDto.setUserAvatarImageUrl(doctor.getAvatarImageUrl());
replyDto.setUserAvatarImageUrl(doctor.getAvatarImageUrl() != null ? properties.getFileUrl() + doctor.getAvatarImageUrl().trim() : null);
replyDto.setUserName(doctor.getName());
replyDto.setPostTitle(doctor.getTitle());
replyDto.setHospital(doctor.getHospital());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册