|
@@ -19,12 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.validation.BindingResult;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
@@ -77,8 +72,10 @@ public class ImGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation("退出群聊")
|
|
@ApiOperation("退出群聊")
|
|
@PostMapping(value = "/quit/{groupId}")
|
|
@PostMapping(value = "/quit/{groupId}")
|
|
- public HttpResponseResult quit(@ApiParam(value = "群编号", required = true) @PathVariable("groupId") String groupId) throws Exception {
|
|
|
|
- imGroupService.quit(groupId,sysUserService.getUserId(), ClientEnum.STUDENT);
|
|
|
|
|
|
+ public HttpResponseResult quit(@ApiParam(value = "群编号", required = true) @PathVariable("groupId") String groupId,
|
|
|
|
+ @RequestParam(value = "quit",required = false,defaultValue = "true") boolean quit
|
|
|
|
+ ) throws Exception {
|
|
|
|
+ imGroupService.quit(groupId,sysUserService.getUserId(), ClientEnum.STUDENT,quit);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
|
|
|