|
@@ -1,7 +1,6 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.entity.SysUserRole;
|
|
@@ -25,7 +24,6 @@ import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.web.WebFeignService;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -116,6 +114,11 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
|
|
|
List<StudentManageListDto> dataList = null;
|
|
|
int count = studentManageDao.countStudentByOrganId(params);
|
|
|
+ if (queryInfo.getIsExport()) {
|
|
|
+ if (count > 50000) {
|
|
|
+ throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (count > 0) {
|
|
|
pageInfo.setTotal(count);
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
@@ -144,7 +147,31 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
Map<Long,String> cloudMap = MapUtil.convertMybatisMap(cloudTeacherOrderService.queryNoStartByUserIds(userIds,null));
|
|
|
//List<Subject> studentSubject = studentManageDao.getStudentSubject(userIds);
|
|
|
StudentListCourseDto studentListCourseDto = null;
|
|
|
+ //获取所在乐团
|
|
|
+ Map<Integer, String> musicGroupNames = null;
|
|
|
+ //获取所在vip
|
|
|
+ Map<Integer, String> vipGroupNames = null;
|
|
|
+ //获取所在乐团状态
|
|
|
+ Map<Integer, String> musicGroupStatus = null;
|
|
|
+ //获取所在vip状态
|
|
|
+ Map<Integer, String> vipGroupStatus = null;
|
|
|
+ if (queryInfo.getIsExport()) {
|
|
|
+ //获取所在乐团
|
|
|
+ musicGroupNames = MapUtil.convertMybatisMap(musicGroupDao.queryUserMusicNames(userIds));
|
|
|
+ //获取所在vip
|
|
|
+ vipGroupNames = MapUtil.convertMybatisMap(vipGroupDao.queryUserVipNames(userIds));
|
|
|
+ //获取所在乐团状态
|
|
|
+ musicGroupStatus = MapUtil.convertMybatisMap(musicGroupDao.queryUserMusicStatus(userIds));
|
|
|
+ //获取所在vip状态
|
|
|
+ vipGroupStatus = MapUtil.convertMybatisMap(vipGroupDao.queryUserVipStatus(userIds));
|
|
|
+ }
|
|
|
for (StudentManageListDto dto : dataList) {
|
|
|
+ if (queryInfo.getIsExport()) {
|
|
|
+ dto.setMusicGroupName(musicGroupNames.get(dto.getUserId()));
|
|
|
+ dto.setVipGroupName(vipGroupNames.get(dto.getUserId()));
|
|
|
+ dto.setMusicGroupStatus(musicGroupStatus.get(dto.getUserId()));
|
|
|
+ dto.setVipGroupStatus(vipGroupStatus.get(dto.getUserId()));
|
|
|
+ }
|
|
|
studentListCourseDto = StudentListCourseDtoMap.get(dto.getUserId());
|
|
|
if (studentListCourseDto != null) {
|
|
|
if (studentListCourseDto.getRemainCourseNum() > 0) {
|
|
@@ -186,27 +213,6 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
//年级
|
|
|
dto.setCurrentGrade(studentService.getStudentGrade(dto.getGradeType(),dto.getCurrentGradeNum()));
|
|
|
}
|
|
|
-
|
|
|
- if (queryInfo.getIsExport()) {
|
|
|
- if (count > 50000) {
|
|
|
- throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
- }
|
|
|
- //获取所在乐团
|
|
|
- Map<Integer, String> musicGroupNames = MapUtil.convertMybatisMap(musicGroupDao.queryUserMusicNames(userIds));
|
|
|
- //获取所在vip
|
|
|
- Map<Integer, String> vipGroupNames = MapUtil.convertMybatisMap(vipGroupDao.queryUserVipNames(userIds));
|
|
|
- //获取所在乐团状态
|
|
|
- Map<Integer, String> musicGroupStatus = MapUtil.convertMybatisMap(musicGroupDao.queryUserMusicStatus(userIds));
|
|
|
- //获取所在vip状态
|
|
|
- Map<Integer, String> vipGroupStatus = MapUtil.convertMybatisMap(vipGroupDao.queryUserVipStatus(userIds));
|
|
|
-
|
|
|
- dataList.forEach(e -> {
|
|
|
- e.setMusicGroupName(musicGroupNames.get(e.getUserId()));
|
|
|
- e.setVipGroupName(vipGroupNames.get(e.getUserId()));
|
|
|
- e.setMusicGroupStatus(musicGroupStatus.get(e.getUserId()));
|
|
|
- e.setVipGroupStatus(vipGroupStatus.get(e.getUserId()));
|
|
|
- });
|
|
|
- }
|
|
|
pageInfo.setRows(dataList);
|
|
|
return pageInfo;
|
|
|
}
|