|
@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.page.*;
|
|
|
+import com.ym.mec.biz.service.ClassGroupService;
|
|
|
import com.ym.mec.biz.service.TeacherService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.entity.ImGroupModel;
|
|
@@ -37,6 +38,8 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> imple
|
|
|
@Autowired
|
|
|
private ClassGroupDao classGroupDao;
|
|
|
@Autowired
|
|
|
+ private ClassGroupService classGroupService;
|
|
|
+ @Autowired
|
|
|
private MusicGroupDao musicGroupDao;
|
|
|
@Autowired
|
|
|
private DemoGroupDao demoGroupDao;
|
|
@@ -138,12 +141,13 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> imple
|
|
|
//获取教师所在班级列表
|
|
|
List<ImGroupModel> imGroupModels = classGroupDao.queryTeacherGroups(userId,search);
|
|
|
if(imGroupModels != null && imGroupModels.size() > 0){
|
|
|
- Set<String> classGroupIds = imGroupModels.stream().map(e -> e.getId()).collect(Collectors.toSet());
|
|
|
+// Set<String> classGroupIds = imGroupModels.stream().map(e -> e.getId()).collect(Collectors.toSet());
|
|
|
//获取班级老师总数map
|
|
|
- Map<Integer, Integer> numsMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countTeacherNums(StringUtils.join(classGroupIds, ",")))),HashMap.class);
|
|
|
+// Map<Integer, Integer> numsMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countTeacherNums(StringUtils.join(classGroupIds, ",")))),HashMap.class);
|
|
|
+
|
|
|
imGroupModels.forEach(e -> {
|
|
|
- Integer num = numsMap.get(Integer.parseInt(e.getId()));
|
|
|
- e.setCount((num == null ? 0 : num) + e.getCount());
|
|
|
+// Integer num = numsMap.get(Integer.parseInt(e.getId()));
|
|
|
+ e.setCount(classGroupService.findGroupUsers(Integer.parseInt(e.getId())).size());
|
|
|
});
|
|
|
}
|
|
|
return imGroupModels;
|