|
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-import com.ym.mec.biz.dal.entity.Student;
|
|
|
-import com.ym.mec.biz.dal.entity.Subject;
|
|
|
-import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
-import com.ym.mec.biz.dal.entity.UserMusicStar;
|
|
|
+import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.ClientEnum;
|
|
|
import com.ym.mec.biz.dal.mapper.UserMusicMapper;
|
|
|
import com.ym.mec.biz.dal.mapper.UserMusicStarMapper;
|
|
@@ -49,6 +46,9 @@ public class UserMusicStarServiceImpl extends ServiceImpl<UserMusicStarMapper, U
|
|
|
private SysUserService sysUserService;
|
|
|
@Autowired
|
|
|
private TeacherService teacherService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
/**
|
|
|
* 查询详情
|
|
|
* @param id 详情ID
|
|
@@ -95,6 +95,7 @@ public class UserMusicStarServiceImpl extends ServiceImpl<UserMusicStarMapper, U
|
|
|
studentIds = records.stream().filter(o ->o.getClientType() == ClientEnum.TEACHER)
|
|
|
.map(UserMusicStarWrapper.UserMusicStar::getUserId).map(Long::intValue).collect(Collectors.toList());
|
|
|
|
|
|
+ SysConfig userAvatar = sysConfigService.findByParamName(SysConfigService.USER_DEFAULT_AVATAR);
|
|
|
Map<Integer, Teacher> teacherMap = teacherService.getMapByIds(studentIds);
|
|
|
for (UserMusicStarWrapper.UserMusicStar userMusicStar : userMusicStars) {
|
|
|
if (userMusicStar.getClientType() == ClientEnum.STUDENT) {
|
|
@@ -114,6 +115,9 @@ public class UserMusicStarServiceImpl extends ServiceImpl<UserMusicStarMapper, U
|
|
|
userMusicStar.setUserName(sysUser.getUsername());
|
|
|
userMusicStar.setUserAvatar(sysUser.getAvatar());
|
|
|
}
|
|
|
+ if (StringUtil.isEmpty(userMusicStar.getUserAvatar())) {
|
|
|
+ userMusicStar.setUserAvatar(userAvatar.getParanValue());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 声部ID集合
|