zouxuan 5 سال پیش
والد
کامیت
4dd585fa0a

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

@@ -70,6 +70,9 @@ public class StudentManageServiceImpl implements StudentManageService {
             }else {
                 paramUserIds = studentManageDao.queryNotPracticeCourse(params);
             }
+            if(paramUserIds.size() == 0){
+                return pageInfo;
+            }
             params.put("userIds",paramUserIds);
         }
         if(hasCourse != null){
@@ -80,6 +83,9 @@ public class StudentManageServiceImpl implements StudentManageService {
                 paramUserIds = studentManageDao.queryNotCourse(params);
                 count = studentManageDao.countNotCourse(params);
             }
+            if(paramUserIds.size() == 0){
+                return pageInfo;
+            }
             params.remove("offset");
             params.put("userIds",paramUserIds);
         }else {

+ 0 - 14
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -358,7 +358,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean downgrade(String roomId, List<ReqChangeUserRoleData.ChangedUser> users) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(users.size() > 0, "the changed user list must't be null");
-//        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         List<Room> roomList = roomDao.findByRid(roomId);
@@ -511,7 +510,6 @@ public class RoomServiceImpl implements RoomService {
     public String createWhiteBoard(String roomId) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, userId), "room member not exist");
@@ -555,7 +553,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean deleteWhiteboard(String roomId, String whiteBoardId) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
 
@@ -612,7 +609,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean turnWhiteBoardPage(String roomId, String whiteBoardId, int page) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         List<Room> roomList = roomDao.findByRid(roomId);
@@ -632,7 +628,6 @@ public class RoomServiceImpl implements RoomService {
         CheckUtils.checkArgument(userId != null, "userId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
         CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, userId), "room member not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
 
         log.info("controlDevice: userId={}, typeEnum={}, onOff={}", userId, typeEnum, enable);
@@ -673,7 +668,6 @@ public class RoomServiceImpl implements RoomService {
     @Override
     public Boolean approveControlDevice(String roomId, String ticket) throws ApiException, Exception {
         CheckUtils.checkArgument(ticket != null, "ticket must't be null");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         log.info("approveControlDevice: ticket={}", ticket);
@@ -698,7 +692,6 @@ public class RoomServiceImpl implements RoomService {
     @Override
     public Boolean rejectControlDevice(String roomId, String ticket) throws ApiException, Exception {
         CheckUtils.checkArgument(ticket != null, "ticket must't be null");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
 
@@ -716,7 +709,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean syncDeviceState(String roomId, DeviceTypeEnum type, boolean enable) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
 
@@ -749,7 +741,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean applySpeech(String roomId) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         List<RoomMember> assistants = roomMemberDao.findByRidAndRole(roomId, RoleEnum.RoleAssistant.getValue());
@@ -784,7 +775,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean approveSpeech(String roomId, String ticket) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
 
@@ -829,7 +819,6 @@ public class RoomServiceImpl implements RoomService {
     public Boolean rejectSpeech(String roomId, String ticket) throws ApiException, Exception {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         ScheduledTaskInfo taskInfo = scheduleManager.executeTask(ticket);
@@ -903,7 +892,6 @@ public class RoomServiceImpl implements RoomService {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
         CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, targetUserId), "room member not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         log.info("inviteUpgradeRole roomId = {}, targetUserId = {}, targetRole = {}", roomId, targetUserId, targetRole);
@@ -943,7 +931,6 @@ public class RoomServiceImpl implements RoomService {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(ticket != null, "ticket must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         UpgradeRoleTaskInfo taskInfo = (UpgradeRoleTaskInfo) scheduleManager.executeTask(ticket);
@@ -986,7 +973,6 @@ public class RoomServiceImpl implements RoomService {
         CheckUtils.checkArgument(roomId != null, "roomId must't be null");
         CheckUtils.checkArgument(ticket != null, "ticket must't be null");
         CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
-        String token = SecurityUtils.getAuthenticationValue();
         SysUser authUser = sysUserFeignService.queryUserInfo();
         String userId = authUser.getId().toString();
         UpgradeRoleTaskInfo taskInfo = (UpgradeRoleTaskInfo) scheduleManager.executeTask(ticket);