-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
fbba3af
commit 3392468
Showing
15 changed files
with
1,002 additions
and
4 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
85 changes: 85 additions & 0 deletions
85
src/main/java/io/github/doocs/im/model/request/AddSubscriberRequest.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,85 @@ | ||
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 15:11 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class AddSubscriberRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = 1989326297259052718L; | ||
/** | ||
* 需要订阅的公众号 ID。使用创建时接口返回的 OfficialAccountUserID 字段 | ||
*/ | ||
@JsonProperty("Official_Account") | ||
private String officialAccount; | ||
|
||
/** | ||
* 待添加的订阅者数组 | ||
*/ | ||
@JsonProperty("SubscriberList") | ||
private List<OfficialAccountItem> subscriberList; | ||
|
||
public AddSubscriberRequest() { | ||
} | ||
|
||
public AddSubscriberRequest(String officialAccount, List<OfficialAccountItem> subscriberList) { | ||
this.officialAccount = officialAccount; | ||
this.subscriberList = subscriberList; | ||
} | ||
|
||
private AddSubscriberRequest(Builder builder) { | ||
this.officialAccount = builder.officialAccount; | ||
this.subscriberList = builder.subscriberList; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getOfficialAccount() { | ||
return officialAccount; | ||
} | ||
|
||
public void setOfficialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
} | ||
|
||
public List<OfficialAccountItem> getSubscriberList() { | ||
return subscriberList; | ||
} | ||
|
||
public void setSubscriberList(List<OfficialAccountItem> subscriberList) { | ||
this.subscriberList = subscriberList; | ||
} | ||
|
||
|
||
public static final class Builder { | ||
private String officialAccount; | ||
private List<OfficialAccountItem> subscriberList; | ||
|
||
private Builder() { | ||
} | ||
|
||
public AddSubscriberRequest build() { | ||
return new AddSubscriberRequest(this); | ||
} | ||
|
||
public Builder officialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
return this; | ||
} | ||
|
||
public Builder subscriberList(List<OfficialAccountItem> subscriberList) { | ||
this.subscriberList = subscriberList; | ||
return this; | ||
} | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
src/main/java/io/github/doocs/im/model/request/DeleteSubscriberRequest.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,84 @@ | ||
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 15:28 | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class DeleteSubscriberRequest extends GenericRequest implements Serializable { | ||
private static final long serialVersionUID = -4604299710168815132L; | ||
/** | ||
* 需要订阅的公众号 ID。使用创建时接口返回的 OfficialAccountUserID 字段 | ||
*/ | ||
@JsonProperty("Official_Account") | ||
private String officialAccount; | ||
|
||
/** | ||
* 待删除的的订阅者 UserID 集合 | ||
*/ | ||
@JsonProperty("SubscriberToDel_Account") | ||
private List<String> subscriberToDelAccount; | ||
|
||
public DeleteSubscriberRequest() { | ||
} | ||
|
||
public DeleteSubscriberRequest(String officialAccount, List<String> subscriberToDelAccount) { | ||
this.officialAccount = officialAccount; | ||
this.subscriberToDelAccount = subscriberToDelAccount; | ||
} | ||
|
||
private DeleteSubscriberRequest(Builder builder) { | ||
this.officialAccount = builder.officialAccount; | ||
this.subscriberToDelAccount = builder.subscriberToDelAccount; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getOfficialAccount() { | ||
return officialAccount; | ||
} | ||
|
||
public void setOfficialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
} | ||
|
||
public List<String> getSubscriberToDelAccount() { | ||
return subscriberToDelAccount; | ||
} | ||
|
||
public void setSubscriberToDelAccount(List<String> subscriberToDelAccount) { | ||
this.subscriberToDelAccount = subscriberToDelAccount; | ||
} | ||
|
||
public static final class Builder { | ||
private String officialAccount; | ||
private List<String> subscriberToDelAccount; | ||
|
||
private Builder() { | ||
} | ||
|
||
public DeleteSubscriberRequest build() { | ||
return new DeleteSubscriberRequest(this); | ||
} | ||
|
||
public Builder officialAccount(String officialAccount) { | ||
this.officialAccount = officialAccount; | ||
return this; | ||
} | ||
|
||
public Builder subscriberToDelAccount(List<String> subscriberToDelAccount) { | ||
this.subscriberToDelAccount = subscriberToDelAccount; | ||
return this; | ||
} | ||
} | ||
} |
Oops, something went wrong.