|
@@ -7,6 +7,7 @@ import com.yonge.cooleshow.biz.dal.dao.MusicSheetDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.UserAccountRecordDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.SubjectHomeSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.req.TotalReq;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.GoodTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.TeacherTagEnum;
|
|
@@ -58,6 +59,10 @@ public class HomeServiceImpl implements HomeService {
|
|
|
private SysMusicCompareRecordService sysMusicCompareRecordService;
|
|
|
@Resource
|
|
|
private UserOrderDetailService userOrderDetailService;
|
|
|
+ @Resource
|
|
|
+ private SysUserService sysUserService;
|
|
|
+ @Resource
|
|
|
+ private StudentService studentService;
|
|
|
|
|
|
@Override
|
|
|
public HomeUserToDoNum getUserToDoNum() {
|
|
@@ -556,7 +561,23 @@ public class HomeServiceImpl implements HomeService {
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<TeacherIndexWrapper.TeacherIncome> teacherIncomeList(IPage<TeacherIndexWrapper.TeacherIncome> page,TeacherIndexWrapper.CourseExposureSearch query) {
|
|
|
- return null;
|
|
|
+ IPage<TeacherIndexWrapper.TeacherIncome> record = baserMapper.teacherIncomeList(page,query);
|
|
|
+ List<TeacherIndexWrapper.TeacherIncome> records = record.getRecords();
|
|
|
+ if (CollectionUtils.isNotEmpty(records)) {
|
|
|
+ List<Long> userIds = records.stream().map(TeacherIndexWrapper.TeacherIncome::getUserId).collect(Collectors.toList());
|
|
|
+ //获取用户声部信息
|
|
|
+// studentService.querySubject()
|
|
|
+ List<SysUser> sysUsers = sysUserService.getDao().selectBatchIds(userIds);
|
|
|
+ Map<Long, SysUser> sysUserMap = sysUsers.stream().collect(Collectors.toMap(SysUser::getId, Function.identity()));
|
|
|
+ for (TeacherIndexWrapper.TeacherIncome teacherIncome : records) {
|
|
|
+ SysUser sysUser = sysUserMap.get(teacherIncome.getUserId());
|
|
|
+ if (sysUser != null) {
|
|
|
+ teacherIncome.setUserName(sysUser.getUsername());
|
|
|
+ teacherIncome.setUserAvatar(sysUser.getAvatar());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return PageUtil.pageInfo(record);
|
|
|
}
|
|
|
|
|
|
}
|