-
-
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
1 parent
3753dd4
commit 5d1845b
Showing
12 changed files
with
763 additions
and
39 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
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
98 changes: 98 additions & 0 deletions
98
src/main/java/io/github/doocs/im/model/request/GetOfficialAccountInfoRequest.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,98 @@ | ||
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 hyh | ||
* @since 2024/01/10 10:34 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class GetOfficialAccountInfoRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = -7046784535464765710L; | ||
/** | ||
* 需要获取的公众号列表 ID | ||
*/ | ||
@JsonProperty("OfficialAccountIdList") | ||
private List<OfficialAccountItem> officialAccountIdList; | ||
|
||
/** | ||
* 过滤返回的公众号信息字段,不填时默认返回全部字段,包括 OfficialAccountBaseInfoFilter 过滤器,主要可取以下值: | ||
* CreateTime 公众号的创建时间 | ||
* Name 公众号名称 | ||
* Owner_Account公众号所属的用户 | ||
* LastMsgTime 公众号内的最后一条消息时间 | ||
* SubscriberNum 公众号目前的订阅者人数 | ||
* Introduction 公众号简介 | ||
* FaceUrl 公众号的头像Url | ||
* Organization 公众号的所在组织 | ||
* CustomString 公众号维度的自定义字段 | ||
*/ | ||
@JsonProperty("ResponseFilter") | ||
private ResponseFilter responseFilter; | ||
|
||
public GetOfficialAccountInfoRequest() { | ||
} | ||
|
||
public GetOfficialAccountInfoRequest(List<OfficialAccountItem> officialAccountIdList) { | ||
this.officialAccountIdList = officialAccountIdList; | ||
} | ||
|
||
public GetOfficialAccountInfoRequest(List<OfficialAccountItem> officialAccountIdList, ResponseFilter responseFilter) { | ||
this.officialAccountIdList = officialAccountIdList; | ||
this.responseFilter = responseFilter; | ||
} | ||
|
||
private GetOfficialAccountInfoRequest(Builder builder) { | ||
this.officialAccountIdList = builder.officialAccountIdList; | ||
this.responseFilter = builder.responseFilter; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public List<OfficialAccountItem> getOfficialAccountIdList() { | ||
return officialAccountIdList; | ||
} | ||
|
||
public void setOfficialAccountIdList(List<OfficialAccountItem> officialAccountIdList) { | ||
this.officialAccountIdList = officialAccountIdList; | ||
} | ||
|
||
public ResponseFilter getResponseFilter() { | ||
return responseFilter; | ||
} | ||
|
||
public void setResponseFilter(ResponseFilter responseFilter) { | ||
this.responseFilter = responseFilter; | ||
} | ||
|
||
|
||
public static final class Builder { | ||
private List<OfficialAccountItem> officialAccountIdList; | ||
private ResponseFilter responseFilter; | ||
|
||
private Builder() { | ||
} | ||
|
||
public GetOfficialAccountInfoRequest build() { | ||
return new GetOfficialAccountInfoRequest(this); | ||
} | ||
|
||
public Builder officialAccountIdList(List<OfficialAccountItem> officialAccountIdList) { | ||
this.officialAccountIdList = officialAccountIdList; | ||
return this; | ||
} | ||
|
||
public Builder responseFilter(ResponseFilter responseFilter) { | ||
this.responseFilter = responseFilter; | ||
return this; | ||
} | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
src/main/java/io/github/doocs/im/model/request/GetSubscriberInfoRequest.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,110 @@ | ||
package io.github.doocs.im.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 获取公众号的订阅成员资料-请求参数 | ||
* | ||
* @author hyh | ||
* @since 2024/01/10 11:20 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class GetSubscriberInfoRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = -1051719195312598750L; | ||
/** | ||
* 需要获取的公众号 ID。使用创建时接口返回的 OfficialAccountUserID 字段 | ||
*/ | ||
@JsonProperty("Official_Account") | ||
private String officialAccount; | ||
|
||
/** | ||
* 一次最多获取多少个成员的资料,不得超过200。如果不填,则获取群内全部成员的信息 | ||
*/ | ||
@JsonProperty("Limit") | ||
private Integer limit; | ||
|
||
/** | ||
* 上一次拉取到的订阅者位置,首次调用填写"",续拉使用返回中的 Next 值 | ||
*/ | ||
@JsonProperty("Next") | ||
private String next; | ||
|
||
public GetSubscriberInfoRequest() { | ||
} | ||
|
||
public GetSubscriberInfoRequest(String officialAccount, String next) { | ||
this.officialAccount = officialAccount; | ||
this.next = next; | ||
} | ||
|
||
public GetSubscriberInfoRequest(String officialAccount, Integer limit, String next) { | ||
this.officialAccount = officialAccount; | ||
this.limit = limit; | ||
this.next = next; | ||
} | ||
|
||
private GetSubscriberInfoRequest(Builder builder) { | ||
this.officialAccount = builder.officialAccount; | ||
this.limit = builder.limit; | ||
this.next = builder.next; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getOfficialAccount() { | ||
return officialAccount; | ||
} | ||
|
||
public void setOfficialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
} | ||
|
||
public Integer getLimit() { | ||
return limit; | ||
} | ||
|
||
public void setLimit(Integer limit) { | ||
this.limit = limit; | ||
} | ||
|
||
public String getNext() { | ||
return next; | ||
} | ||
|
||
public void setNext(String next) { | ||
this.next = next; | ||
} | ||
|
||
public static final class Builder { | ||
private String officialAccount; | ||
private Integer limit; | ||
private String next; | ||
|
||
private Builder() { | ||
} | ||
|
||
public GetSubscriberInfoRequest build() { | ||
return new GetSubscriberInfoRequest(this); | ||
} | ||
|
||
public Builder officialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
return this; | ||
} | ||
|
||
public Builder limit(Integer limit) { | ||
this.limit = limit; | ||
return this; | ||
} | ||
|
||
public Builder next(String next) { | ||
this.next = next; | ||
return this; | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
src/main/java/io/github/doocs/im/model/request/OfficialAccountItem.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,56 @@ | ||
package io.github.doocs.im.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* @author hyh | ||
* @since 2024/01/10 10:41 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class OfficialAccountItem implements Serializable { | ||
private static final long serialVersionUID = 1193395857815508620L; | ||
@JsonProperty("Official_Account") | ||
private String officialAccount; | ||
|
||
public OfficialAccountItem() { | ||
} | ||
|
||
public OfficialAccountItem(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
} | ||
|
||
private OfficialAccountItem(Builder builder) { | ||
this.officialAccount = builder.officialAccount; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getOfficialAccount() { | ||
return officialAccount; | ||
} | ||
|
||
public void setOfficialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
} | ||
|
||
public static final class Builder { | ||
private String officialAccount; | ||
|
||
private Builder() { | ||
} | ||
|
||
public OfficialAccountItem build() { | ||
return new OfficialAccountItem(this); | ||
} | ||
|
||
public Builder officialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
return this; | ||
} | ||
} | ||
} |
Oops, something went wrong.