-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
a12fa55
commit 4b3d596
Showing
7 changed files
with
547 additions
and
0 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
62 changes: 62 additions & 0 deletions
62
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.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,62 @@ | ||
package me.chanjar.weixin.cp.bean.school.user; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import me.chanjar.weixin.cp.bean.WxCpBaseResp; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 获取可使用的家长范围 返回结果. | ||
* | ||
* @author Wang_Wong | ||
*/ | ||
@Data | ||
public class WxCpAllowScope extends WxCpBaseResp implements Serializable { | ||
private static final long serialVersionUID = -5028321625140879571L; | ||
|
||
@SerializedName("allow_scope") | ||
private AllowScope allowScope; | ||
|
||
@Setter | ||
@Getter | ||
public static class AllowScope implements Serializable { | ||
|
||
@SerializedName("students") | ||
private List<Student> students; | ||
|
||
@SerializedName("departments") | ||
private List<Integer> departments; | ||
|
||
public static AllowScope fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, AllowScope.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
} | ||
|
||
@Setter | ||
@Getter | ||
public static class Student implements Serializable { | ||
|
||
@SerializedName("userid") | ||
private String userId; | ||
|
||
} | ||
|
||
public static WxCpAllowScope fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpAllowScope.class); | ||
} | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
} |
Oops, something went wrong.