zouxuan 5 anos atrás
pai
commit
262731f505

+ 6 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupClassGroupDto.java

@@ -29,10 +29,10 @@ public class MusicGroupClassGroupDto {
     private Integer currentClassTimes;
 
     @ApiModelProperty(value = "跟班人数", required = true)
-    private String studyNum;
+    private Integer studyNum;
 
     @ApiModelProperty(value = "退班人数", required = true)
-    private String quitNum;
+    private Integer quitNum;
 
     public Integer getClassGroupId() {
         return classGroupId;
@@ -82,19 +82,19 @@ public class MusicGroupClassGroupDto {
         this.currentClassTimes = currentClassTimes;
     }
 
-    public String getStudyNum() {
+    public Integer getStudyNum() {
         return studyNum;
     }
 
-    public void setStudyNum(String studyNum) {
+    public void setStudyNum(Integer studyNum) {
         this.studyNum = studyNum;
     }
 
-    public String getQuitNum() {
+    public Integer getQuitNum() {
         return quitNum;
     }
 
-    public void setQuitNum(String quitNum) {
+    public void setQuitNum(Integer quitNum) {
         this.quitNum = quitNum;
     }
 }

+ 5 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
@@ -1458,13 +1459,13 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             Set<Integer> classGroups = dataList.stream().map(e -> e.getClassGroupId()).collect(Collectors.toSet());
             String join = StringUtils.join(classGroups, ",");
             //获取主教老师
-            Map<Integer, String> masterTeachers = MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "BISHOP"));
+            Map<Integer, String> masterTeachers = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "BISHOP"))),HashMap.class);
             //获取助教老师
-            Map<Integer, String> subTeachers = MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "TEACHING"));
+            Map<Integer, String> subTeachers = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "TEACHING"))),HashMap.class);
             //获取在读人数
-            Map<Integer, String> studyNums = MapUtil.convertMybatisMap(classGroupDao.countStudyNum(join));
+            Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countStudyNum(join))),HashMap.class);
             //获取退班人数
-            Map<Integer, String> quitNums = MapUtil.convertMybatisMap(classGroupDao.countQuitNum(join));
+            Map<Integer, Integer> quitNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countQuitNum(join))),HashMap.class);
             dataList.forEach(e -> {
                 e.setMasterTeacher(masterTeachers.get(e.getClassGroupId()));
                 e.setSubTeacher(subTeachers.get(e.getClassGroupId()));

+ 5 - 0
mec-im/src/main/java/com/ym/controller/ConversationController.java

@@ -27,4 +27,9 @@ public class ConversationController{
     public Object unmute(@RequestBody ConversationModel conversationModel) throws Exception {
         return groupService.conversationUnmute(conversationModel);
     }
+
+    @RequestMapping(value = "/get", method = RequestMethod.POST)
+    public Object get(@RequestBody ConversationModel conversationModel) throws Exception {
+        return groupService.conversationGet(conversationModel);
+    }
 }

+ 2 - 0
mec-im/src/main/java/com/ym/service/GroupService.java

@@ -52,4 +52,6 @@ public interface GroupService {
     Result conversationMute(ConversationModel conversationModel) throws Exception;
 
     Result conversationUnmute(ConversationModel conversationModel) throws Exception;
+
+    Result conversationGet(ConversationModel conversationModel) throws Exception;
 }

+ 5 - 0
mec-im/src/main/java/com/ym/service/Impl/GroupServiceImpl.java

@@ -133,4 +133,9 @@ public class GroupServiceImpl implements GroupService {
     public Result conversationUnmute(ConversationModel conversationModel) throws Exception {
         return getConversation().unMute(conversationModel);
     }
+
+    @Override
+    public Result conversationGet(ConversationModel conversationModel) throws Exception {
+        return getConversation().get(conversationModel);
+    }
 }

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

@@ -82,7 +82,7 @@ public class RoomServiceImpl implements RoomService {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
-    @Transactional
+    @Transactional(rollbackFor = Exception.class)
     @Override
     public RoomResult joinRoom(String userName, String roomId, boolean isAudience, boolean isDisableCamera) throws ApiException, Exception {
         CheckUtils.checkArgument(userName != null, "userName must't be null");