zouxuan 3 years ago
parent
commit
3ac281e2d1

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImGroupSearchDto.java

@@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull;
 
 public class ImGroupSearchDto {
     @ApiModelProperty(value = "群类型 FAN 粉丝群,COURSE 课程群")
-    private String type = "FAN";
+    private String type;
 
     @ApiModelProperty(value = "根据群名称、编号、简介模糊查询")
     private String search;

+ 4 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/ImGroupController.java

@@ -12,6 +12,7 @@ import com.yonge.toolset.utils.validator.ValidationKit;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
 
@@ -54,6 +55,9 @@ public class ImGroupController extends BaseController {
     @ApiOperation("获取指定用户的群列表")
     @PostMapping(value = "/queryTeacherGroup")
     public HttpResponseResult<List<ImGroupResultDto>> queryTeacherGroup(@RequestBody ImGroupSearchDto imGroupSearchDto) throws Exception {
+        if (StringUtils.isEmpty(imGroupSearchDto.getType())) {
+            imGroupSearchDto.setType("FAN");
+        }
         return succeed(imGroupService.queryTeacherFun(imGroupSearchDto));
     }
 

+ 4 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImGroupController.java

@@ -12,6 +12,7 @@ import com.yonge.toolset.utils.validator.ValidationKit;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
 
@@ -83,6 +84,9 @@ public class ImGroupController extends BaseController {
     @ApiOperation("获取指定用户的群列表")
     @PostMapping(value = "/queryTeacherGroup")
     public HttpResponseResult<List<ImGroupResultDto>> queryTeacherGroup(@RequestBody ImGroupSearchDto imGroupSearchDto) throws Exception {
+        if (StringUtils.isEmpty(imGroupSearchDto.getType())) {
+            imGroupSearchDto.setType("FAN");
+        }
         return succeed(imGroupService.queryTeacherFun(imGroupSearchDto));
     }
 }