|
@@ -1,6 +1,10 @@
|
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
+import com.ym.mec.biz.service.ImGroupMemberService;
|
|
|
+import com.yonge.log.model.AuditLogAnnotation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -38,6 +42,9 @@ public class ImGroupController extends BaseController {
|
|
|
private ImUserFriendService imUserFriendService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private ImGroupMemberService imGroupMemberService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private ImGroupNoticeService imGroupNoticeService;
|
|
|
|
|
|
@Autowired
|
|
@@ -85,7 +92,6 @@ public class ImGroupController extends BaseController {
|
|
|
@ApiOperation("查询群成员详情")
|
|
|
@GetMapping(value = "/queryGroupMemberDetail")
|
|
|
public Object queryGroupMemberDetail(Long imGroupId, Integer userId) {
|
|
|
-
|
|
|
return succeed(imGroupService.queryMember(imGroupId, userId));
|
|
|
}
|
|
|
|
|
@@ -140,4 +146,32 @@ public class ImGroupController extends BaseController {
|
|
|
public Object queryNoticeList(ImGroupNoticeQueryInfo queryInfo) {
|
|
|
return succeed(imGroupNoticeService.queryPage(queryInfo));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("添加群成员")
|
|
|
+ @PostMapping(value = "/addGroupMember")
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "imGroupId", value = "群编号", required = true, dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "roleType", value = "指导老师,乐队指导,乐团主管,运营主管,学员不传", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "isAdmin", value = "是否管理员", required = true, dataType = "Boolean"),
|
|
|
+ @ApiImplicitParam(name = "userId", value = "用户编号", required = true, dataType = "Integer")})
|
|
|
+ public Object addGroupMember(Long imGroupId, Integer userId, String roleType, boolean isAdmin) {
|
|
|
+ return succeed(imGroupMemberService.join(imGroupId,userId,roleType,isAdmin));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("退群")
|
|
|
+ @PostMapping(value = "/quitGroup")
|
|
|
+ @AuditLogAnnotation(operateName = "退群",interfaceURL = "imGroup/quitGroup")
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "imGroupId", value = "群编号", required = true, dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "userId", value = "用户编号", required = true, dataType = "Integer")})
|
|
|
+ public Object quitGroup(Long imGroupId, Integer userId) {
|
|
|
+ return succeed(imGroupMemberService.quit(imGroupId,userId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改角色")
|
|
|
+ @PostMapping(value = "/updateRoleType")
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "imGroupId", value = "群编号", required = true, dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "roleType", value = "指导老师,乐队指导,乐团主管,运营主管,学员不传", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "userId", value = "用户编号", required = true, dataType = "Integer")})
|
|
|
+ public Object updateRoleType(Long imGroupId, Integer userId, String roleType) {
|
|
|
+ return succeed(imGroupMemberService.updateRoleType(imGroupId,userId,roleType));
|
|
|
+ }
|
|
|
}
|