zouxuan 1 год назад
Родитель
Сommit
0c93043281

+ 7 - 3
mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java

@@ -15,6 +15,7 @@ import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import jodd.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -73,11 +74,14 @@ public class CourseController extends BaseController {
 
     @ApiOperation(value = "根据群编号,获取群组基本信息")
     @GetMapping("/findGroupById")
-    public HttpResponseResult<? extends Object> findGroupById(Integer groupId){
-        if(null == groupId){
+    public HttpResponseResult<? extends Object> findGroupById(String groupId){
+        if(StringUtil.isEmpty(groupId)){
             return failed("参数校验错误");
         }
-        return succeed(classGroupService.findGroupById(groupId));
+        if (groupId.contains("S") || groupId.contains("I")){
+            groupId = groupId.substring(1);
+        }
+        return succeed(classGroupService.findGroupById(Integer.parseInt(groupId)));
     }
 
     @ApiOperation(value = "分页获取学员购买记录")

+ 1 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherManageController.java

@@ -109,7 +109,7 @@ public class TeacherManageController extends BaseController {
     @ApiOperation(value = "根据群编号,获取群组基本信息")
     @GetMapping("/course/findGroupById")
     public Object findGroupById(String imGroupId){
-        if(null == imGroupId){
+        if(StringUtils.isEmpty(imGroupId)){
             return failed("参数校验错误");
         }
         if (imGroupId.contains("S") || imGroupId.contains("I")){