From eb6b6dbb35a9f029e0b7d269773685c19fd40976 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 11 七月 2024 10:47:51 +0800
Subject: [PATCH] 玩湃微信商户认证代码

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/EvaluateStudentServiceImpl.java |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 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 29503c8..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,25 +40,28 @@
 
     @Autowired
     private CoachService coachService;
-
+    @Resource
+    private SiteClient siteClient;
     @Override
     public List<StuCommentsVo> queryStuCommentsList(Integer stuId) {
         List<StuCommentsVo> stuCommentsVos = new ArrayList<>();
         TStudent tStudent = tstuMapper.selectById(stuId);
         List<EvaluateStudent> evaluateStudents = this.list(new QueryWrapper<EvaluateStudent>()
-                .eq("studentId", stuId));
+                .eq("studentId",stuId ));
 
 
-        if (evaluateStudents.size() > 0) {
+        if (evaluateStudents.size() > 0){
             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