Просмотр исходного кода

维修技师和乐团学员通讯录关联

zouxuan 4 лет назад
Родитель
Сommit
f1109ba8bc

+ 6 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -264,12 +264,6 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 	public void level(List<EmployeeLevelDto> employeeLevelDtos) {
 		Integer levelUserId = employeeLevelDtos.get(0).getLevelUserId();
 		List<ImGroupModel> educationGroupModels = new ArrayList<>();
-		//获取用户担任教务老师的所有乐团列表
-		List<String> musicGroupIds = employeeDao.queryMusicGroupIdByUserId(levelUserId);
-		//获取用户担任教务老师的所有网管课列表
-		List<String> practiceGroupIds = employeeDao.queryPracticeGroupIdByUserId(levelUserId);
-		//获取用户担任教务老师的所有VIP课列表
-		List<String> vipGroupIds = employeeDao.queryVipGroupIdByUserId(levelUserId);
 		//获取用户需要加入的群组列表
 		Map<String, List<EmployeeLevelDto>> collect = employeeLevelDtos.stream().collect(Collectors.groupingBy(e -> e.getRoleName()));
 		Set<String> roleNames = collect.keySet();
@@ -356,6 +350,12 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 		employeeDao.updateUserDemissionDate(levelUserId);
 		//冻结用户
 		employeeDao.updateUserLock(levelUserId,1);
+		//获取用户担任教务老师、维修技师的所有乐团列表
+		List<String> musicGroupIds = employeeDao.queryMusicGroupIdByUserId(levelUserId);
+		//获取用户担任教务老师的所有网管课列表
+		List<String> practiceGroupIds = employeeDao.queryPracticeGroupIdByUserId(levelUserId);
+		//获取用户担任教务老师的所有VIP课列表
+		List<String> vipGroupIds = employeeDao.queryVipGroupIdByUserId(levelUserId);
 		if(musicGroupIds.size() > 0){
 			for (String musicGroupId : musicGroupIds) {
 				imUserFriendService.refreshGroupImUserFriend(musicGroupId, GroupType.MUSIC);

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -358,7 +358,7 @@
 
     <select id="queryMusicGroupIdByUserId" resultType="java.lang.String">
         SELECT DISTINCT id_ FROM music_group
-        WHERE (director_user_id_ = #{levelUserId} OR educational_teacher_id_ = #{levelUserId} OR team_teacher_id_ = #{levelUserId})
+        WHERE (director_user_id_ = #{levelUserId} OR educational_teacher_id_ = #{levelUserId} OR team_teacher_id_ = #{levelUserId} OR repair_user_id_ = #{levelUserId})
         AND status_ IN ('PROGRESS','PAUSE','PREPARE')
     </select>