|
@@ -11,6 +11,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.springframework.http.HttpStatus;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -41,7 +42,11 @@ public class ImGroupController extends BaseController {
|
|
|
@PostMapping(value = "/getDetail/{groupId}")
|
|
|
@PreAuthorize("@pcs.hasPermissions('imGroup/detail')")
|
|
|
public HttpResponseResult<ImGroup> getDetail(@ApiParam(value = "群编号", required = true) @PathVariable("groupId") String groupId) throws Exception {
|
|
|
- return succeed(imGroupService.getById(groupId));
|
|
|
+ ImGroup group = imGroupService.getById(groupId);
|
|
|
+ if (group == null) {
|
|
|
+ return failed(HttpStatus.NO_CONTENT, "群组不存在");
|
|
|
+ }
|
|
|
+ return succeed(group);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("群列表")
|