| | |
| | | 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; |
| | |
| | | |
| | | @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(","); |