-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 设置/取消直播群管理员 * 获取直播群管理员列表 * 查询用户是否在直播群内
- Loading branch information
Showing
9 changed files
with
602 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/main/java/io/github/doocs/im/model/request/CheckMembersRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package io.github.doocs.im.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 查询用户是否在直播群内-请求参数 | ||
* | ||
* @author bingo | ||
* @since 2024/1/9 11:36 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CheckMembersRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = 1773060365482346969L; | ||
|
||
@JsonProperty("GroupId") | ||
private String groupId; | ||
|
||
@JsonProperty("Member_Account") | ||
private List<String> memberAccount; | ||
|
||
public CheckMembersRequest() { | ||
} | ||
|
||
public CheckMembersRequest(String groupId, List<String> memberAccount) { | ||
this.groupId = groupId; | ||
this.memberAccount = memberAccount; | ||
} | ||
|
||
private CheckMembersRequest(Builder builder) { | ||
this.groupId = builder.groupId; | ||
this.memberAccount = builder.memberAccount; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public void setGroupId(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
public List<String> getMemberAccount() { | ||
return memberAccount; | ||
} | ||
|
||
public void setMemberAccount(List<String> memberAccount) { | ||
this.memberAccount = memberAccount; | ||
} | ||
|
||
|
||
public static final class Builder { | ||
private String groupId; | ||
private List<String> memberAccount; | ||
|
||
private Builder() { | ||
} | ||
|
||
public CheckMembersRequest build() { | ||
return new CheckMembersRequest(this); | ||
} | ||
|
||
public Builder groupId(String groupId) { | ||
this.groupId = groupId; | ||
return this; | ||
} | ||
|
||
public Builder memberAccount(List<String> memberAccount) { | ||
this.memberAccount = memberAccount; | ||
return this; | ||
} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
src/main/java/io/github/doocs/im/model/request/GetAdminListRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package io.github.doocs.im.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 获取直播群管理员列表-请求参数 | ||
* | ||
* @author bingo | ||
* @since 2024/1/9 11:36 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class GetAdminListRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = -4674343475066620157L; | ||
|
||
@JsonProperty("GroupId") | ||
private String groupId; | ||
|
||
public GetAdminListRequest() { | ||
} | ||
|
||
public GetAdminListRequest(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
private GetAdminListRequest(Builder builder) { | ||
this.groupId = builder.groupId; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public void setGroupId(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
|
||
public static final class Builder { | ||
private String groupId; | ||
|
||
private Builder() { | ||
} | ||
|
||
public GetAdminListRequest build() { | ||
return new GetAdminListRequest(this); | ||
} | ||
|
||
public Builder groupId(String groupId) { | ||
this.groupId = groupId; | ||
return this; | ||
} | ||
} | ||
} |
109 changes: 109 additions & 0 deletions
109
src/main/java/io/github/doocs/im/model/request/ModifyAdminRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
package io.github.doocs.im.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 设置/取消直播群管理员-请求参数 | ||
* | ||
* @author bingo | ||
* @since 2024/1/9 17:14 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ModifyAdminRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = 5585650728372773365L; | ||
|
||
/** | ||
* 操作的群 ID | ||
*/ | ||
@JsonProperty("GroupId") | ||
private String groupId; | ||
|
||
/** | ||
* 1: 设置管理员 | ||
* 2: 取消设置管理员 | ||
*/ | ||
@JsonProperty("CommandType") | ||
private Integer commandType; | ||
|
||
/** | ||
* 要修改的管理员 UserID 列表,一个直播群最多可以设置5个管理员 | ||
*/ | ||
@JsonProperty("Admin_Account") | ||
private List<String> adminAccount; | ||
|
||
public ModifyAdminRequest() { | ||
} | ||
|
||
public ModifyAdminRequest(String groupId, Integer commandType, List<String> adminAccount) { | ||
this.groupId = groupId; | ||
this.commandType = commandType; | ||
this.adminAccount = adminAccount; | ||
} | ||
|
||
private ModifyAdminRequest(Builder builder) { | ||
this.groupId = builder.groupId; | ||
this.commandType = builder.commandType; | ||
this.adminAccount = builder.adminAccount; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public void setGroupId(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
public Integer getCommandType() { | ||
return commandType; | ||
} | ||
|
||
public void setCommandType(Integer commandType) { | ||
this.commandType = commandType; | ||
} | ||
|
||
public List<String> getAdminAccount() { | ||
return adminAccount; | ||
} | ||
|
||
public void setAdminAccount(List<String> adminAccount) { | ||
this.adminAccount = adminAccount; | ||
} | ||
|
||
|
||
public static final class Builder { | ||
private String groupId; | ||
private Integer commandType; | ||
private List<String> adminAccount; | ||
|
||
private Builder() { | ||
} | ||
|
||
public ModifyAdminRequest build() { | ||
return new ModifyAdminRequest(this); | ||
} | ||
|
||
public Builder groupId(String groupId) { | ||
this.groupId = groupId; | ||
return this; | ||
} | ||
|
||
public Builder commandType(Integer commandType) { | ||
this.commandType = commandType; | ||
return this; | ||
} | ||
|
||
public Builder adminAccount(List<String> adminAccount) { | ||
this.adminAccount = adminAccount; | ||
return this; | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
src/main/java/io/github/doocs/im/model/response/AdminResultItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.github.doocs.im.model.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* @author bingo | ||
* @since 2024/1/9 11:36 | ||
*/ | ||
public class AdminResultItem implements Serializable { | ||
private static final long serialVersionUID = 6608743524050558356L; | ||
|
||
@JsonProperty("Admin_Account") | ||
private String adminAccount; | ||
|
||
@JsonProperty("Avatar") | ||
private String avatar; | ||
|
||
@JsonProperty("NickName") | ||
private String nickname; | ||
|
||
public String getAdminAccount() { | ||
return adminAccount; | ||
} | ||
|
||
public void setAdminAccount(String adminAccount) { | ||
this.adminAccount = adminAccount; | ||
} | ||
|
||
public String getAvatar() { | ||
return avatar; | ||
} | ||
|
||
public void setAvatar(String avatar) { | ||
this.avatar = avatar; | ||
} | ||
|
||
public String getNickname() { | ||
return nickname; | ||
} | ||
|
||
public void setNickname(String nickname) { | ||
this.nickname = nickname; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "AdminResultItem{" + | ||
"adminAccount='" + adminAccount + '\'' + | ||
", avatar='" + avatar + '\'' + | ||
", nickname='" + nickname + '\'' + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.