From df2e94580f6a24a14d08b6535dc166625b2b2caa Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期二, 28 十一月 2023 20:35:47 +0800 Subject: [PATCH] 更新 --- cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java index 62bea5b..1fe325d 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java @@ -5,6 +5,8 @@ import com.dsh.account.entity.Coach; import com.dsh.account.entity.EvaluateStudent; import com.dsh.account.entity.TStudent; +import com.dsh.account.entity.User; +import com.dsh.account.feignclient.other.SiteClient; import com.dsh.account.mapper.EvaluateStudentMapper; import com.dsh.account.mapper.TStudentMapper; import com.dsh.account.model.vo.commentDetail.StuCommentsVo; @@ -38,6 +40,8 @@ @Autowired private CoachService coachService; + @Resource + private SiteClient siteClient; @Override public List<StuCommentsVo> queryStuCommentsList(Integer stuId) { List<StuCommentsVo> stuCommentsVos = new ArrayList<>(); @@ -50,12 +54,14 @@ for (EvaluateStudent evaluateStudent : evaluateStudents) { StuCommentsVo vo = new StuCommentsVo(); - Coach coach = coachService.getById(evaluateStudent.getCoachId()); +// Coach coach = coachService.getById(evaluateStudent.getCoachId()); + User user = siteClient.queryUserName(evaluateStudent.getCoachId()); + // vo.setHeadImg(tStudent.getHeadImg()); - vo.setHeadImg(coach.getDiploma()); + vo.setHeadImg(user.getAvatar()); // vo.setStuName(tStudent.getName()); - vo.setStuName(coach.getName()); - vo.setComTime(format.format(tStudent.getInsertTime())); + vo.setStuName(user.getName()); + vo.setComTime(format.format(evaluateStudent.getInsertTime())); vo.setContents(evaluateStudent.getContent()); String imgs = evaluateStudent.getImgs(); String[] split = imgs.split(","); -- Gitblit v1.7.1