repo stringclasses 1k
values | file_url stringlengths 96 373 | file_path stringlengths 11 294 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 6
values | commit_sha stringclasses 1k
values | retrieved_at stringdate 2026-01-04 14:45:56 2026-01-04 18:30:23 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java | package me.chanjar.weixin.cp.bean.external.moment;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* The type Sender list.
*
* @author Boris
*/
@Getter
@Setter
public class SenderList {
@SerializedName("user_list")
private List<String> userList;
@SerializedName("department_list")
private List<String> departmentList;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java | package me.chanjar.weixin.cp.bean.external.msg;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 地理位置
*
* @author leiin created on 2021-10-29
*/
@Data
@Accessors(chain = true)
public class Location {
private String latitude;
private String longitude;
private String name;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 图文消息.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-08-16
*/
@Data
@Accessors(chain = true)
public class Link implements Serializable {
private static final long serialVersionUID = -8041816740881163875L;
private String title;
@SerializedName("picurl")
private String picUrl;
private String desc;
private String url;
@SerializedName("media_id")
private String mediaId;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 图片消息.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-08-16
*/
@Data
@Accessors(chain = true)
public class Image implements Serializable {
private static final long serialVersionUID = -606286372867787121L;
@SerializedName("media_id")
private String mediaId;
@SerializedName("pic_url")
private String picUrl;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* The type File.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2021-08-23
*/
@Data
@Accessors(chain = true)
public class File implements Serializable {
private static final long serialVersionUID = 2794189478198329090L;
@SerializedName("media_id")
private String mediaId;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 小程序消息.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-08-16
*/
@Data
@Accessors(chain = true)
public class MiniProgram implements Serializable {
private static final long serialVersionUID = 4242074162638170679L;
private String title;
@SerializedName("pic_media_id")
private String picMediaId;
private String appid;
private String page;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 视频消息
*
* @author pg created on 2021-6-21
*/
@Data
@Accessors(chain = true)
public class Video implements Serializable {
private static final long serialVersionUID = -6048642921382867138L;
@SerializedName("media_id")
private String mediaId;
@SerializedName("thumb_media_id")
private String thumbMediaId;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/AttachmentBuilder.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/AttachmentBuilder.java | package me.chanjar.weixin.cp.bean.external.msg;
import lombok.Builder;
/**
* @author codecrab
*/
public class AttachmentBuilder {
@Builder(builderClassName = "ImageBuilder", builderMethodName = "imageBuilder")
private static Attachment image(String mediaId, String picUrl) {
Image image = new Image().setMediaId(mediaId).setPicUrl(picUrl);
return new Attachment().setImage(image);
}
@Builder(builderClassName = "VideoBuilder", builderMethodName = "videoBuilder")
private static Attachment video(String mediaId) {
Video video = new Video().setMediaId(mediaId);
return new Attachment().setVideo(video);
}
@Builder(builderClassName = "FileBuilder", builderMethodName = "fileBuilder")
private static Attachment file(String mediaId) {
File file = new File().setMediaId(mediaId);
return new Attachment().setFile(file);
}
@Builder(builderClassName = "LinkBuilder", builderMethodName = "linkBuilder")
private static Attachment link(String title, String url, String picUrl, String desc) {
Link link = new Link().setTitle(title).setPicUrl(picUrl).setUrl(url).setDesc(desc);
return new Attachment().setLink(link);
}
@Builder(builderClassName = "MiniProgramBuilder", builderMethodName = "miniProgramBuilder")
private static Attachment miniProgram(String title, String picMediaId, String appId, String page) {
MiniProgram miniProgram = new MiniProgram().setTitle(title).setPicMediaId(picMediaId).setAppid(appId).setPage(page);
return new Attachment().setMiniProgram(miniProgram);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java | package me.chanjar.weixin.cp.bean.external.msg;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 消息文本消息.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-08-16
*/
@Data
@Accessors(chain = true)
public class Text implements Serializable {
private static final long serialVersionUID = 6608288753719551600L;
private String content;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java | package me.chanjar.weixin.cp.bean.external.msg;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.constant.WxCpConsts;
import java.io.Serializable;
/**
* The type Attachment.
*
* @author chutian0124
*/
@Data
public class Attachment implements Serializable {
private static final long serialVersionUID = -8078748379570640198L;
@SerializedName("msgtype")
private String msgType;
private Image image;
private Link link;
@SerializedName("miniprogram")
private MiniProgram miniProgram;
private Video video;
private File file;
/**
* Sets image.
*
* @param image the image
*/
public Attachment setImage(Image image) {
this.image = image;
this.msgType = WxCpConsts.WelcomeMsgType.IMAGE;
return this;
}
/**
* Sets link.
*
* @param link the link
*/
public Attachment setLink(Link link) {
this.link = link;
this.msgType = WxCpConsts.WelcomeMsgType.LINK;
return this;
}
/**
* Sets mini program.
*
* @param miniProgram the mini program
*/
public Attachment setMiniProgram(MiniProgram miniProgram) {
this.miniProgram = miniProgram;
this.msgType = WxCpConsts.WelcomeMsgType.MINIPROGRAM;
return this;
}
/**
* Sets video.
*
* @param video the video
*/
public Attachment setVideo(Video video) {
this.video = video;
this.msgType = WxCpConsts.WelcomeMsgType.VIDEO;
return this;
}
/**
* Sets file.
*
* @param file the file
*/
public Attachment setFile(File file) {
this.file = file;
this.msgType = WxCpConsts.WelcomeMsgType.FILE;
return this;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCreateResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCreateResult.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 创建获客助手链接结果
*
* @author alien_zyl
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpCustomerAcquisitionCreateResult extends WxCpBaseResp {
private static final long serialVersionUID = -6301164294371861558L;
private WxCpCustomerAcquisitionInfo.Link link;
public static WxCpCustomerAcquisitionCreateResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionCreateResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionInfo.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 获客链接详情
*
* @author alien_zyl
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpCustomerAcquisitionInfo extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -425354507473041229L;
/**
* link_id列表
*/
@SerializedName("link")
private Link link;
/**
* 分页游标,在下次请求时填写以获取之后分页的记录
*/
@SerializedName("range")
private Range range;
/**
* 是否无需验证,默认为true
*/
@SerializedName("skip_verify")
private Boolean skipVerify;
public static WxCpCustomerAcquisitionInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionInfo.class);
}
@Data
@EqualsAndHashCode(callSuper = true)
public static class Link extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = 6750537220943228300L;
/**
* 获客链接的id
*/
@SerializedName("link_id")
private String linkId;
/**
* 获客链接的名称
*/
@SerializedName("link_name")
private String linkName;
/**
* 获客链接实际的url
*/
@SerializedName("url")
private String url;
/**
* 创建时间
*/
@SerializedName("create_time")
private Long createTime;
public static Link fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Link.class);
}
}
@Data
public static class Range implements Serializable {
private static final long serialVersionUID = -6343768645371744643L;
/**
* 此获客链接关联的userid列表,最多可关联100个
*/
@SerializedName("user_list")
private List<String> userList;
/**
* 此获客链接关联的部门id列表,部门覆盖总人数最多100个
*/
@SerializedName("department_list")
private List<String> departmentList;
public static Range fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Range.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCustomerList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionCustomerList.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 获取由获客链接添加的客户信息结果
*
* @author alien_zyl
*/
@Data
public class WxCpCustomerAcquisitionCustomerList {
@SerializedName("customer_list")
private List<Customer> customerList;
/**
* 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
*/
@SerializedName("next_cursor")
private String nextCursor;
public static WxCpCustomerAcquisitionCustomerList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionCustomerList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
@Data
public static class Customer implements Serializable {
private static final long serialVersionUID = 4456053823277371278L;
/**
* 客户external_userid
*/
@SerializedName("external_userid")
private String externalUserid;
/**
* 通过获客链接添加此客户的跟进人userid
*/
@SerializedName("userid")
private String userid;
/**
* 会话状态,0-客户未发消息 1-客户已发送消息
*/
@SerializedName("chat_status")
private Integer chatStatus;
/**
* 用于区分客户具体是通过哪个获客链接进行添加,
* 用户可在获客链接后拼接customer_channel=自定义字符串,字符串不超过64字节,超过会被截断。
* 通过点击带有customer_channel参数的链接获取到的客户,调用获客信息接口或获取客户详情接口时,返回的state参数即为链接后拼接自定义字符串
*/
@SerializedName("state")
private String state;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionStatistic.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionStatistic.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 获客链接的使用详情
*
* @author Hugo
* @date 2023/12/11 10:31
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpCustomerAcquisitionStatistic extends WxCpBaseResp {
private static final long serialVersionUID = -3816540677590841079L;
/**
* 点击链接客户数
*/
@SerializedName("click_link_customer_cnt")
private Integer clickLinkCustomerCnt;
/**
* 新增客户数
*/
@SerializedName("new_customer_cnt")
private Integer newCustomerCnt;
public static WxCpCustomerAcquisitionStatistic fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionStatistic.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionQuota.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionQuota.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 剩余使用量
*
* @author alien_zyl
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpCustomerAcquisitionQuota extends WxCpBaseResp {
private static final long serialVersionUID = -3816540607590841079L;
/**
* 历史累计使用量
*/
@SerializedName("total")
private Integer total;
/**
* 剩余使用量
*/
@SerializedName("balance")
private Integer balance;
public static WxCpCustomerAcquisitionQuota fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionQuota.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionRequest.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 创建/更新获客链接请求体
*
* @author alien_zyl
*/
@Data
public class WxCpCustomerAcquisitionRequest {
/**
* 获客链接的id
*/
@SerializedName("link_id")
private String linkId;
/**
* 链接名称
*/
@SerializedName("link_name")
private String linkName;
@SerializedName("range")
private WxCpCustomerAcquisitionInfo.Range range;
/**
* 是否无需验证,默认为true
*/
@SerializedName("skip_verify")
private Boolean skipVerify;
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/acquisition/WxCpCustomerAcquisitionList.java | package me.chanjar.weixin.cp.bean.external.acquisition;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 获客链接列表
*
* @author alien_zyl
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpCustomerAcquisitionList extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -4168552242409627573L;
/**
* link_id列表
*/
@SerializedName("link_id_list")
private List<String> linkIdList;
/**
* 分页游标,在下次请求时填写以获取之后分页的记录
*/
@SerializedName("next_cursor")
private String nextCursor;
public static WxCpCustomerAcquisitionList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomerAcquisitionList.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
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;
/**
* <pre>
* 获取企业群发成员执行结果
* 参考文档:https://work.weixin.qq.com/api/doc/90000/90135/93338
* </pre>
*
* @author <a href="https://github.com/wslongchen">Mr.Pan</a>
*/
@Getter
@Setter
public class WxCpGroupMsgSendResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5166048319463473186L;
@SerializedName("send_list")
private List<ExternalContactGroupMsgSendInfo> sendList;
@SerializedName("next_cursor")
private String nextCursor;
/**
* The type External contact group msg send info.
*/
@Getter
@Setter
public static class ExternalContactGroupMsgSendInfo implements Serializable {
private static final long serialVersionUID = 1500416806087532531L;
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("chat_id")
private String chatId;
@SerializedName("userid")
private String userId;
private Integer status;
@SerializedName("send_time")
private Long sendTime;
}
/**
* From json wx cp group msg send result.
*
* @param json the json
* @return the wx cp group msg send result
*/
public static WxCpGroupMsgSendResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupMsgSendResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
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;
/**
* <pre>
* 获取群发成员发送任务列表
* 参考文档:https://work.weixin.qq.com/api/doc/90000/90135/93338
* </pre>
*
* @author <a href="https://github.com/wslongchen">Mr.Pan</a>
*/
@Getter
@Setter
public class WxCpGroupMsgTaskResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5166048319463473186L;
@SerializedName("task_list")
private List<ExternalContactGroupMsgTaskInfo> taskList;
@SerializedName("next_cursor")
private String nextCursor;
/**
* The type External contact group msg task info.
*/
@Getter
@Setter
public static class ExternalContactGroupMsgTaskInfo implements Serializable {
private static final long serialVersionUID = 1500416806087532531L;
@SerializedName("userid")
private String userId;
private Integer status;
@SerializedName("send_time")
private Long sendTime;
}
/**
* From json wx cp group msg task result.
*
* @param json the json
* @return the wx cp group msg task result
*/
public static WxCpGroupMsgTaskResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupMsgTaskResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactListInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactListInfo.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 获取已服务的外部联系人( <a href="https://developer.work.weixin.qq.com/document/path/99434">参考文档</a>)
* @see WxCpService#getExternalContactService()
* @serial
*/
@Getter
@Setter
public class WxCpExternalContactListInfo implements Serializable {
private static final long serialVersionUID = 7114885886548364396L;
@SerializedName("next_cursor")
private String nextCursor;
@SerializedName("errcode")
private String errcode;
@SerializedName("errmsg")
private String errmsg;
@SerializedName("info_list")
private List<ExternalContactInfo> infoList;
@Getter
@Setter
public static class ExternalContactInfo implements Serializable{
private static final long serialVersionUID = -7400291089462740100L;
/**
* 是否被成员标记为客户
*/
@SerializedName("is_customer")
private Boolean isCustomer;
/**
* 外部联系人临时ID
*/
@SerializedName("tmp_openid")
private String tmpOpenid;
/**
* 外部联系人的externaluserid(如果是客户才返回)
*/
@SerializedName("external_userid")
private String externalUserid;
/**
* 脱敏后的外部联系人昵称(如果是其他外部联系人才返回)
*/
@SerializedName("name")
private String name;
/**
* 添加此外部联系人的企业成员或外部联系人所在群聊的群主userid
*/
@SerializedName("follow_userid")
private String followUserid;
/**
* 外部联系人所在的群聊ID(如果群聊被成员标记为客户群才返回)
*/
@SerializedName("chat_id")
private String chatId;
/**
* 外部联系人所在群聊的群名(如果群聊未被成员标记为客户群才返回)
*/
@SerializedName("chat_name")
private String chatName;
/**
* 外部联系人首次添加/进群的时间
*/
@SerializedName("add_time")
private Long addTime;
}
public static WxCpExternalContactListInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpExternalContactListInfo.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.bean.external.msg.Attachment;
import me.chanjar.weixin.cp.bean.external.msg.Text;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* <pre>
* 获取企业群发成员执行结果
* 参考文档:https://work.weixin.qq.com/api/doc/90000/90135/93338
* </pre>
*
* @author <a href="https://github.com/wslongchen">Mr.Pan</a>
*/
@Getter
@Setter
public class WxCpGroupMsgListResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = 3464981991558716620L;
@SerializedName("group_msg_list")
private List<ExternalContactGroupMsgInfo> groupMsgList;
@SerializedName("next_cursor")
private String nextCursor;
/**
* The type External contact group msg info.
*/
@Getter
@Setter
public static class ExternalContactGroupMsgInfo implements Serializable {
private static final long serialVersionUID = 3108435608725559381L;
@SerializedName("msgid")
private String msgId;
private String creator;
private Text text;
private List<Attachment> attachments;
@SerializedName("create_type")
private Integer createType;
@SerializedName("create_time")
private Long createTime;
}
/**
* From json wx cp group msg list result.
*
* @param json the json
* @return the wx cp group msg list result
*/
public static WxCpGroupMsgListResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupMsgListResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import java.io.Serializable;
import java.util.List;
/**
* 外部联系人.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-11-04
*/
@Getter
@Setter
public class ExternalContact implements Serializable {
private static final long serialVersionUID = -1049085217436072418L;
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("position")
private String position;
@SerializedName("name")
private String name;
@SerializedName("nickname")
private String nickname;
@SerializedName("avatar")
private String avatar;
@SerializedName("corp_name")
private String corpName;
@SerializedName("corp_full_name")
private String corpFullName;
@SerializedName("type")
private Integer type;
@SerializedName("gender")
private Integer gender;
@SerializedName("unionid")
private String unionId;
@SerializedName("external_profile")
private ExternalProfile externalProfile;
/**
* The type External profile.
*/
@Data
public static class ExternalProfile implements Serializable {
private static final long serialVersionUID = -2899906589789022765L;
@SerializedName("external_corp_name")
private String externalCorpName;
@SerializedName("wechat_channels")
private WechatChannel wechatChannels;
@SerializedName("external_attr")
private List<ExternalAttribute> externalAttrs;
}
/**
* The type Wechat channel.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class WechatChannel implements Serializable {
@SerializedName("nickname")
private String nickname;
@SerializedName("status")
private Integer status;
}
/**
* The type External attribute.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class ExternalAttribute implements Serializable {
private static final long serialVersionUID = -1262278808286421085L;
private int type;
private String name;
private Text text;
private Web web;
@SerializedName("miniprogram")
private MiniProgram miniProgram;
/**
* The type Text.
*/
@Data
public static class Text implements Serializable {
private static final long serialVersionUID = -8161579335600269094L;
private String value;
}
/**
* The type Web.
*/
@Data
public static class Web implements Serializable {
private static final long serialVersionUID = 3664557135411521862L;
private String title;
private String url;
}
/**
* The type Mini program.
*/
@Data
public static class MiniProgram implements Serializable {
private static final long serialVersionUID = -5329210594501835796L;
@SerializedName("pagepath")
private String pagePath;
private String appid;
private String title;
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
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;
/**
* <pre>
* 获取企业群发成员执行结果
* 参考文档:https://work.weixin.qq.com/api/doc/16251
* </pre>
*
* @author <a href="https://github.com/timsims">Tim Sims</a>
*/
@Getter
@Setter
public class WxCpGroupMsgResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5166048319463473186L;
@SerializedName("detail_list")
private List<ExternalContactGroupMsgDetailInfo> detailList;
@SerializedName("next_cursor")
private String nextCursor;
/**
* The type External contact group msg detail info.
*/
@Getter
@Setter
public static class ExternalContactGroupMsgDetailInfo implements Serializable {
private static final long serialVersionUID = 1500416806087532531L;
// 外部联系人userid,群发消息到企业的客户群不吐出该字段
@SerializedName("external_userid")
private String externalUserId;
// 外部客户群id,群发消息到客户不吐出该字段
@SerializedName("chat_id")
private String chatId;
// 企业服务人员的userid
@SerializedName("userid")
private String userId;
// 发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
private Integer status;
// 发送时间,发送状态为1时返回
@SerializedName("send_time")
private Long sendTime;
}
/**
* From json wx cp group msg result.
*
* @param json the json
* @return the wx cp group msg result
*/
public static WxCpGroupMsgResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupMsgResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 添加了外部联系人的企业成员.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-11-04
*/
@Data
public class FollowedUser implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
@SerializedName("userid")
private String userId;
private String remark;
private String description;
@SerializedName("createtime")
private Long createTime;
private String state;
@SerializedName("remark_company")
private String remarkCompany;
@SerializedName("remark_mobiles")
private String[] remarkMobiles;
/**
* 批量获取客户详情 接口专用
*/
@SerializedName("tag_id")
private String[] tagIds;
/**
* 获取客户详情 接口专用
*/
private Tag[] tags;
@SerializedName("remark_corp_name")
private String remarkCorpName;
@SerializedName("add_way")
private String addWay;
@SerializedName("oper_userid")
private String operatorUserId;
/**
* 该成员添加此客户的来源add_way为10时,对应的视频号信息
*/
@SerializedName("wechat_channels")
private WechatChannels wechatChannels;
/**
* The type Tag.
*/
@Data
public static class Tag implements Serializable {
private static final long serialVersionUID = -7556237053703295482L;
/**
* 该成员添加此外部联系人所打标签的分组名称(标签功能需要企业微信升级到2.7.5及以上版本)
*/
@SerializedName("group_name")
private String groupName;
/**
* 该成员添加此外部联系人所打标签名称
*/
@SerializedName("tag_name")
private String tagName;
/**
* 该成员添加此外部联系人所打企业标签的id,仅企业设置(type为1)的标签返回
*/
@SerializedName("tag_id")
private String tagId;
/**
* 该成员添加此外部联系人所打标签类型, 1-企业设置, 2-用户自定义
*/
private int type;
}
/**
* The type WechatChannels.
*/
@Data
public static class WechatChannels implements Serializable {
private static final long serialVersionUID = -7940080094561469369L;
/**
* 视频号名称
*/
private String nickname;
/**
* 视频号添加场景,0-未知 1-视频号主页 2-视频号直播间 3-视频号留资服务(微信版本要求:iOS ≥ 8.0.20,Android ≥ 8.0.21,且添加时间不早于2022年4月21日。否则添加场景值为0)
*/
private Integer source;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* <pre>
* 外部联系人详情
* Created by Binary Wang on 2018/9/16.
* 参考文档:https://work.weixin.qq.com/api/doc#13878
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@Data
public class WxCpExternalContactInfo implements Serializable {
private static final long serialVersionUID = 4311777322534499260L;
@SerializedName("external_contact")
private ExternalContact externalContact;
@SerializedName("follow_user")
private List<FollowedUser> followedUsers;
@SerializedName("next_cursor")
private String nextCursor;
/**
* From json wx cp external contact info.
*
* @param json the json
* @return the wx cp external contact info
*/
public static WxCpExternalContactInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpExternalContactInfo.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java | package me.chanjar.weixin.cp.bean.external.contact;
import com.google.gson.annotations.SerializedName;
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;
/**
* <pre>
* 批量获取客户详情
* 参考文档:https://work.weixin.qq.com/api/doc/90000/90135/92994
* </pre>
*
* @author <a href="https://github.com/alucardxh">alucardxh</a>
*/
@Getter
@Setter
public class WxCpExternalContactBatchInfo extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5166048319463473186L;
@SerializedName("external_contact_list")
private List<ExternalContactInfo> externalContactList;
@SerializedName("next_cursor")
private String nextCursor;
/**
* The type External contact info.
*/
@Getter
@Setter
public static class ExternalContactInfo implements Serializable {
private static final long serialVersionUID = 4723983768235723206L;
@SerializedName("external_contact")
private ExternalContact externalContact;
@SerializedName("follow_info")
private FollowedUser followInfo;
}
/**
* From json wx cp external contact batch info.
*
* @param json the json
* @return the wx cp external contact batch info
*/
public static WxCpExternalContactBatchInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpExternalContactBatchInfo.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java | package me.chanjar.weixin.cp.bean.order;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 应用版本付费订单详情
*
* @author leiguoqing created on 2022年4月24日
*/
@Getter
@Setter
public class WxCpTpOrderDetails extends WxCpBaseResp {
/**
* The constant serialVersionUID.
*/
private static final long serialVersionUID = -5028321625140879571L;
/**
* 订单号
*/
@SerializedName("orderid")
private String orderId;
/**
* 订单状态。0-未支付,1-已支付,2-已关闭, 3-未支付且已过期, 4-申请退款中, 5-申请退款成功, 6-退款被拒绝
*/
@SerializedName("order_status")
private Integer orderStatus;
/**
* 订单类型。0-普通订单,1-扩容订单,2-续期,3-版本变更
*/
@SerializedName("order_type")
private Integer orderType;
/**
* 客户企业的corpid
*/
@SerializedName("paid_corpid")
private String paidCorpId;
/**
* 下单操作人员userid。如果是服务商代下单,没有该字段。
*/
@SerializedName("operator_id")
private String operatorId;
/**
* 应用id
*/
@SerializedName("suiteid")
private String suiteId;
/**
* 应用id。(仅旧套件有该字段)
*/
@SerializedName("appid")
private String appId;
/**
* 购买版本ID
*/
@SerializedName("edition_id")
private String editionId;
/**
* 购买版本名字
*/
@SerializedName("edition_name")
private String editionName;
/**
* 实付款金额,单位分
*/
@SerializedName("price")
private Long price;
/**
* 购买的人数
*/
@SerializedName("user_count")
private Integer userCount;
/**
* 购买的时间,单位天
*/
@SerializedName("order_period")
private Integer orderPeriod;
/**
* 下单时间,秒级时间戳
*/
@SerializedName("order_time")
private Long orderTime;
/**
* 付款时间,秒级时间戳
*/
@SerializedName("paid_time")
private Long paidTime;
/**
* 购买生效期的开始时间,秒级时间戳
*/
@SerializedName("begin_time")
private Long beginTime;
/**
* 购买生效期的结束时间,秒级时间戳
*/
@SerializedName("end_time")
private Long endTime;
/**
* 下单来源。0-客户下单;1-服务商代下单;2-代理商代下单
*/
@SerializedName("order_from")
private Integer orderFrom;
/**
* 下单方corpid
*/
@SerializedName("operator_corpid")
private String operatorCorpId;
/**
* 服务商分成金额,单位分
*/
@SerializedName("service_share_amount")
private Long serviceShareAmount;
/**
* 平台分成金额,单位分
*/
@SerializedName("platform_share_amount")
private Long platformShareAmount;
/**
* 代理商分成金额,单位分
*/
@SerializedName("dealer_share_amount")
private Long dealerShareAmount;
/**
* 渠道商信息(仅当有渠道商报备后才会有此字段)
*/
@SerializedName("dealer_corp_info")
private DealerCorpInfo dealerCorpInfo;
/**
* 渠道商信息(仅当有渠道商报备后才会有此字段)
*/
@Getter
@Setter
public static class DealerCorpInfo {
/**
* 代理商corpid
*/
@SerializedName("corpid")
private String corpId;
/**
* 代理商名
*/
@SerializedName("corp_name")
private String corpName;
}
/**
* From json wx cp tp order details.
*
* @param json the json
* @return the wx cp tp order details
*/
public static WxCpTpOrderDetails fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpOrderDetails.class);
}
/**
* To json string.
*
* @return the string
*/
@Override
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java | package me.chanjar.weixin.cp.bean.order;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.util.List;
/**
* 应用版本付费订单列表
*
* @author leiguoqing created on 2022年4月24日
*/
@Getter
@Setter
public class WxCpTpOrderListGetResult extends WxCpBaseResp {
/**
* The constant serialVersionUID.
*/
private static final long serialVersionUID = -5028321625140879571L;
/**
* 订单列表
*/
@SerializedName("order_list")
private List<WxCpTpOrderDetails> orderList;
/**
* From json wx cp tp order list get result.
*
* @param json the json
* @return the wx cp tp order list get result
*/
public static WxCpTpOrderListGetResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpOrderListGetResult.class);
}
/**
* To json string.
*
* @return the string
*/
@Override
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
/**
* The type Wx cp xml out text message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutTextMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = 2569239617185930232L;
@XStreamAlias("Content")
@XStreamConverter(value = XStreamCDataConverter.class)
private String content;
/**
* Instantiates a new Wx cp xml out text message.
*/
public WxCpXmlOutTextMessage() {
this.msgType = WxConsts.XmlMsgType.TEXT;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
import me.chanjar.weixin.cp.bean.article.MpnewsArticle;
import me.chanjar.weixin.cp.bean.article.NewArticle;
import org.apache.commons.lang3.ArrayUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType.*;
/**
* 互联企业消息.
* https://developer.work.weixin.qq.com/document/path/90250
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-08-30
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpLinkedCorpMessage implements Serializable {
private static final long serialVersionUID = 8833792280163704238L;
/**
* 1表示发送给应用可见范围内的所有人(包括互联企业的成员),默认为0
*/
private Boolean isToAll;
/**
* 成员ID列表(消息接收者,最多支持1000个)。每个元素的格式为: corpid/userid,其中,corpid为该互联成员所属的企业,userid为该互联成员所属企业中的帐号。如果是本企业的成员,则直接传userid即可
*/
private String[] toUsers;
/**
* 部门ID列表,最多支持100个。partyid在互联圈子内唯一。每个元素都是字符串类型,格式为:linked_id/party_id,其中linked_id是互联id,party_id是在互联圈子中的部门id
* 。如果是本企业的部门,则直接传party_id即可。
*/
private String[] toParties;
/**
* 本企业的标签ID列表,最多支持100个。
*/
private String[] toTags;
/**
* 企业应用的id,整型。可在应用的设置页面查看
*/
private Integer agentId;
private String msgType;
/**
* 消息内容,最长不超过2048个字节
*/
private String content;
/**
* 图片媒体文件id,可以调用上传临时素材接口获取
*/
private String mediaId;
private String thumbMediaId;
private String title;
private String description;
/**
* 表示是否是保密消息,0表示否,1表示是,默认0
*/
private Boolean isSafe;
private String url;
private String btnTxt;
private List<NewArticle> articles = new ArrayList<>();
private List<MpnewsArticle> mpNewsArticles = new ArrayList<>();
private String appId;
private String page;
private Boolean emphasisFirstItem;
private Map<String, String> contentItems;
/**
* <pre>
* 请使用.
* {@link LinkedCorpMsgType#TEXT}
* {@link LinkedCorpMsgType#IMAGE}
* {@link LinkedCorpMsgType#VIDEO}
* {@link LinkedCorpMsgType#NEWS}
* {@link LinkedCorpMsgType#MPNEWS}
* {@link LinkedCorpMsgType#MARKDOWN}
* {@link LinkedCorpMsgType#MINIPROGRAM_NOTICE}
* </pre>
*
* @param msgType 消息类型
*/
public void setMsgType(String msgType) {
this.msgType = msgType;
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
if (ArrayUtils.isNotEmpty(this.getToUsers())) {
messageJson.add("touser", WxGsonBuilder.create().toJsonTree(this.getToUsers()));
}
if (ArrayUtils.isNotEmpty(this.getToParties())) {
messageJson.add("toparty", WxGsonBuilder.create().toJsonTree(this.getToParties()));
}
if (ArrayUtils.isNotEmpty(this.getToTags())) {
messageJson.add("totag", WxGsonBuilder.create().toJsonTree(this.getToTags()));
}
if (this.getIsToAll() != null) {
messageJson.addProperty("toall", this.getIsToAll() ? 1 : 0);
}
messageJson.addProperty("msgtype", this.getMsgType());
if (this.getAgentId() != null) {
messageJson.addProperty("agentid", this.getAgentId());
}
this.handleMsgType(messageJson);
if (this.getIsSafe() != null) {
messageJson.addProperty("safe", this.getIsSafe() ? 1 : 0);
}
return messageJson.toString();
}
private void handleMsgType(JsonObject messageJson) {
switch (this.getMsgType()) {
case TEXT: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("text", text);
break;
}
case MARKDOWN: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("markdown", text);
break;
}
case TEXTCARD: {
JsonObject text = new JsonObject();
text.addProperty("title", this.getTitle());
text.addProperty("description", this.getDescription());
text.addProperty("url", this.getUrl());
text.addProperty("btntxt", this.getBtnTxt());
messageJson.add("textcard", text);
break;
}
case IMAGE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("image", image);
break;
}
case FILE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("file", image);
break;
}
case VIDEO: {
JsonObject video = new JsonObject();
video.addProperty("media_id", this.getMediaId());
video.addProperty("title", this.getTitle());
video.addProperty("description", this.getDescription());
messageJson.add("video", video);
break;
}
case NEWS: {
JsonObject newsJsonObject = new JsonObject();
JsonArray articleJsonArray = new JsonArray();
for (NewArticle article : this.getArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
articleJson.addProperty("btntxt", article.getBtnText());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("news", newsJsonObject);
break;
}
case MPNEWS: {
JsonObject newsJsonObject = new JsonObject();
if (this.getMediaId() != null) {
newsJsonObject.addProperty("media_id", this.getMediaId());
} else {
JsonArray articleJsonArray = new JsonArray();
for (MpnewsArticle article : this.getMpNewsArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("thumb_media_id", article.getThumbMediaId());
articleJson.addProperty("author", article.getAuthor());
articleJson.addProperty("content_source_url", article.getContentSourceUrl());
articleJson.addProperty("content", article.getContent());
articleJson.addProperty("digest", article.getDigest());
if (article.getShowCoverPic() != null) {
articleJson.addProperty("show_cover_pic", article.getShowCoverPic());
}
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
}
messageJson.add("mpnews", newsJsonObject);
break;
}
case MINIPROGRAM_NOTICE: {
JsonObject notice = new JsonObject();
notice.addProperty("appid", this.getAppId());
notice.addProperty("page", this.getPage());
notice.addProperty("title", this.getTitle());
notice.addProperty("description", this.getDescription());
notice.addProperty("emphasis_first_item", this.getEmphasisFirstItem());
JsonArray content = new JsonArray();
for (Map.Entry<String, String> item : this.getContentItems().entrySet()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("key", item.getKey());
articleJson.addProperty("value", item.getValue());
content.add(articleJson);
}
notice.add("content_item", content);
messageJson.add("miniprogram_notice", notice);
break;
}
default: {
// do nothing
}
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
/**
* The type Wx cp xml out image message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutImageMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -1099446240667237313L;
@XStreamAlias("Image")
@XStreamConverter(value = XStreamMediaIdConverter.class)
private String mediaId;
/**
* Instantiates a new Wx cp xml out image message.
*/
public WxCpXmlOutImageMessage() {
this.msgType = WxConsts.XmlMsgType.IMAGE;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* The type Wx cp xml out news message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpXmlOutNewsMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -5796178637883178826L;
/**
* The Articles.
*/
@XStreamAlias("Articles")
protected final List<Item> articles = new ArrayList<>();
/**
* The Article count.
*/
@XStreamAlias("ArticleCount")
protected int articleCount;
/**
* Instantiates a new Wx cp xml out news message.
*/
public WxCpXmlOutNewsMessage() {
this.msgType = WxConsts.XmlMsgType.NEWS;
}
/**
* Add article.
*
* @param item the item
*/
public void addArticle(Item item) {
this.articles.add(item);
this.articleCount = this.articles.size();
}
/**
* The type Item.
*/
@XStreamAlias("item")
@Data
public static class Item implements Serializable {
private static final long serialVersionUID = -8672761162722733622L;
@XStreamAlias("Title")
@XStreamConverter(value = XStreamCDataConverter.class)
private String title;
@XStreamAlias("Description")
@XStreamConverter(value = XStreamCDataConverter.class)
private String description;
@XStreamAlias("PicUrl")
@XStreamConverter(value = XStreamCDataConverter.class)
private String picUrl;
@XStreamAlias("Url")
@XStreamConverter(value = XStreamCDataConverter.class)
private String url;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.error.WxRuntimeException;
import me.chanjar.weixin.common.util.XmlUtils;
import me.chanjar.weixin.common.util.xml.IntegerArrayConverter;
import me.chanjar.weixin.common.util.xml.LongArrayConverter;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* <pre>
* 微信推送过来的消息,也是同步回复给用户的消息,xml格式
* 相关字段的解释看微信开发者文档:
* https://work.weixin.qq.com/api/doc#12973
* https://work.weixin.qq.com/api/doc#12974
* </pre>
*
* @author Daniel Qian
*/
@Data
@Slf4j
@XStreamAlias("xml")
public class WxCpXmlMessage implements Serializable {
private static final long serialVersionUID = -1042994982179476410L;
/**
* 使用dom4j解析的存放所有xml属性和值的map.
*/
private Map<String, Object> allFieldsMap;
///////////////////////
// 以下都是微信推送过来的消息的xml的element所对应的属性
///////////////////////
@XStreamAlias("AgentID")
private String agentId;
@XStreamAlias("ToUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String toUserName;
@XStreamAlias("FromUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String fromUserName;
@XStreamAlias("CreateTime")
private Long createTime;
/**
* <pre>
* 当接受用户消息时,可能会获得以下值:
* {@link WxConsts.XmlMsgType#TEXT}
* {@link WxConsts.XmlMsgType#IMAGE}
* {@link WxConsts.XmlMsgType#VOICE}
* {@link WxConsts.XmlMsgType#VIDEO}
* {@link WxConsts.XmlMsgType#LOCATION}
* {@link WxConsts.XmlMsgType#LINK}
* {@link WxConsts.XmlMsgType#EVENT}
* 当发送消息的时候使用:
* {@link WxConsts.XmlMsgType#TEXT}
* {@link WxConsts.XmlMsgType#IMAGE}
* {@link WxConsts.XmlMsgType#VOICE}
* {@link WxConsts.XmlMsgType#VIDEO}
* {@link WxConsts.XmlMsgType#NEWS}
* </pre>
*/
@XStreamAlias("MsgType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String msgType;
@XStreamAlias("Content")
@XStreamConverter(value = XStreamCDataConverter.class)
private String content;
@XStreamAlias("MsgId")
private String msgId;
@XStreamAlias("PicUrl")
@XStreamConverter(value = XStreamCDataConverter.class)
private String picUrl;
@XStreamAlias("MediaId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String mediaId;
@XStreamAlias("Format")
@XStreamConverter(value = XStreamCDataConverter.class)
private String format;
@XStreamAlias("ThumbMediaId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String thumbMediaId;
@XStreamAlias("Location_X")
private Double locationX;
@XStreamAlias("Location_Y")
private Double locationY;
@XStreamAlias("Scale")
private Double scale;
@XStreamAlias("Label")
@XStreamConverter(value = XStreamCDataConverter.class)
private String label;
@XStreamAlias("Title")
@XStreamConverter(value = XStreamCDataConverter.class)
private String title;
@XStreamAlias("Description")
@XStreamConverter(value = XStreamCDataConverter.class)
private String description;
@XStreamAlias("Url")
@XStreamConverter(value = XStreamCDataConverter.class)
private String url;
@XStreamAlias("Event")
@XStreamConverter(value = XStreamCDataConverter.class)
private String event;
@XStreamAlias("UpdateDetail")
@XStreamConverter(value = XStreamCDataConverter.class)
private String updateDetail;
@XStreamAlias("JoinScene")
@XStreamConverter(value = XStreamCDataConverter.class)
private String joinScene;
@XStreamAlias("QuitScene")
@XStreamConverter(value = XStreamCDataConverter.class)
private String quitScene;
@XStreamAlias("MemChangeCnt")
@XStreamConverter(value = XStreamCDataConverter.class)
private String memChangeCnt;
@XStreamAlias("MemChangeList")
@XStreamConverter(value = XStreamCDataConverter.class)
private String memChangeList;
@XStreamAlias("LastMemVer")
@XStreamConverter(value = XStreamCDataConverter.class)
private String lastMemVer;
@XStreamAlias("CurMemVer")
@XStreamConverter(value = XStreamCDataConverter.class)
private String curMemVer;
@XStreamAlias("Source")
@XStreamConverter(value = XStreamCDataConverter.class)
private String source;
@XStreamAlias("StrategyId")
private String strategyId;
@XStreamAlias("EventKey")
@XStreamConverter(value = XStreamCDataConverter.class)
private String eventKey;
@XStreamAlias("Ticket")
@XStreamConverter(value = XStreamCDataConverter.class)
private String ticket;
@XStreamAlias("Latitude")
private Double latitude;
@XStreamAlias("Longitude")
private Double longitude;
@XStreamAlias("Precision")
private Double precision;
@XStreamAlias("Recognition")
@XStreamConverter(value = XStreamCDataConverter.class)
private String recognition;
@XStreamAlias("TaskId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String taskId;
@XStreamAlias("CardType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String cardType;
@XStreamAlias("ResponseCode")
@XStreamConverter(value = XStreamCDataConverter.class)
private String responseCode;
@XStreamAlias("SelectedItems")
private List<SelectedItem> selectedItems;
/**
* <a href="https://developer.work.weixin.qq.com/document/path/96488#%E5%9B%9E%E8%B0%83%E5%BC%82%E6%AD%A5%E4%BB%BB%E5%8A%A1%E7%BB%93%E6%9E%9C">异步任务id</a>
*/
@XStreamAlias("JobId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String jobId;
/**
* 微信客服
* 调用拉取消息接口时,需要传此token,用于校验请求的合法性
*/
@XStreamAlias("Token")
@XStreamConverter(value = XStreamCDataConverter.class)
private String token;
/**
* 有新消息的客服账号。可通过sync_msg接口指定open_kfid获取此客服账号的消息
*/
@XStreamAlias("OpenKfId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String openKfId;
/**
* 新增授权的客服账号列表,多个AuthAddOpenKfId节点表示多个新增账号
*/
@XStreamAlias("AuthAddOpenKfId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String authAddOpenKfId;
/**
* 取消授权的客服账号列表,多个AuthDelOpenKfId节点表示多个取消账号
*/
@XStreamAlias("AuthDelOpenKfId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String authDelOpenKfId;
/**
* 失效的获客链接ID
*/
@XStreamAlias("LinkId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String linkId;
/**
* 智能机器人ID
* 接收智能机器人消息时使用
* https://developer.work.weixin.qq.com/document/path/100719
*/
@XStreamAlias("RobotId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String robotId;
/**
* 智能机器人会话ID
* 接收智能机器人消息时使用,用于保持会话连续性
* https://developer.work.weixin.qq.com/document/path/100719
*/
@XStreamAlias("SessionId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String sessionId;
/**
* 通讯录变更事件.
* 请参考常量 me.chanjar.weixin.cp.constant.WxCpConsts.ContactChangeType
*/
@XStreamAlias("ChangeType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String changeType;
/**
* 变更信息的成员UserID.
*/
@XStreamAlias("UserID")
@XStreamConverter(value = XStreamCDataConverter.class)
private String userId;
/**
* 变更信息的外部联系人的userid,注意不是企业成员的帐号.
*/
@XStreamAlias("ExternalUserID")
@XStreamConverter(value = XStreamCDataConverter.class)
private String externalUserId;
/**
* 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道.
*/
@XStreamAlias("State")
@XStreamConverter(value = XStreamCDataConverter.class)
private String state;
/**
* 欢迎语code,可用于发送欢迎语.
*/
@XStreamAlias("WelcomeCode")
@XStreamConverter(value = XStreamCDataConverter.class)
private String welcomeCode;
/**
* 新的UserID,变更时推送(userid由系统生成时可更改一次).
*/
@XStreamAlias("NewUserID")
@XStreamConverter(value = XStreamCDataConverter.class)
private String newUserId;
/**
* 成员名称.
* 或者部门名称
*/
@XStreamAlias("Name")
@XStreamConverter(value = XStreamCDataConverter.class)
private String name;
/**
* 成员部门列表,变更时推送,仅返回该应用有查看权限的部门id.
*/
@XStreamAlias("Department")
@XStreamConverter(value = LongArrayConverter.class)
private Long[] departments;
/**
* 主部门
*/
@XStreamAlias("MainDepartment")
private Long mainDepartment;
/**
* 手机号码.
*/
@XStreamAlias("Mobile")
@XStreamConverter(value = XStreamCDataConverter.class)
private String mobile;
/**
* 职位信息。长度为0~64个字节.
*/
@XStreamAlias("Position")
@XStreamConverter(value = XStreamCDataConverter.class)
private String position;
/**
* 群ID.
*/
@XStreamAlias("ChatId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String chatId;
/**
* 性别,1表示男性,2表示女性.
*/
@XStreamAlias("Gender")
private Integer gender;
/**
* 邮箱.
*/
@XStreamAlias("Email")
@XStreamConverter(value = XStreamCDataConverter.class)
private String email;
/**
* 企业邮箱;代开发自建应用不返回该字段。
* ISSUE#2584
*
* @see <a href="https://developer.work.weixin.qq.com/document/path/90970">Link</a>
*/
@XStreamAlias("BizMail")
@XStreamConverter(value = XStreamCDataConverter.class)
private String bizMail;
/**
* 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可.
*/
@XStreamAlias("Avatar")
@XStreamConverter(value = XStreamCDataConverter.class)
private String avatar;
/**
* 英文名.
*/
@XStreamAlias("EnglishName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String englishName;
/**
* 上级字段,标识是否为上级。0表示普通成员,1表示上级.
*/
@XStreamAlias("IsLeader")
private Integer isLeader;
/**
* 表示所在部门是否为上级,0-否,1-是,顺序与Department字段的部门逐一对应.
*/
@XStreamAlias("IsLeaderInDept")
@XStreamConverter(value = IntegerArrayConverter.class)
private Integer[] isLeaderInDept;
/**
* 座机.
*/
@XStreamAlias("Telephone")
@XStreamConverter(value = XStreamCDataConverter.class)
private String telephone;
/**
* 地址.
*/
@XStreamAlias("Address")
@XStreamConverter(value = XStreamCDataConverter.class)
private String address;
/**
* 日程ID.
*/
@XStreamAlias("ScheduleId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String scheduleId;
/**
* 日历ID.
*/
@XStreamAlias("CalId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String calId;
/**
* 会议室ID.
*/
@XStreamAlias("MeetingRoomId")
private String meetingRoomId;
/**
* 会议室预定id,可根据该ID查询具体的会议预定情况
*/
@XStreamAlias("BookingId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String bookingId;
/**
* 扩展属性.
*/
@XStreamAlias("ExtAttr")
private ExtAttr extAttrs = new ExtAttr();
/**
* 部门Id.
* 或者客户联系回调标签/标签组id
*/
@XStreamAlias("Id")
@XStreamConverter(XStreamCDataConverter.class)
private String id;
/**
* 父部门id.
*/
@XStreamAlias("ParentId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String parentId;
/**
* 部门排序.
*/
@XStreamAlias("Order")
@XStreamConverter(value = XStreamCDataConverter.class)
private String order;
/**
* 标签Id.
*/
@XStreamAlias("TagId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String tagId;
/**
* 标签中新增的成员userid列表,用逗号分隔.
*/
@XStreamAlias("AddUserItems")
@XStreamConverter(value = XStreamCDataConverter.class)
private String addUserItems;
/**
* 标签中删除的成员userid列表,用逗号分隔.
*/
@XStreamAlias("DelUserItems")
@XStreamConverter(value = XStreamCDataConverter.class)
private String delUserItems;
/**
* 标签中新增的部门id列表,用逗号分隔.
*/
@XStreamAlias("AddPartyItems")
@XStreamConverter(value = XStreamCDataConverter.class)
private String addPartyItems;
/**
* 标签中删除的部门id列表,用逗号分隔.
*/
@XStreamAlias("DelPartyItems")
@XStreamConverter(value = XStreamCDataConverter.class)
private String delPartyItems;
/**
* 客户联系回调: 客户接替失败的原因
*/
@XStreamAlias("FailReason")
@XStreamConverter(XStreamCDataConverter.class)
private String failReason;
/**
* 客户联系回调: 标签类型
*/
@XStreamAlias("TagType")
@XStreamConverter(XStreamCDataConverter.class)
private String tagType;
///////////////////////////////////////
// 群发消息返回的结果
///////////////////////////////////////
/**
* 多个时间共用字段.
* 1. 群发的结果.
* 2. 通讯录变更事件
* 激活状态:1=已激活 2=已禁用 4=未激活 已激活代表已激活企业微信或已关注微工作台(原企业号).
* 3. 直播回调事件
* 直播状态 ,0:预约中,1:直播中,2:已结束,4:已取消 (已过期状态目前没有回调)
*/
@XStreamAlias("Status")
@XStreamConverter(value = XStreamCDataConverter.class)
private String status;
/**
* 直播ID
*/
@XStreamAlias("LivingId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String livingId;
/**
* group_id下粉丝数;或者openid_list中的粉丝数.
*/
@XStreamAlias("TotalCount")
private Integer totalCount;
/**
* 过滤.
* (过滤是指特定地区、性别的过滤、用户设置拒收的过滤,用户接收已超4条的过滤)后,准备发送的粉丝数,原则上,filterCount = sentCount + errorCount
*/
@XStreamAlias("FilterCount")
private Integer filterCount;
/**
* 发送成功的粉丝数.
*/
@XStreamAlias("SentCount")
private Integer sentCount;
/**
* 发送失败的粉丝数.
*/
@XStreamAlias("ErrorCount")
private Integer errorCount;
@XStreamAlias("ScanCodeInfo")
private ScanCodeInfo scanCodeInfo = new ScanCodeInfo();
@XStreamAlias("SendPicsInfo")
private SendPicsInfo sendPicsInfo = new SendPicsInfo();
@XStreamAlias("SendLocationInfo")
private SendLocationInfo sendLocationInfo = new SendLocationInfo();
/**
* 审批消息
* <p>
* 审批申请状态变化回调通知
* https://developer.work.weixin.qq.com/document/path/91815
* <p>
* 自建应用审批状态变化通知回调
* https://developer.work.weixin.qq.com/document/path/90269
*/
@XStreamAlias("ApprovalInfo")
private WxCpXmlApprovalInfo approvalInfo = new WxCpXmlApprovalInfo();
/**
* From xml wx cp xml message.
*
* @param xml the xml
* @return the wx cp xml message
*/
protected static WxCpXmlMessage fromXml(String xml) {
//修改微信变态的消息内容格式,方便解析
xml = xml.replace("</PicList><PicList>", "");
final WxCpXmlMessage xmlMessage = XStreamTransformer.fromXml(WxCpXmlMessage.class, xml);
xmlMessage.setAllFieldsMap(XmlUtils.xml2Map(xml));
return xmlMessage;
}
/**
* From xml wx cp xml message.
*
* @param xml the xml
* @param agentId the agent id
* @return the wx cp xml message
*/
public static WxCpXmlMessage fromXml(String xml, String agentId) {
//修改微信变态的消息内容格式,方便解析
xml = xml.replace("</PicList><PicList>", "");
final WxCpXmlMessage xmlMessage = fromXml(xml);
xmlMessage.setAgentId(agentId);
return xmlMessage;
}
/**
* From xml wx cp xml message.
*
* @param is the is
* @return the wx cp xml message
*/
protected static WxCpXmlMessage fromXml(InputStream is) {
return XStreamTransformer.fromXml(WxCpXmlMessage.class, is);
}
/**
* 从加密字符串转换.
*
* @param encryptedXml the encrypted xml
* @param wxCpConfigStorage the wx cp config storage
* @param timestamp the timestamp
* @param nonce the nonce
* @param msgSignature the msg signature
* @return the wx cp xml message
*/
public static WxCpXmlMessage fromEncryptedXml(String encryptedXml, WxCpConfigStorage wxCpConfigStorage,
String timestamp, String nonce, String msgSignature) {
WxCpCryptUtil cryptUtil = new WxCpCryptUtil(wxCpConfigStorage);
WxCpXmlMessage wxCpXmlMessage = fromXml(encryptedXml);
String plainText = cryptUtil.decrypt(msgSignature, timestamp, nonce, encryptedXml);
log.debug("解密后的原始xml消息内容:{}", plainText);
if (StringUtils.isNotEmpty(wxCpXmlMessage.getAgentId())) {
return fromXml(plainText, wxCpXmlMessage.getAgentId());
} else {
return fromXml(plainText);
}
}
/**
* From encrypted xml wx cp xml message.
*
* @param is the is
* @param wxCpConfigStorage the wx cp config storage
* @param timestamp the timestamp
* @param nonce the nonce
* @param msgSignature the msg signature
* @return the wx cp xml message
*/
public static WxCpXmlMessage fromEncryptedXml(InputStream is, WxCpConfigStorage wxCpConfigStorage,
String timestamp, String nonce, String msgSignature) {
try {
return fromEncryptedXml(IOUtils.toString(is, StandardCharsets.UTF_8), wxCpConfigStorage, timestamp, nonce,
msgSignature);
} catch (IOException e) {
throw new WxRuntimeException(e);
}
}
@Override
public String toString() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* The type Scan code info.
*/
@Data
@XStreamAlias("ScanCodeInfo")
public static class ScanCodeInfo implements Serializable {
private static final long serialVersionUID = 7420078330239763395L;
/**
* 扫描类型,一般是qrcode.
*/
@XStreamAlias("ScanType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String scanType;
/**
* 扫描结果,即二维码对应的字符串信息.
*/
@XStreamAlias("ScanResult")
@XStreamConverter(value = XStreamCDataConverter.class)
private String scanResult;
}
/**
* The type Ext attr.
*/
@Data
public static class ExtAttr implements Serializable {
private static final long serialVersionUID = -3418685294606228837L;
/**
* The Items.
*/
@XStreamImplicit(itemFieldName = "Item")
protected final List<Item> items = new ArrayList<>();
/**
* The type Item.
*/
@XStreamAlias("Item")
@Data
public static class Item implements Serializable {
private static final long serialVersionUID = -3418685294606228837L;
@XStreamAlias("Name")
@XStreamConverter(value = XStreamCDataConverter.class)
private String name;
@XStreamAlias("Value")
@XStreamConverter(value = XStreamCDataConverter.class)
private String value;
}
}
/**
* The type Send pics info.
*/
@Data
@XStreamAlias("SendPicsInfo")
public static class SendPicsInfo implements Serializable {
private static final long serialVersionUID = -6549728838848064881L;
/**
* The Pic list.
*/
@XStreamAlias("PicList")
protected final List<Item> picList = new ArrayList<>();
@XStreamAlias("Count")
private Long count;
/**
* The type Item.
*/
@XStreamAlias("item")
@Data
public static class Item implements Serializable {
private static final long serialVersionUID = -6549728838848064881L;
@XStreamAlias("PicMd5Sum")
@XStreamConverter(value = XStreamCDataConverter.class)
private String picMd5Sum;
}
}
/**
* The type Send location info.
*/
@Data
@XStreamAlias("SendLocationInfo")
public static class SendLocationInfo implements Serializable {
private static final long serialVersionUID = 6319921071637597406L;
@XStreamAlias("Location_X")
@XStreamConverter(value = XStreamCDataConverter.class)
private String locationX;
@XStreamAlias("Location_Y")
@XStreamConverter(value = XStreamCDataConverter.class)
private String locationY;
@XStreamAlias("Scale")
@XStreamConverter(value = XStreamCDataConverter.class)
private String scale;
@XStreamAlias("Label")
@XStreamConverter(value = XStreamCDataConverter.class)
private String label;
@XStreamAlias("Poiname")
@XStreamConverter(value = XStreamCDataConverter.class)
private String poiName;
}
/**
* The type selected Items.
*/
@Data
@XStreamAlias("SelectedItem")
public static class SelectedItem implements Serializable {
private static final long serialVersionUID = 6319921121637597406L;
@XStreamAlias("QuestionKey")
@XStreamConverter(value = XStreamCDataConverter.class)
private String questionKey;
@XStreamAlias(value = "OptionIds")
private List<String> optionIds;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.Data;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import java.io.Serializable;
import java.util.List;
/**
* 审批信息
* <p>
* 审批申请状态变化回调通知
* https://developer.work.weixin.qq.com/document/path/91815
* <p>
* 自建应用审批状态变化通知回调
* https://developer.work.weixin.qq.com/document/path/90269
*
* @author Gyv12345
*/
@XStreamAlias("ApprovalInfo")
@Data
public class WxCpXmlApprovalInfo implements Serializable {
private static final long serialVersionUID = 8136329462880646091L;
// 自建应用审批状态变化通知回调
/**
* 审批单编号,由开发者在发起申请时自定义
*/
@XStreamAlias("ThirdNo")
@XStreamConverter(value = XStreamCDataConverter.class)
private String thirdNo;
/**
* 审批模板名称
*/
@XStreamAlias("OpenSpName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String openSpName;
/**
* 审批模板id
*/
@XStreamAlias("OpenTemplateId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String openTemplateId;
/**
* 申请单当前审批状态:1-审批中;2-已通过;3-已驳回;4-已撤销
*/
@XStreamAlias("OpenSpStatus")
private Integer openSpStatus;
/**
* 提交者姓名
*/
@XStreamAlias("ApplyUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String applyUserName;
/**
* 提交者userid
*/
@XStreamAlias("ApplyUserId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String applyUserId;
/**
* 提交者所在部门
*/
@XStreamAlias("ApplyUserParty")
@XStreamConverter(value = XStreamCDataConverter.class)
private String applyUserParty;
/**
* 提交者头像
*/
@XStreamAlias("ApplyUserImage")
@XStreamConverter(value = XStreamCDataConverter.class)
private String applyUserImage;
/**
* 当前审批节点:0-第一个审批节点;1-第二个审批节点…以此类推
*/
@XStreamAlias("ApproverStep")
private Integer approverStep;
/**
* 审批流程信息
*/
@XStreamAlias("ApprovalNodes")
private List<ApprovalNode> approvalNodes;
/**
* 抄送信息,可能有多个抄送人
*/
@XStreamAlias("NotifyNodes")
private List<NotifyNode> notifyNodes;
/**
* 抄送人信息
*/
@XStreamAlias("NotifyNode")
@Data
public static class NotifyNode implements Serializable {
private static final long serialVersionUID = -979255011922209018L;
/**
* 抄送人姓名
*/
@XStreamAlias("ItemName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemName;
/**
* 抄送人userid
*/
@XStreamAlias("ItemUserId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemUserId;
/**
* 抄送人所在部门
*/
@XStreamAlias("ItemParty")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemParty;
/**
* 抄送人头像
*/
@XStreamAlias("ItemImage")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemImage;
}
/**
* 审批流程信息,可以有多个审批节点
*/
@XStreamAlias("ApprovalNode")
@Data
public static class ApprovalNode implements Serializable {
private static final long serialVersionUID = -979255011922209018L;
/**
* 节点审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
*/
@XStreamAlias("NodeStatus")
private Integer nodeStatus;
/**
* 审批节点属性:1-或签;2-会签
*/
@XStreamAlias("NodeAttr")
private Integer nodeAttr;
/**
* 审批节点类型:1-固定成员;2-标签;3-上级
*/
@XStreamAlias("NodeType")
private Integer nodeType;
/**
* 审批节点信息,当节点为标签或上级时,一个节点可能有多个分支
*/
@XStreamAlias("Items")
private List<Item> items;
}
/**
* 审批节点分支,当节点为标签或上级时,一个节点可能有多个分支
*/
@XStreamAlias("Item")
@Data
public static class Item implements Serializable {
private static final long serialVersionUID = -979255011922209018L;
/**
* 分支审批人姓名
*/
@XStreamAlias("ItemName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemName;
/**
* 分支审批人userid
*/
@XStreamAlias("ItemUserId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemUserId;
/**
* 分支审批人所在部门
*/
@XStreamAlias("ItemParty")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemParty;
/**
* 分支审批人头像
*/
@XStreamAlias("ItemImage")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemImage;
/**
* 分支审批人审批意见
*/
@XStreamAlias("ItemSpeech")
@XStreamConverter(value = XStreamCDataConverter.class)
private String itemSpeech;
/**
* 分支审批审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
*/
@XStreamAlias("ItemStatus")
private Integer itemStatus;
/**
* 分支审批人操作时间
*/
@XStreamAlias("ItemOpTime")
private Long itemOpTime;
}
// 审批申请状态变化回调通知
/**
* 审批编号
*/
@XStreamAlias("SpNo")
private String spNo;
/**
* 审批申请类型名称(审批模板名称)
*/
@XStreamAlias("SpName")
@XStreamConverter(value = XStreamCDataConverter.class)
private String spName;
/**
* 申请单状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付
*/
@XStreamAlias("SpStatus")
private Integer spStatus;
/**
* 审批模板id。
*/
@XStreamAlias("TemplateId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String templateId;
/**
* 审批申请提交时间,Unix时间戳
*/
@XStreamAlias("ApplyTime")
private Long applyTime;
/**
* 申请人信息
*/
@XStreamAlias("Applyer")
private Applier applier;
/**
* 审批流程信息,可能有多个审批节点。
*/
@XStreamImplicit(itemFieldName = "SpRecord")
private List<SpRecord> spRecords;
/**
* 抄送信息,可能有多个抄送节点
* 这回查字典,notifier通知人,Notifyer这不知道是什么
*/
@XStreamImplicit(itemFieldName = "Notifyer")
private List<Notifier> notifier;
/**
* 审批申请备注信息,可能有多个备注节点
*/
@XStreamImplicit(itemFieldName = "Comments")
private List<Comment> comments;
/**
* 审批申请单变化类型
*/
@XStreamAlias("StatuChangeEvent")
private Integer statusChangeEvent;
/**
* 申请人信息
*/
@XStreamAlias("Applyer")
@Data
public static class Applier implements Serializable {
private static final long serialVersionUID = -979255011922209018L;
/**
* 申请人userid
*/
@XStreamAlias("UserId")
private String userId;
/**
* 申请人所在部门pid
*/
@XStreamAlias("Party")
private String party;
}
/**
* 审批流程信息
*/
@XStreamAlias("SpRecord")
@Data
public static class SpRecord implements Serializable {
private static final long serialVersionUID = 1247535623941881764L;
/**
* 审批节点状态:1-审批中;2-已同意;3-已驳回;4-已转审
*/
@XStreamAlias("SpStatus")
private String spStatus;
/**
* 节点审批方式:1-或签;2-会签
*/
@XStreamAlias("ApproverAttr")
private String approverAttr;
/**
* 审批节点详情。当节点为标签或上级时,一个节点可能有多个分支
*/
@XStreamImplicit(itemFieldName = "Details")
private List<Detail> details;
}
/**
* 审批节点详情
*/
@XStreamAlias("Details")
@Data
public static class Detail implements Serializable {
private static final long serialVersionUID = -8446107461495047603L;
/**
* 分支审批人
*/
@XStreamAlias("Approver")
private Approver approver;
/**
* 审批意见字段
*/
@XStreamAlias("Speech")
private String speech;
/**
* 分支审批人审批状态:1-审批中;2-已同意;3-已驳回;4-已转审
*/
@XStreamAlias("SpStatus")
private String spStatus;
/**
* 节点分支审批人审批操作时间,0为尚未操作
*/
@XStreamAlias("SpTime")
private Long spTime;
/**
* 节点分支审批人审批意见附件,赋值为media_id具体使用请参考:文档-获取临时素材
*/
@XStreamImplicit(itemFieldName = "Attach")
private List<String> attach;
}
/**
* 分支审批人
*/
@Data
@XStreamAlias("Approver")
public static class Approver implements Serializable {
private static final long serialVersionUID = 7360442444186683191L;
/**
* 分支审批人userid
*/
@XStreamAlias("UserId")
private String userId;
}
/**
* 抄送信息
*/
@Data
@XStreamAlias("Notifyer")
public static class Notifier implements Serializable {
private static final long serialVersionUID = -4524071522890013920L;
/**
* 节点抄送人userid
*/
@XStreamAlias("UserId")
private String userId;
}
/**
* 审批申请备注信息
*/
@Data
@XStreamAlias("Comments")
public static class Comment implements Serializable {
private static final long serialVersionUID = 6912156206252719485L;
/**
* 备注人信息
*/
@XStreamAlias("CommentUserInfo")
private CommentUserInfo commentUserInfo;
/**
* 备注提交时间
*/
@XStreamAlias("CommentTime")
private String commentTime;
/**
* 备注文本内容
*/
@XStreamAlias("CommentContent")
private String commentContent;
/**
* 备注id
*/
@XStreamAlias("CommentId")
private String commentId;
/**
* 备注意见附件,值是附件media_id
*/
@XStreamImplicit(itemFieldName = "Attach")
private List<String> attach;
}
@Data
@XStreamAlias("CommentUserInfo")
public static class CommentUserInfo implements Serializable {
private static final long serialVersionUID = 5031739716823000947L;
/**
* 备注人userid
*/
@XStreamAlias("UserId")
private String userId;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 应用消息发送统计信息.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a> created on 2020-09-13
*/
@Data
public class WxCpMessageSendStatistics implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* From json wx cp message send statistics.
*
* @param json the json
* @return the wx cp message send statistics
*/
public static WxCpMessageSendStatistics fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMessageSendStatistics.class);
}
private List<StatisticItem> statistics;
/**
* The type Statistic item.
*/
@Data
public static class StatisticItem implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* 应用名
*/
@SerializedName("app_name")
private String appName;
/**
* 应用id
*/
@SerializedName("agentid")
private Integer agentId;
/**
* 发消息成功人次
*/
@SerializedName("count")
private Integer count;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamReplaceNameConverter;
/**
* The type Wx cp xml out update btn message.
*
* @author nickname263 created on 2021-09-23
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutUpdateBtnMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = 976182367423048138L;
@XStreamAlias("Button")
@XStreamConverter(value = XStreamReplaceNameConverter.class)
private String replaceName;
/**
* Instantiates a new Wx cp xml out update btn message.
*/
public WxCpXmlOutUpdateBtnMessage() {
this.msgType = WxConsts.XmlMsgType.UPDATE_BUTTON;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 发送「学校通知」返回实体
* https://developer.work.weixin.qq.com/document/path/92321
*
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-06-29
*/
@Data
public class WxCpSchoolContactMessageSendResult extends WxCpBaseResp {
private static final long serialVersionUID = 3990693822996824333L;
@SerializedName("invalid_parent_userid")
private String[] invalidParentUserId;
@SerializedName("invalid_student_userid")
private String[] invalidStudentUserId;
@SerializedName("invalid_party")
private String[] invalidParty;
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* From json wx cp school contact message send result.
*
* @param json the json
* @return the wx cp school contact message send result
*/
public static WxCpSchoolContactMessageSendResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSchoolContactMessageSendResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamReplaceNameConverter;
/**
* The type Wx cp xml out task card message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutTaskCardMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = 7028014900972827324L;
@XStreamAlias("TaskCard")
@XStreamConverter(value = XStreamReplaceNameConverter.class)
private String replaceName;
/**
* Instantiates a new Wx cp xml out task card message.
*/
public WxCpXmlOutTaskCardMessage() {
this.msgType = WxConsts.XmlMsgType.UPDATE_TASKCARD;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/TemplateCardMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/TemplateCardMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardMessage implements Serializable {
private static final long serialVersionUID = 8833792280163704239L;
@SerializedName("userids")
private List<String> userids;
@SerializedName("partyids")
private List<Integer> partyids;
@SerializedName("tagids")
private List<Integer> tagids;
@SerializedName("atall")
private Integer atall;
@SerializedName("agentid")
private Integer agentid;
@SerializedName("response_code")
private String responseCode;
@SerializedName("enable_id_trans")
private Integer enableIdTrans;
@SerializedName("template_card")
private TemplateCardDTO templateCard;
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
@NoArgsConstructor
@Data
public static class TemplateCardDTO {
@SerializedName("card_type")
private String cardType;
@SerializedName("source")
private SourceDTO source;
@SerializedName("main_title")
private MainTitleDTO mainTitle;
@SerializedName("select_list")
private List<SelectListDTO> selectList;
@SerializedName("submit_button")
private SubmitButtonDTO submitButton;
@SerializedName("replace_text")
private String replaceText;
@SerializedName("checkbox")
private CheckboxDTO checkbox;
@SerializedName("action_menu")
private ActionMenuDTO actionMenu;
@SerializedName("quote_area")
private QuoteAreaDTO quoteArea;
@SerializedName("sub_title_text")
private String subTitleText;
@SerializedName("horizontal_content_list")
private List<HorizontalContentListDTO> horizontalContentList;
@SerializedName("card_action")
private CardActionDTO cardAction;
@SerializedName("button_selection")
private ButtonSelectionDTO buttonSelection;
@SerializedName("button_list")
private List<ButtonListDTO> buttonList;
@SerializedName("image_text_area")
private ImageTextAreaDTO imageTextArea;
@SerializedName("card_image")
private CardImageDTO cardImage;
@SerializedName("vertical_content_list")
private List<MainTitleDTO> verticalContentList;
@SerializedName("jump_list")
private List<JumpListDTO> jumpList;
@NoArgsConstructor
@Data
public static class SourceDTO {
@SerializedName("icon_url")
private String iconUrl;
@SerializedName("desc")
private String desc;
@SerializedName("desc_color")
private Integer descColor;
}
@NoArgsConstructor
@Data
public static class ActionMenuDTO {
@SerializedName("desc")
private String desc;
@SerializedName("action_list")
private List<SubmitButtonDTO> actionList;
}
@NoArgsConstructor
@Data
public static class QuoteAreaDTO {
@SerializedName("type")
private Integer type;
@SerializedName("url")
private String url;
@SerializedName("title")
private String title;
@SerializedName("quote_text")
private String quoteText;
}
@NoArgsConstructor
@Data
public static class CardActionDTO {
@SerializedName("type")
private Integer type;
@SerializedName("url")
private String url;
@SerializedName("appid")
private String appid;
@SerializedName("pagepath")
private String pagepath;
}
@NoArgsConstructor
@Data
public static class ButtonSelectionDTO {
@SerializedName("question_key")
private String questionKey;
@SerializedName("title")
private String title;
@SerializedName("option_list")
private List<SelectListDTO.OptionListDTO> optionList;
@SerializedName("selected_id")
private String selectedId;
}
@NoArgsConstructor
@Data
public static class HorizontalContentListDTO {
@SerializedName("keyname")
private String keyname;
@SerializedName("value")
private String value;
@SerializedName("type")
private Integer type;
@SerializedName("url")
private String url;
@SerializedName("media_id")
private String mediaId;
@SerializedName("userid")
private String userid;
}
@NoArgsConstructor
@Data
public static class ButtonListDTO {
@SerializedName("text")
private String text;
@SerializedName("style")
private Integer style;
@SerializedName("key")
private String key;
}
@NoArgsConstructor
@Data
public static class CheckboxDTO {
@SerializedName("question_key")
private String questionKey;
@SerializedName("option_list")
private List<OptionListDTO> optionList;
@SerializedName("disable")
private Boolean disable;
@SerializedName("mode")
private Integer mode;
@NoArgsConstructor
@Data
public static class OptionListDTO {
@SerializedName("id")
private String id;
@SerializedName("text")
private String text;
@SerializedName("is_checked")
private Boolean isChecked;
}
}
@NoArgsConstructor
@Data
public static class MainTitleDTO {
@SerializedName("title")
private String title;
@SerializedName("desc")
private String desc;
}
@NoArgsConstructor
@Data
public static class SubmitButtonDTO {
@SerializedName("text")
private String text;
@SerializedName("key")
private String key;
}
@NoArgsConstructor
@Data
public static class SelectListDTO {
@SerializedName("question_key")
private String questionKey;
@SerializedName("title")
private String title;
@SerializedName("selected_id")
private String selectedId;
@SerializedName("disable")
private Boolean disable;
@SerializedName("option_list")
private List<OptionListDTO> optionList;
@NoArgsConstructor
@Data
public static class OptionListDTO {
@SerializedName("id")
private String id;
@SerializedName("text")
private String text;
}
}
@NoArgsConstructor
@Data
public static class ImageTextAreaDTO {
@SerializedName("type")
private Integer type;
@SerializedName("url")
private String url;
@SerializedName("title")
private String title;
@SerializedName("desc")
private String desc;
@SerializedName("image_url")
private String imageUrl;
}
@NoArgsConstructor
@Data
public static class CardImageDTO {
@SerializedName("url")
private String url;
@SerializedName("aspect_ratio")
private Double aspectRatio;
}
@NoArgsConstructor
@Data
public static class JumpListDTO {
@SerializedName("type")
private Integer type;
@SerializedName("title")
private String title;
@SerializedName("url")
private String url;
@SerializedName("appid")
private String appid;
@SerializedName("pagepath")
private String pagepath;
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamMediaIdConverter;
/**
* The type Wx cp xml out voice message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutVoiceMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -7947384031546099340L;
@XStreamAlias("Voice")
@XStreamConverter(value = XStreamMediaIdConverter.class)
private String mediaId;
/**
* Instantiates a new Wx cp xml out voice message.
*/
public WxCpXmlOutVoiceMessage() {
this.msgType = WxConsts.XmlMsgType.VOICE;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import me.chanjar.weixin.cp.bean.outxmlbuilder.*;
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
import me.chanjar.weixin.cp.util.crypto.WxCpTpCryptUtil;
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
import java.io.Serializable;
/**
* 被动回复消息.
* https://work.weixin.qq.com/api/doc#12975
*
* @author Daniel Qian
*/
@XStreamAlias("xml")
@Data
public abstract class WxCpXmlOutMessage implements Serializable {
private static final long serialVersionUID = 1418629839964153110L;
/**
* The To user name.
*/
@XStreamAlias("ToUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String toUserName;
/**
* The From user name.
*/
@XStreamAlias("FromUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String fromUserName;
/**
* The Create time.
*/
@XStreamAlias("CreateTime")
protected Long createTime;
/**
* The Msg type.
*/
@XStreamAlias("MsgType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String msgType;
/**
* 获得文本消息builder.
*
* @return the text builder
*/
public static TextBuilder TEXT() {
return new TextBuilder();
}
/**
* 获得图片消息builder.
*
* @return the image builder
*/
public static ImageBuilder IMAGE() {
return new ImageBuilder();
}
/**
* 获得语音消息builder.
*
* @return the voice builder
*/
public static VoiceBuilder VOICE() {
return new VoiceBuilder();
}
/**
* 获得视频消息builder.
*
* @return the video builder
*/
public static VideoBuilder VIDEO() {
return new VideoBuilder();
}
/**
* 获得图文消息builder.
*
* @return the news builder
*/
public static NewsBuilder NEWS() {
return new NewsBuilder();
}
/**
* 获得任务卡片消息builder.
*
* @return the task card builder
*/
public static TaskCardBuilder TASK_CARD() {
return new TaskCardBuilder();
}
/**
* 获得任务卡片消息builder.
*
* @return the update button builder
*/
public static UpdateButtonBuilder UPDATE_BUTTON() {
return new UpdateButtonBuilder();
}
/**
* 获得事件消息builder.
*
* @return the event builder
*/
public static EventBuilder EVENT() {
return new EventBuilder();
}
/**
* To xml string.
*
* @return the string
*/
protected String toXml() {
return XStreamTransformer.toXml((Class) this.getClass(), this);
}
/**
* 转换成加密的xml格式.
*
* @param wxCpConfigStorage the wx cp config storage
* @return the string
*/
public String toEncryptedXml(WxCpConfigStorage wxCpConfigStorage) {
String plainXml = toXml();
WxCpCryptUtil pc = new WxCpCryptUtil(wxCpConfigStorage);
return pc.encrypt(plainXml);
}
/**
* 企业微信服务商 转换加密的xml 格式
* @param wxCpTpConfigStorage th wx cp tp config storage
* @return the string
*/
public String toEncryptedXml(WxCpTpConfigStorage wxCpTpConfigStorage) {
String plainXml = toXml();
WxCpTpCryptUtil pc = new WxCpTpCryptUtil(wxCpTpConfigStorage);
return pc.encrypt(plainXml);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.bean.article.NewArticle;
import me.chanjar.weixin.cp.bean.templatecard.*;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpConsts.GroupRobotMsgType.*;
/**
* 微信群机器人消息
*
* @author yr created on 2020-08-20
*/
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Data
public class WxCpGroupRobotMessage implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
/**
* 消息类型
*/
private String msgType;
/**
* 文本内容,最长不超过2048个字节,markdown内容,最长不超过4096个字节,必须是utf8编码
* 必填
*/
private String content;
/**
* userid的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userid,可以使用mentioned_mobile_list
*/
private List<String> mentionedList;
/**
* 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人
*/
private List<String> mentionedMobileList;
/**
* 图片内容的base64编码
*/
private String base64;
/**
* 图片内容(base64编码前)的md5值
*/
private String md5;
/**
* 图文消息,一个图文消息支持1到8条图文
*/
private List<NewArticle> articles;
/**
* 文件id
*/
private String mediaId;
private Integer agentId;
// 模板型卡片特有属性
/**
* 模板卡片类型,文本通知型卡片填写 “text_notice”,
* 图文展示型卡片此处填写 “news_notice”,
* 按钮交互型卡片填写”button_interaction”,
* 投票选择型卡片填写”vote_interaction”,
* 多项选择型卡片填写 “multiple_interaction”
*/
private String cardType;
/**
* 卡片来源样式信息,不需要来源样式可不填写
* 来源图片的url
*/
private String sourceIconUrl;
/**
* 卡片来源样式信息,不需要来源样式可不填写
* 来源图片的描述,建议不超过20个字
*/
private String sourceDesc;
/**
* 来源文字的颜色,目前支持:0(默认) 灰色,1 黑色,2 红色,3 绿色
*/
private Integer sourceDescColor;
/**
* 更多操作界面的描述
*/
private String actionMenuDesc;
/**
* 操作列表,列表长度取值范围为 [1, 3]
*/
private List<ActionMenuItem> actionMenuActionList;
/**
* 一级标题,建议不超过36个字
*/
private String mainTitleTitle;
/**
* 标题辅助信息,建议不超过44个字
*/
private String mainTitleDesc;
/**
* 图文展示型的卡片必须有图片字段。
* 图片的url.
*/
private String cardImageUrl;
/**
* 图片的宽高比,宽高比要小于2.25,大于1.3,不填该参数默认1.3
*/
private Float cardImageAspectRatio;
/**
* 关键数据样式
* 关键数据样式的数据内容,建议不超过14个字
*/
private String emphasisContentTitle;
/**
* 关键数据样式的数据描述内容,建议不超过22个字
*/
private String emphasisContentDesc;
/**
* 二级普通文本,建议不超过160个字
*/
private String subTitleText;
/**
* 卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
*/
private List<VerticalContent> verticalContents;
/**
* 二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*/
private List<HorizontalContent> horizontalContents;
/**
* 跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
*/
private List<TemplateCardJump> jumps;
/**
* 整体卡片的点击跳转事件,text_notice必填本字段
* 跳转事件类型,1 代表跳转url,2 代表打开小程序。text_notice卡片模版中该字段取值范围为[1,2]
*/
private Integer cardActionType;
/**
* 跳转事件的url,card_action.type是1时必填
*/
private String cardActionUrl;
/**
* 跳转事件的小程序的appid,必须是与当前应用关联的小程序,card_action.type是2时必填
*/
private String cardActionAppid;
/**
* 跳转事件的小程序的pagepath,card_action.type是2时选填
*/
private String cardActionPagepath;
/**
* 按钮交互型卡片需指定。
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*/
private List<TemplateCardButton> buttons;
/**
* 投票选择型卡片需要指定
* 选择题key值,用户提交选项后,会产生回调事件,回调事件会带上该key值表示该题,最长支持1024字节
*/
private String checkboxQuestionKey;
/**
* 选择题模式,单选:0,多选:1,不填默认0
*/
private Integer checkboxMode;
/**
* 选项list,选项个数不超过 20 个,最少1个
*/
private List<CheckboxOption> options;
/**
* 提交按钮样式
* 按钮文案,建议不超过10个字,不填默认为提交
*/
private String submitButtonText;
/**
* 提交按钮的key,会产生回调事件将本参数作为EventKey返回,最长支持1024字节
*/
private String submitButtonKey;
/**
* 下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
*/
private List<MultipleSelect> selects;
/**
* 引用文献样式
*/
private QuoteArea quoteArea;
/**
* To json string.
*
* @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
messageJson.addProperty("msgtype", this.getMsgType());
if (this.getAgentId() != null) {
messageJson.addProperty("agentid", this.getAgentId());
}
switch (this.getMsgType()) {
case TEXT: {
JsonObject text = new JsonObject();
JsonArray uidJsonArray = new JsonArray();
JsonArray mobileJsonArray = new JsonArray();
text.addProperty("content", this.getContent());
if (this.getMentionedList() != null) {
for (String item : this.getMentionedList()) {
uidJsonArray.add(item);
}
}
if (this.getMentionedMobileList() != null) {
for (String item : this.getMentionedMobileList()) {
mobileJsonArray.add(item);
}
}
text.add("mentioned_list", uidJsonArray);
text.add("mentioned_mobile_list", mobileJsonArray);
messageJson.add("text", text);
break;
}
case MARKDOWN: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("markdown", text);
break;
}
case MARKDOWN_V2: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("markdown_v2", text);
break;
}
case IMAGE: {
JsonObject text = new JsonObject();
text.addProperty("base64", this.getBase64());
text.addProperty("md5", this.getMd5());
messageJson.add("image", text);
break;
}
case NEWS: {
JsonObject text = new JsonObject();
JsonArray array = new JsonArray();
for (NewArticle article : this.getArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
array.add(articleJson);
}
text.add("articles", array);
messageJson.add("news", text);
break;
}
case FILE: {
JsonObject file = new JsonObject();
file.addProperty("media_id", this.getMediaId());
messageJson.add("file", file);
break;
}
case TEMPLATE_CARD: {
JsonObject template = new JsonObject();
template.addProperty("card_type", this.getCardType());
if (StringUtils.isNotBlank(this.getSourceIconUrl()) || StringUtils.isNotBlank(this.getSourceDesc())) {
JsonObject source = new JsonObject();
if (StringUtils.isNotBlank(this.getSourceIconUrl())) {
source.addProperty("icon_url", this.getSourceIconUrl());
}
if (StringUtils.isNotBlank(this.getSourceDesc())) {
source.addProperty("desc", this.getSourceDesc());
}
source.addProperty("desc_color", this.getSourceDescColor());
template.add("source", source);
}
if (StringUtils.isNotBlank(this.getActionMenuDesc())) {
JsonObject action_menu = new JsonObject();
action_menu.addProperty("desc", this.getActionMenuDesc());
JsonArray actionList = new JsonArray();
List<ActionMenuItem> actionMenuItemList = this.getActionMenuActionList();
for (ActionMenuItem actionItemI : actionMenuItemList) {
actionList.add(actionItemI.toJson());
}
action_menu.add("action_list", actionList);
template.add("action_menu", action_menu);
}
if (StringUtils.isNotBlank(this.getMainTitleTitle()) || StringUtils.isNotBlank(this.getMainTitleDesc())) {
JsonObject mainTitle = new JsonObject();
if (StringUtils.isNotBlank(this.getMainTitleTitle())) {
mainTitle.addProperty("title", this.getMainTitleTitle());
}
if (StringUtils.isNotBlank(this.getMainTitleDesc())) {
mainTitle.addProperty("desc", this.getMainTitleDesc());
}
template.add("main_title", mainTitle);
}
if (StringUtils.isNotBlank(this.getCardImageUrl()) || this.getCardImageAspectRatio() != null) {
JsonObject cardImage = new JsonObject();
if (StringUtils.isNotBlank(this.getCardImageUrl())) {
cardImage.addProperty("url", this.getCardImageUrl());
}
if (null != this.getCardImageAspectRatio()) {
cardImage.addProperty("aspect_ratio", this.getCardImageAspectRatio());
}
template.add("card_image", cardImage);
}
if (StringUtils.isNotBlank(this.getEmphasisContentTitle()) || StringUtils.isNotBlank(this.getEmphasisContentDesc())) {
JsonObject emphasisContent = new JsonObject();
if (StringUtils.isNotBlank(this.getEmphasisContentTitle())) {
emphasisContent.addProperty("title", this.getEmphasisContentTitle());
}
if (StringUtils.isNotBlank(this.getEmphasisContentDesc())) {
emphasisContent.addProperty("desc", this.getEmphasisContentDesc());
}
template.add("emphasis_content", emphasisContent);
}
if (StringUtils.isNotBlank(this.getSubTitleText())) {
template.addProperty("sub_title_text", this.getSubTitleText());
}
List<VerticalContent> verticalContents = this.getVerticalContents();
if (null != verticalContents && !verticalContents.isEmpty()) {
JsonArray vContentJsonArray = new JsonArray();
for (VerticalContent vContent : this.getVerticalContents()) {
JsonObject tempObject = vContent.toJson();
vContentJsonArray.add(tempObject);
}
template.add("vertical_content_list", vContentJsonArray);
}
List<HorizontalContent> horizontalContents = this.getHorizontalContents();
if (null != horizontalContents && !horizontalContents.isEmpty()) {
JsonArray hContentJsonArray = new JsonArray();
for (HorizontalContent hContent : this.getHorizontalContents()) {
JsonObject tempObject = hContent.toJson();
hContentJsonArray.add(tempObject);
}
template.add("horizontal_content_list", hContentJsonArray);
}
List<TemplateCardJump> jumps = this.getJumps();
if (null != jumps && !jumps.isEmpty()) {
JsonArray jumpJsonArray = new JsonArray();
for (TemplateCardJump jump : this.getJumps()) {
JsonObject tempObject = jump.toJson();
jumpJsonArray.add(tempObject);
}
template.add("jump_list", jumpJsonArray);
}
if (null != this.getCardActionType()) {
JsonObject cardAction = new JsonObject();
cardAction.addProperty("type", this.getCardActionType());
if (StringUtils.isNotBlank(this.getCardActionUrl())) {
cardAction.addProperty("url", this.getCardActionUrl());
}
if (StringUtils.isNotBlank(this.getCardActionAppid())) {
cardAction.addProperty("appid", this.getCardActionAppid());
}
if (StringUtils.isNotBlank(this.getCardActionPagepath())) {
cardAction.addProperty("pagepath", this.getCardActionPagepath());
}
template.add("card_action", cardAction);
}
List<TemplateCardButton> buttons = this.getButtons();
if (null != buttons && !buttons.isEmpty()) {
JsonArray btnJsonArray = new JsonArray();
for (TemplateCardButton btn : this.getButtons()) {
JsonObject tempObject = btn.toJson();
btnJsonArray.add(tempObject);
}
template.add("button_list", btnJsonArray);
}
// checkbox
if (StringUtils.isNotBlank(this.getCheckboxQuestionKey())) {
JsonObject checkBox = new JsonObject();
checkBox.addProperty("question_key", this.getCheckboxQuestionKey());
if (null != this.getCheckboxMode()) {
checkBox.addProperty("mode", this.getCheckboxMode());
}
JsonArray optionArray = new JsonArray();
for (CheckboxOption option : this.getOptions()) {
JsonObject tempObject = option.toJson();
optionArray.add(tempObject);
}
checkBox.add("option_list", optionArray);
template.add("checkbox", checkBox);
}
// submit_button
if (StringUtils.isNotBlank(this.getSubmitButtonText()) || StringUtils.isNotBlank(this.getSubmitButtonKey())) {
JsonObject submit_button = new JsonObject();
if (StringUtils.isNotBlank(this.getSubmitButtonText())) {
submit_button.addProperty("text", this.getSubmitButtonText());
}
if (StringUtils.isNotBlank(this.getSubmitButtonKey())) {
submit_button.addProperty("key", this.getSubmitButtonKey());
}
template.add("submit_button", submit_button);
}
// select_list
List<MultipleSelect> selects = this.getSelects();
if (null != selects && !selects.isEmpty()) {
JsonArray selectJsonArray = new JsonArray();
for (MultipleSelect select : this.getSelects()) {
JsonObject tempObject = select.toJson();
selectJsonArray.add(tempObject);
}
template.add("select_list", selectJsonArray);
}
QuoteArea quoteArea = this.getQuoteArea();
if (null != quoteArea) {
JsonObject quoteAreaJson = quoteArea.toJson();
template.add("quote_area", quoteAreaJson);
}
messageJson.add("template_card", template);
break;
}
default:
}
return messageJson.toString();
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.converters.basic.IntConverter;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.util.XmlUtils;
import me.chanjar.weixin.common.util.xml.IntegerArrayConverter;
import me.chanjar.weixin.common.util.xml.StringArrayConverter;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
import me.chanjar.weixin.cp.util.crypto.WxCpTpCryptUtil;
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* sxh 修改版本,有些参数类型错误,修正版
* 回调推送的message
* https://work.weixin.qq.com/api/doc#90001/90143/90612
*
* @author zhenjun cai
*/
@XStreamAlias("xml")
@Slf4j
@Data
public class WxCpTpXmlMessage implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* 使用dom4j解析的存放所有xml属性和值的map.
*/
private Map<String, Object> allFieldsMap;
/**
* The Suite id.
*/
@XStreamAlias("SuiteId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String suiteId;
/**
* The Info type.
*/
@XStreamAlias("InfoType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String infoType;
/**
* The Time stamp.
*/
@XStreamAlias("TimeStamp")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String timeStamp;
/**
* The Suite ticket.
*/
@XStreamAlias("SuiteTicket")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String suiteTicket;
/**
* The Auth code.
*/
@XStreamAlias("AuthCode")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String authCode;
/**
* The Auth corp id.
*/
@XStreamAlias("AuthCorpId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String authCorpId;
/**
* The Change type.
*/
@XStreamAlias("ChangeType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String changeType;
/**
* The User id.
*/
@XStreamAlias("UserID")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String userID;
/**
* The Department.
*/
@XStreamAlias("Department")
@XStreamConverter(value = IntegerArrayConverter.class)
protected Integer[] department;
/**
* The Main department.
*/
@XStreamAlias("MainDepartment")
@XStreamConverter(value = IntConverter.class)
protected Integer mainDepartment;
/**
* The Is leader in dept.
*/
@XStreamAlias("IsLeaderInDept")
@XStreamConverter(value = IntegerArrayConverter.class)
protected Integer[] isLeaderInDept;
/**
* The Mobile.
*/
@XStreamAlias("Mobile")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String mobile;
/**
* The Position.
*/
@XStreamAlias("Position")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String position;
/**
* The Gender.
*/
@XStreamAlias("Gender")
@XStreamConverter(value = IntConverter.class)
protected Integer gender;
/**
* The Email.
*/
@XStreamAlias("Email")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String email;
/**
* The Status.
*/
@XStreamAlias("Status")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String status;
/**
* The Avatar.
*/
@XStreamAlias("Avatar")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String avatar;
/**
* The Alias.
*/
@XStreamAlias("Alias")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String alias;
/**
* The Telephone.
*/
@XStreamAlias("Telephone")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String telephone;
/**
* The Id.
*/
@XStreamAlias("Id")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String id;
/**
* The Name.
*/
@XStreamAlias("Name")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String name;
/**
* The Parent id.
*/
@XStreamAlias("ParentId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String parentId;
/**
* The Order.
*/
@XStreamAlias("Order")
@XStreamConverter(value = IntConverter.class)
protected Integer order;
/**
* The Tag id.
*/
@XStreamAlias("TagId")
@XStreamConverter(value = IntConverter.class)
protected Integer tagId;
/**
* The Add user items.
*/
@XStreamAlias("AddUserItems")
@XStreamConverter(value = StringArrayConverter.class)
protected String[] addUserItems;
/**
* The Del user items.
*/
@XStreamAlias("DelUserItems")
@XStreamConverter(value = StringArrayConverter.class)
protected String[] delUserItems;
/**
* The Add party items.
*/
@XStreamAlias("AddPartyItems")
@XStreamConverter(value = IntegerArrayConverter.class)
protected Integer[] addPartyItems;
/**
* The Del party items.
*/
@XStreamAlias("DelPartyItems")
@XStreamConverter(value = IntegerArrayConverter.class)
protected Integer[] delPartyItems;
/**
* The Service corp id.
*/
//ref: https://work.weixin.qq.com/api/doc/90001/90143/90585
@XStreamAlias("ServiceCorpId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String serviceCorpId;
/**
* The Register code.
*/
@XStreamAlias("RegisterCode")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String registerCode;
/**
* The Contact sync.
*/
@XStreamAlias("ContactSync")
protected ContactSync contactSync;
/**
* The Auth user info.
*/
@XStreamAlias("AuthUserInfo")
protected AuthUserInfo authUserInfo;
/**
* The Template id.
*/
@XStreamAlias("TemplateId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String templateId;
/**
* The Create time.
*/
@XStreamAlias("CreateTime")
protected Long createTime;
/**
* The To user name.
*/
@XStreamAlias("ToUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String toUserName;
/**
* The From user name.
*/
@XStreamAlias("FromUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String fromUserName;
/**
* The Msg type.
*/
@XStreamAlias("MsgType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String msgType;
/**
* The Event.
*/
@XStreamAlias("Event")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String event;
/**
* The Batch job.
*/
@XStreamAlias("BatchJob")
protected BatchJob batchJob;
/**
* The External user id.
*/
@XStreamAlias("ExternalUserID")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String externalUserID;
/**
* The State.
*/
@XStreamAlias("State")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String state;
/**
* The Source.
*/
@XStreamAlias("Source")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String source;
/**
* The Fail reason.
*/
@XStreamAlias("FailReason")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String failReason;
/**
* The Chat id.
*/
@XStreamAlias("ChatId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String chatId;
/**
* The Update detail.
*/
@XStreamAlias("UpdateDetail")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String updateDetail;
/**
* The Join scene.
*/
@XStreamAlias("JoinScene")
protected Integer joinScene;
/**
* The Quit scene.
*/
@XStreamAlias("QuitScene")
protected Integer quitScene;
/**
* The Mem change cnt.
*/
@XStreamAlias("MemChangeCnt")
protected Integer memChangeCnt;
/**
* The Tag type.
*/
@XStreamAlias("TagType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String tagType;
/**
* The Welcome code.
*/
@XStreamAlias("WelcomeCode")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String welcomeCode;
/**
* The From user.
*/
@XStreamAlias("FromUser")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String fromUser;
/**
* The Content.
*/
@XStreamAlias("Content")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String content;
/**
* The Msg id.
*/
@XStreamAlias("MsgId")
protected String msgId;
/**
* The Agent id.
*/
@XStreamAlias("AgentID")
protected Integer agentID;
/**
* The Pic url.
*/
@XStreamAlias("PicUrl")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String picUrl;
/**
* The Media id.
*/
@XStreamAlias("MediaId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String mediaId;
@XStreamAlias("Format")
@XStreamConverter(value = XStreamCDataConverter.class)
private String format;
@XStreamAlias("ThumbMediaId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String thumbMediaId;
@XStreamAlias("Location_X")
private Double locationX;
@XStreamAlias("Location_Y")
private Double locationY;
@XStreamAlias("Scale")
private Double scale;
@XStreamAlias("Label")
@XStreamConverter(value = XStreamCDataConverter.class)
private String label;
@XStreamAlias("Title")
@XStreamConverter(value = XStreamCDataConverter.class)
private String title;
@XStreamAlias("Description")
@XStreamConverter(value = XStreamCDataConverter.class)
private String description;
@XStreamAlias("Url")
@XStreamConverter(value = XStreamCDataConverter.class)
private String url;
@XStreamAlias("EventKey")
@XStreamConverter(value = XStreamCDataConverter.class)
private String eventKey;
@XStreamAlias("Latitude")
private Double latitude;
@XStreamAlias("Longitude")
private Double longitude;
@XStreamAlias("Precision")
private Double precision;
@XStreamAlias("AppType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String appType;
@XStreamAlias("ScanCodeInfo")
private WxCpXmlMessage.ScanCodeInfo scanCodeInfo = new WxCpXmlMessage.ScanCodeInfo();
@XStreamAlias("SendPicsInfo")
private WxCpXmlMessage.SendPicsInfo sendPicsInfo = new WxCpXmlMessage.SendPicsInfo();
@XStreamAlias("SendLocationInfo")
private WxCpXmlMessage.SendLocationInfo sendLocationInfo = new WxCpXmlMessage.SendLocationInfo();
@XStreamAlias("ApprovalInfo")
private WxCpXmlApprovalInfo approvalInfo = new WxCpXmlApprovalInfo();
@XStreamAlias("TaskId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String taskId;
@XStreamAlias("PaidCorpId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String paidCorpId;
@XStreamAlias("OrderId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String orderId;
@XStreamAlias("OperatorId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String operatorId;
@XStreamAlias("OldOrderId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String oldOrderId;
@XStreamAlias("NewOrderId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String newOrderId;
/**
* The type Contact sync.
*/
@Data
@XStreamAlias("ContactSync")
public static class ContactSync implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Access token.
*/
@XStreamAlias("AccessToken")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String accessToken;
/**
* The Expires in.
*/
@XStreamAlias("ExpiresIn")
protected Integer expiresIn;
}
/**
* The type Auth user info.
*/
@Data
@XStreamAlias("AuthUserInfo")
public static class AuthUserInfo implements Serializable {
/**
* The User id.
*/
@XStreamAlias("UserId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String userId;
}
/**
* The type Batch job.
*/
@Data
@XStreamAlias("BatchJob")
public static class BatchJob implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Job id.
*/
@XStreamAlias("JobId")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String JobId;
/**
* The Job type.
*/
@XStreamAlias("JobType")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String jobType;
/**
* The Err code.
*/
@XStreamAlias("ErrCode")
@XStreamConverter(value = IntConverter.class)
protected Integer errCode;
/**
* The Err msg.
*/
@XStreamAlias("ErrMsg")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String errMsg;
}
/**
* The type Approval info.
* @deprecated 无法同时适配不同回调下的实体字段,使用WxCpXmlApprovalInfo可完美适配
*/
@Data
@XStreamAlias("ApprovalInfo")
public static class ApprovalInfo implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Third no.
*/
@XStreamAlias("ThirdNo")
protected String thirdNo;
/**
* The Open sp name.
*/
@XStreamAlias("OpenSpName")
protected String openSpName;
/**
* The Open template id.
*/
@XStreamAlias("OpenTemplateId")
protected String openTemplateId;
/**
* The Open sp status.
*/
@XStreamAlias("OpenSpStatus")
protected Integer openSpStatus;
/**
* The Apply time.
*/
@XStreamAlias("ApplyTime")
protected Long applyTime;
/**
* The Apply user name.
*/
@XStreamAlias("ApplyUserName")
protected String applyUserName;
/**
* The Apply user id.
*/
@XStreamAlias("ApplyUserId")
protected String applyUserId;
/**
* The Apply user party.
*/
@XStreamAlias("ApplyUserParty")
protected String applyUserParty;
/**
* The Apply user image.
*/
@XStreamAlias("ApplyUserImage")
protected String applyUserImage;
/**
* The Approval nodes.
*/
@XStreamAlias("ApprovalNodes")
protected List<ApprovalNode> approvalNodes;
/**
* The Notify nodes.
*/
@XStreamAlias("NotifyNodes")
protected List<NotifyNode> notifyNodes;
/**
* The Approverstep.
*/
@XStreamAlias("approverstep")
protected Integer approverstep;
/**
* The type Approval node.
*/
//自建/第三方应用调用审批流程引擎,状态通知
//ref: https://work.weixin.qq.com/api/doc/90001/90143/90376#审批状态通知事件
//1.自建/第三方应用调用审批流程引擎发起申请之后,审批状态发生变化时
//2.自建/第三方应用调用审批流程引擎发起申请之后,在“审批中”状态,有任意审批人进行审批操作时
@Data
@XStreamAlias("ApprovalNode")
public static class ApprovalNode implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Node status.
*/
@XStreamAlias("NodeStatus")
protected Integer nodeStatus;
/**
* The Node attr.
*/
@XStreamAlias("NodeAttr")
protected Integer nodeAttr;
/**
* The Node type.
*/
@XStreamAlias("NodeType")
protected Integer nodeType;
/**
* The Items.
*/
@XStreamAlias("Items")
protected List<Item> items;
/**
* The type Item.
*/
@Data
@XStreamAlias("Item")
public static class Item implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Item name.
*/
@XStreamAlias("ItemName")
protected String itemName;
/**
* The Item user id.
*/
@XStreamAlias("ItemUserId")
protected String itemUserId;
/**
* The Item image.
*/
@XStreamAlias("ItemImage")
protected String itemImage;
/**
* The Item status.
*/
@XStreamAlias("ItemStatus")
protected Integer itemStatus;
/**
* The Item speech.
*/
@XStreamAlias("ItemSpeech")
protected String itemSpeech;
/**
* The Item op time.
*/
@XStreamAlias("ItemOpTime")
protected Long itemOpTime;
}
}
/**
* The type Notify node.
*/
@Data
@XStreamAlias("NotifyNode")
public static class NotifyNode implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
/**
* The Item name.
*/
@XStreamAlias("ItemName")
protected String itemName;
/**
* The Item user id.
*/
@XStreamAlias("ItemUserId")
protected String itemUserId;
/**
* The Item image.
*/
@XStreamAlias("ItemImage")
protected String itemImage;
}
}
/**
* From xml wx cp tp xml message.
*
* @param xml the xml
* @return the wx cp tp xml message
*/
public static WxCpTpXmlMessage fromXml(String xml) {
//修改微信变态的消息内容格式,方便解析
//xml = xml.replace("</PicList><PicList>", "");
final WxCpTpXmlMessage xmlPackage = XStreamTransformer.fromXml(WxCpTpXmlMessage.class, xml);
xmlPackage.setAllFieldsMap(XmlUtils.xml2Map(xml));
return xmlPackage;
}
/**
*
* @param encryptedXml the encrypted xml
* @param wxCpTpConfigStorage the wx cp config storage
* @param timestamp the timestamp
* @param nonce the nonce
* @param msgSignature the msg signature
* @return the wx cp tp xml message
*/
public static WxCpTpXmlMessage fromEncryptedXml(String encryptedXml, WxCpTpConfigStorage wxCpTpConfigStorage,
String timestamp, String nonce, String msgSignature) {
WxCpTpCryptUtil cryptUtil = new WxCpTpCryptUtil(wxCpTpConfigStorage);
String plainText = cryptUtil.decrypt(msgSignature, timestamp, nonce, encryptedXml);
log.debug("解密后的原始xml消息内容:{}", plainText);
return fromXml(plainText);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.article.MpnewsArticle;
import me.chanjar.weixin.cp.bean.article.NewArticle;
import me.chanjar.weixin.cp.constant.WxCpConsts.AppChatMsgType;
import java.io.Serializable;
import java.util.List;
/**
* <pre>
* 应用推送消息
* Created by Binary Wang on 2019/1/26.
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxCpAppChatMessage implements Serializable {
private static final long serialVersionUID = -5469013416372240229L;
/**
* 消息类型
*/
private String msgType;
/**
* 消息内容
*/
private String content;
/**
* 群聊id
*/
private String chatId;
/**
* 图片媒体文件id,可以调用上传临时素材接口获取
*/
private String mediaId;
/**
* 视频消息的标题,不超过128个字节,超过会自动截断
*/
private String title;
/**
* 视频消息的描述,不超过512个字节,超过会自动截断
*/
private String description;
/**
* 表示是否是保密消息
*/
private Boolean safe;
/**
* 点击后跳转的链接。
*/
private String url;
/**
* 按钮文字。 默认为“详情”, 不超过4个文字,超过自动截断。
*/
private String btnTxt;
/**
* 图文消息,一个图文消息支持1到8条图文
*/
private List<NewArticle> articles;
/**
* Mpnews图文消息,一个图文消息支持1到8条图文
*/
private List<MpnewsArticle> mpnewsArticles;
/**
* 构建文本消息.
*
* @param chatId the chat id
* @param content the content
* @param safe the safe
* @return the wx cp app chat message
*/
public static WxCpAppChatMessage buildTextMsg(String chatId, String content, boolean safe) {
final WxCpAppChatMessage message = new WxCpAppChatMessage();
message.setMsgType(AppChatMsgType.TEXT);
message.setContent(content);
message.setChatId(chatId);
message.setSafe(safe);
return message;
}
/**
* 生成json字符串.
*
* @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
messageJson.addProperty("msgtype", this.getMsgType());
messageJson.addProperty("chatid", this.getChatId());
if (this.getSafe() != null && this.getSafe()) {
messageJson.addProperty("safe", 1);
}
this.handleMsgType(messageJson);
return messageJson.toString();
}
private void handleMsgType(JsonObject messageJson) {
switch (this.getMsgType()) {
case AppChatMsgType.TEXT: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("text", text);
break;
}
case AppChatMsgType.MARKDOWN: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("markdown", text);
break;
}
case AppChatMsgType.TEXTCARD: {
JsonObject text = new JsonObject();
text.addProperty("title", this.getTitle());
text.addProperty("description", this.getDescription());
text.addProperty("url", this.getUrl());
text.addProperty("btntxt", this.getBtnTxt());
messageJson.add("textcard", text);
break;
}
case AppChatMsgType.IMAGE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("image", image);
break;
}
case AppChatMsgType.FILE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("file", image);
break;
}
case AppChatMsgType.VOICE: {
JsonObject voice = new JsonObject();
voice.addProperty("media_id", this.getMediaId());
messageJson.add("voice", voice);
break;
}
case AppChatMsgType.VIDEO: {
JsonObject video = new JsonObject();
video.addProperty("media_id", this.getMediaId());
video.addProperty("title", this.getTitle());
video.addProperty("description", this.getDescription());
messageJson.add("video", video);
break;
}
case AppChatMsgType.NEWS: {
JsonObject newsJsonObject = new JsonObject();
JsonArray articleJsonArray = new JsonArray();
for (NewArticle article : this.getArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("news", newsJsonObject);
break;
}
case AppChatMsgType.MPNEWS: {
JsonObject newsJsonObject = new JsonObject();
if (this.getMediaId() != null) {
newsJsonObject.addProperty("media_id", this.getMediaId());
} else {
JsonArray articleJsonArray = new JsonArray();
for (MpnewsArticle article : this.getMpnewsArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("thumb_media_id", article.getThumbMediaId());
articleJson.addProperty("author", article.getAuthor());
articleJson.addProperty("content_source_url", article.getContentSourceUrl());
articleJson.addProperty("content", article.getContent());
articleJson.addProperty("digest", article.getDigest());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
}
messageJson.add("mpnews", newsJsonObject);
break;
}
default: {
//do nothing
}
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java | package me.chanjar.weixin.cp.bean.message;
import com.google.common.base.Splitter;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
/**
* 消息发送结果对象类.
* Created by Binary Wang on 2017-6-22.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@Data
public class WxCpMessageSendResult implements Serializable {
private static final long serialVersionUID = 916455987193190004L;
@Override
public String toString() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* From json wx cp message send result.
*
* @param json the json
* @return the wx cp message send result
*/
public static WxCpMessageSendResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMessageSendResult.class);
}
@SerializedName("errcode")
private Integer errCode;
@SerializedName("errmsg")
private String errMsg;
@SerializedName("invaliduser")
private String invalidUser;
@SerializedName("invalidparty")
private String invalidParty;
@SerializedName("invalidtag")
private String invalidTag;
@SerializedName("unlicenseduser")
private String unlicensedUser;
@SerializedName("msgid")
private String msgId;
/**
* 仅消息类型为“按钮交互型”,“投票选择型”和“多项选择型”的模板卡片消息返回,应用可使用response_code调用更新模版卡片消息接口,24小时内有效,且只能使用一次
*/
@SerializedName("response_code")
private String responseCode;
/**
* Gets invalid user list.
*
* @return the invalid user list
*/
public List<String> getInvalidUserList() {
return this.content2List(this.invalidUser);
}
private List<String> content2List(String content) {
if (StringUtils.isBlank(content)) {
return Collections.emptyList();
}
return Splitter.on("|").splitToList(content);
}
/**
* Gets invalid party list.
*
* @return the invalid party list
*/
public List<String> getInvalidPartyList() {
return this.content2List(this.invalidParty);
}
/**
* Gets invalid tag list.
*
* @return the invalid tag list
*/
public List<String> getInvalidTagList() {
return this.content2List(this.invalidTag);
}
/**
* Gets unlicensed user list.
*
* @return the unlicensed user list
*/
public List<String> getUnlicensedUserList() {
return this.content2List(this.unlicensedUser);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.common.api.WxConsts.SchoolContactMsgType;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
import me.chanjar.weixin.cp.bean.article.MpnewsArticle;
import me.chanjar.weixin.cp.bean.article.NewArticle;
import org.apache.commons.lang3.ArrayUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import static me.chanjar.weixin.common.api.WxConsts.SchoolContactMsgType.*;
/**
* 发送「学校通知」
* https://developer.work.weixin.qq.com/document/path/92321
*
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-06-29
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpSchoolContactMessage implements Serializable {
private static final long serialVersionUID = 8833792280163704238L;
/**
* 指定发送对象,0表示发送给家长,1表示发送给学生,2表示发送给家长和学生,默认为0。
*/
@SerializedName("recv_scope")
private Integer recvScope = 0;
/**
* 家校通讯录家长列表,recv_scope为0或2表示发送给对应的家长,recv_scope为1忽略,(最多支持1000个)
*/
@SerializedName("to_parent_userid")
private String[] toParentUserId;
/**
* 家校通讯录学生列表,recv_scope为0表示发送给学生的所有家长,recv_scope为1表示发送给学生,recv_scope为2表示发送给学生和学生的所有家长(最多支持1000个)
*/
@SerializedName("to_student_userid")
private String[] toStudentUserId;
/**
* 家校通讯录部门列表,recv_scope为0表示发送给班级的所有家长,recv_scope为1表示发送给班级的所有学生,recv_scope为2表示发送给班级的所有学生和家长(最多支持100个)
*/
@SerializedName("to_party")
private String[] toParty;
/**
* 1表示字段生效,0表示字段无效。recv_scope为0表示发送给学校的所有家长,recv_scope为1表示发送给学校的所有学生,recv_scope为2表示发送给学校的所有学生和家长,默认为0
*/
@SerializedName("toall")
private Boolean toAll = false;
/**
* 消息类型
*/
@SerializedName("msgtype")
private String msgType;
/**
* 企业应用的id,整型。可在应用的设置页面查看
*/
@SerializedName("agentid")
private Integer agentId;
/**
* 消息内容,最长不超过2048个字节(支持id转译)
*/
@SerializedName("content")
private String content;
/**
* enable_id_trans
* 表示是否开启id转译,0表示否,1表示是,默认0
*/
@SerializedName("enable_id_trans")
private Boolean enableIdTrans = false;
/**
* enable_duplicate_check
* 表示是否开启重复消息检查,0表示否,1表示是,默认0
*/
@SerializedName("enable_duplicate_check")
private Boolean enableDuplicateCheck = false;
/**
* duplicate_check_interval
* 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时
*/
@SerializedName("duplicate_check_interval")
private Integer duplicateCheckInterval;
/**
* 图片媒体文件id,可以调用上传临时素材接口获取
*/
@SerializedName("media_id")
private String mediaId;
/**
* 视频消息的标题,不超过128个字节,超过会自动截断
*/
@SerializedName("title")
private String title;
/**
* 视频消息的描述,不超过512个字节,超过会自动截断
*/
@SerializedName("description")
private String description;
/**
* 小程序消息封面的mediaid,封面图建议尺寸为520*416
*/
@SerializedName("thumb_media_id")
private String thumbMediaId;
/**
* 小程序appid,必须是关联到企业的小程序应用
*/
@SerializedName("appid")
private String appId;
/**
* 点击消息卡片后进入的小程序页面路径
*/
@SerializedName("pagepath")
private String pagePath;
/**
* 图文消息
* https://developer.work.weixin.qq.com/document/path/92321#%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF
*/
private List<NewArticle> articles = new ArrayList<>();
/**
* 图文消息(mpnews)
* https://developer.work.weixin.qq.com/document/path/92321#%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF%EF%BC%88mpnews%EF
* %BC%89
* <p>
* mpnews类型的图文消息,跟普通的图文消息一致,唯一的差异是图文内容存储在企业微信。
* 多次发送mpnews,会被认为是不同的图文,阅读、点赞的统计会被分开计算。
*/
private List<MpnewsArticle> mpNewsArticles = new ArrayList<>();
/**
* <pre>
* 请使用.
* {@link SchoolContactMsgType#TEXT}
* {@link SchoolContactMsgType#IMAGE}
* {@link SchoolContactMsgType#VOICE}
* {@link SchoolContactMsgType#VIDEO}
* {@link SchoolContactMsgType#NEWS}
* {@link SchoolContactMsgType#MPNEWS}
* {@link SchoolContactMsgType#MINIPROGRAM}
* </pre>
*
* @param msgType 消息类型
*/
public void setMsgType(String msgType) {
this.msgType = msgType;
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
if (this.getRecvScope() != null) {
messageJson.addProperty("recv_scope", this.getRecvScope());
}
if (ArrayUtils.isNotEmpty(this.getToParentUserId())) {
messageJson.add("to_parent_userid", WxGsonBuilder.create().toJsonTree(this.getToParentUserId()));
}
if (ArrayUtils.isNotEmpty(this.getToStudentUserId())) {
messageJson.add("to_student_userid", WxGsonBuilder.create().toJsonTree(this.getToStudentUserId()));
}
if (ArrayUtils.isNotEmpty(this.getToParty())) {
messageJson.add("to_party", WxGsonBuilder.create().toJsonTree(this.getToParty()));
}
if (this.getToAll() != null) {
messageJson.addProperty("toall", this.getToAll() ? 1 : 0);
}
messageJson.addProperty("msgtype", this.getMsgType());
if (this.getAgentId() != null) {
messageJson.addProperty("agentid", this.getAgentId());
}
if (this.getEnableIdTrans() != null && this.getEnableIdTrans()) {
messageJson.addProperty("enable_id_trans", 1);
}
if (this.getEnableDuplicateCheck() != null && this.getEnableDuplicateCheck()) {
messageJson.addProperty("enable_duplicate_check", 1);
}
if (this.getDuplicateCheckInterval() != null) {
messageJson.addProperty("duplicate_check_interval", this.getDuplicateCheckInterval());
}
this.handleMsgType(messageJson);
return messageJson.toString();
}
/**
* 封装消息类型
*
* @param messageJson
*/
private void handleMsgType(JsonObject messageJson) {
switch (this.getMsgType()) {
case TEXT: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("text", text);
break;
}
case IMAGE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("image", image);
break;
}
case FILE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("file", image);
break;
}
case VOICE: {
JsonObject voice = new JsonObject();
voice.addProperty("media_id", this.getMediaId());
messageJson.add("voice", voice);
break;
}
case VIDEO: {
JsonObject video = new JsonObject();
video.addProperty("media_id", this.getMediaId());
video.addProperty("title", this.getTitle());
video.addProperty("description", this.getDescription());
messageJson.add("video", video);
break;
}
case NEWS: {
JsonObject newsJsonObject = new JsonObject();
JsonArray articleJsonArray = new JsonArray();
for (NewArticle article : this.getArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("news", newsJsonObject);
break;
}
case MPNEWS: {
JsonObject newsJsonObject = new JsonObject();
JsonArray articleJsonArray = new JsonArray();
for (MpnewsArticle article : this.getMpNewsArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("thumb_media_id", article.getThumbMediaId());
articleJson.addProperty("author", article.getAuthor());
articleJson.addProperty("content_source_url", article.getContentSourceUrl());
articleJson.addProperty("content", article.getContent());
articleJson.addProperty("digest", article.getDigest());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("mpnews", newsJsonObject);
break;
}
case MINIPROGRAM: {
JsonObject miniprogram = new JsonObject();
miniprogram.addProperty("appid", this.getAppId());
miniprogram.addProperty("pagepath", this.getPagePath());
miniprogram.addProperty("title", this.getTitle());
miniprogram.addProperty("thumb_media_id", this.getThumbMediaId());
messageJson.add("miniprogram", miniprogram);
break;
}
default: {
// do nothing
}
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.Data;
import me.chanjar.weixin.common.api.WxConsts.KefuMsgType;
import me.chanjar.weixin.cp.bean.article.MpnewsArticle;
import me.chanjar.weixin.cp.bean.article.NewArticle;
import me.chanjar.weixin.cp.bean.messagebuilder.*;
import me.chanjar.weixin.cp.bean.taskcard.TaskCardButton;
import me.chanjar.weixin.cp.bean.templatecard.*;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static me.chanjar.weixin.common.api.WxConsts.KefuMsgType.*;
/**
* 消息.
*
* @author Daniel Qian
*/
@Data
public class WxCpMessage implements Serializable {
private static final long serialVersionUID = -2082278303476631708L;
/**
* 指定接收消息的成员,成员ID列表(多个接收者用‘|’分隔,最多支持1000个)。
* 特殊情况:指定为"@all",则向该企业应用的全部成员发送
*/
private String toUser;
/**
* 指定接收消息的部门,部门ID列表,多个接收者用‘|’分隔,最多支持100个。
* 当touser为"@all"时忽略本参数
*/
private String toParty;
/**
* 指定接收消息的标签,标签ID列表,多个接收者用‘|’分隔,最多支持100个。
* 当touser为"@all"时忽略本参数
*/
private String toTag;
/**
* 企业应用的id,整型。企业内部开发,可在应用的设置页面查看;第三方服务商,可通过接口 获取企业授权信息 获取该参数值
*/
private Integer agentId;
/**
* 消息类型
* 文本消息: text
* 图片消息: image
* 语音消息: voice
* 视频消息: video
* 文件消息: file
* 文本卡片消息: textcard
* 图文消息: news
* 图文消息: mpnews
* markdown消息: markdown
* 模板卡片消息: template_card
*/
private String msgType;
/**
* 消息内容,最长不超过2048个字节,超过将截断(支持id转译)
*/
private String content;
/**
* 媒体文件id,可以调用上传临时素材接口获取
*/
private String mediaId;
/**
* 图文消息缩略图的media_id, 可以通过素材管理接口获得。此处thumb_media_id即上传接口返回的media_id
*/
private String thumbMediaId;
/**
* 标题,不超过128个字节,超过会自动截断(支持id转译)
*/
private String title;
/**
* 描述,不超过512个字节,超过会自动截断(支持id转译)
*/
private String description;
private String musicUrl;
private String hqMusicUrl;
/**
* 表示是否是保密消息,默认为0;注意仅 mpnews 类型的消息支持safe值为2,其他消息类型不支持
* 0表示可对外分享
* 1表示不能分享且内容显示水印
* 2表示仅限在企业内分享
*/
private String safe;
/**
* 点击后跳转的链接。最长2048字节,请确保包含了协议头(http/https)
*/
private String url;
/**
* 按钮文字。 默认为“详情”, 不超过4个文字,超过自动截断。
*/
private String btnTxt;
/**
* 图文消息,一个图文消息支持1到8条图文
*/
private List<NewArticle> articles = new ArrayList<>();
/**
* 图文消息,一个图文消息支持1到8条图文
*/
private List<MpnewsArticle> mpnewsArticles = new ArrayList<>();
/**
* 小程序appid,必须是与当前应用关联的小程序,appid和pagepath必须同时填写,填写后会忽略url字段
*/
private String appId;
/**
* 点击消息卡片后的小程序页面,最长1024个字节,仅限本小程序内的页面。该字段不填则消息点击后不跳转。
*/
private String page;
/**
* 是否放大第一个content_item
*/
private Boolean emphasisFirstItem;
/**
* 消息内容键值对,最多允许10个item
*/
private Map<String, String> contentItems;
/**
* enable_id_trans
* 表示是否开启id转译,0表示否,1表示是,默认0
*/
private Boolean enableIdTrans = false;
/**
* enable_duplicate_check
* 表示是否开启重复消息检查,0表示否,1表示是,默认0
*/
private Boolean enableDuplicateCheck = false;
/**
* duplicate_check_interval
* 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时
*/
private Integer duplicateCheckInterval;
/**
* 任务卡片特有的属性.
*/
private String taskId;
private List<TaskCardButton> taskButtons = new ArrayList<>();
// 模板型卡片特有属性
/**
* 模板卡片类型,文本通知型卡片填写 “text_notice”,
* 图文展示型卡片此处填写 “news_notice”,
* 按钮交互型卡片填写”button_interaction”,
* 投票选择型卡片填写”vote_interaction”,
* 多项选择型卡片填写 “multiple_interaction”
*/
private String cardType;
/**
* 卡片来源样式信息,不需要来源样式可不填写
* 来源图片的url
*/
private String sourceIconUrl;
/**
* 卡片来源样式信息,不需要来源样式可不填写
* 来源图片的描述,建议不超过20个字
*/
private String sourceDesc;
/**
* 来源文字的颜色,目前支持:0(默认) 灰色,1 黑色,2 红色,3 绿色
*/
private Integer sourceDescColor;
/**
* 更多操作界面的描述
*/
private String actionMenuDesc;
/**
* 操作列表,列表长度取值范围为 [1, 3]
*/
private List<ActionMenuItem> actionMenuActionList;
/**
* 一级标题,建议不超过36个字
*/
private String mainTitleTitle;
/**
* 标题辅助信息,建议不超过44个字
*/
private String mainTitleDesc;
/**
* 左图右文样式,news_notice类型的卡片,card_image 和 image_text_area 两者必填一个字段,不可都不填
*/
private TemplateCardImageTextArea imageTextArea;
/**
* 图文展示型的卡片必须有图片字段。
* 图片的url.
*/
private String cardImageUrl;
/**
* 图片的宽高比,宽高比要小于2.25,大于1.3,不填该参数默认1.3
*/
private Float cardImageAspectRatio;
/**
* 关键数据样式
* 关键数据样式的数据内容,建议不超过14个字
*/
private String emphasisContentTitle;
/**
* 关键数据样式的数据描述内容,建议不超过22个字
*/
private String emphasisContentDesc;
/**
* 二级普通文本,建议不超过160个字
*/
private String subTitleText;
/**
* 卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
*/
private List<VerticalContent> verticalContents;
/**
* 二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*/
private List<HorizontalContent> horizontalContents;
/**
* 跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
*/
private List<TemplateCardJump> jumps;
/**
* 整体卡片的点击跳转事件,text_notice必填本字段
* 跳转事件类型,1 代表跳转url,2 代表打开小程序。text_notice卡片模版中该字段取值范围为[1,2]
*/
private Integer cardActionType;
/**
* 跳转事件的url,card_action.type是1时必填
*/
private String cardActionUrl;
/**
* 跳转事件的小程序的appid,必须是与当前应用关联的小程序,card_action.type是2时必填
*/
private String cardActionAppid;
/**
* 跳转事件的小程序的pagepath,card_action.type是2时选填
*/
private String cardActionPagepath;
/**
* 按钮交互型卡片需指定。
* button_selection
*/
private TemplateCardButtonSelection buttonSelection;
/**
* 按钮交互型卡片需指定。
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*/
private List<TemplateCardButton> buttons;
/**
* 投票选择型卡片需要指定
* 选择题key值,用户提交选项后,会产生回调事件,回调事件会带上该key值表示该题,最长支持1024字节
*/
private String checkboxQuestionKey;
/**
* 选择题模式,单选:0,多选:1,不填默认0
*/
private Integer checkboxMode;
/**
* 选项list,选项个数不超过 20 个,最少1个
*/
private List<CheckboxOption> options;
/**
* 提交按钮样式
* 按钮文案,建议不超过10个字,不填默认为提交
*/
private String submitButtonText;
/**
* 提交按钮的key,会产生回调事件将本参数作为EventKey返回,最长支持1024字节
*/
private String submitButtonKey;
/**
* 下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
*/
private List<MultipleSelect> selects;
/**
* 引用文献样式
*/
private QuoteArea quoteArea;
/**
* 获得文本消息builder.
*
* @return the text builder
*/
public static TextBuilder TEXT() {
return new TextBuilder();
}
/**
* 获得文本卡片消息builder.
*
* @return the text card builder
*/
public static TextCardBuilder TEXTCARD() {
return new TextCardBuilder();
}
/**
* 获得图片消息builder.
*
* @return the image builder
*/
public static ImageBuilder IMAGE() {
return new ImageBuilder();
}
/**
* 获得语音消息builder.
*
* @return the voice builder
*/
public static VoiceBuilder VOICE() {
return new VoiceBuilder();
}
/**
* 获得视频消息builder.
*
* @return the video builder
*/
public static VideoBuilder VIDEO() {
return new VideoBuilder();
}
/**
* 获得图文消息builder.
*
* @return the news builder
*/
public static NewsBuilder NEWS() {
return new NewsBuilder();
}
/**
* 获得mpnews图文消息builder.
*
* @return the mpnews builder
*/
public static MpnewsBuilder MPNEWS() {
return new MpnewsBuilder();
}
/**
* 获得markdown消息builder.
*
* @return the markdown msg builder
*/
public static MarkdownMsgBuilder MARKDOWN() {
return new MarkdownMsgBuilder();
}
/**
* 获得文件消息builder.
*
* @return the file builder
*/
public static FileBuilder FILE() {
return new FileBuilder();
}
/**
* 获得任务卡片消息builder.
*
* @return the task card builder
*/
public static TaskCardBuilder TASKCARD() {
return new TaskCardBuilder();
}
/**
* 获得模板卡片消息builder.
*
* @return the template card builder
*/
public static TemplateCardBuilder TEMPLATECARD() {
return new TemplateCardBuilder();
}
/**
* 获得小程序通知消息builder.
*
* @return the mini program notice msg builder
*/
public static MiniProgramNoticeMsgBuilder newMiniProgramNoticeBuilder() {
return new MiniProgramNoticeMsgBuilder();
}
/**
* <pre>
* 请使用.
* {@link KefuMsgType#TEXT}
* {@link KefuMsgType#IMAGE}
* {@link KefuMsgType#VOICE}
* {@link KefuMsgType#MUSIC}
* {@link KefuMsgType#VIDEO}
* {@link KefuMsgType#NEWS}
* {@link KefuMsgType#MPNEWS}
* {@link KefuMsgType#MARKDOWN}
* {@link KefuMsgType#TASKCARD}
* {@link KefuMsgType#MINIPROGRAM_NOTICE}
* {@link KefuMsgType#TEMPLATE_CARD}
* </pre>
*
* @param msgType 消息类型
*/
public void setMsgType(String msgType) {
this.msgType = msgType;
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
if (this.getAgentId() != null) {
messageJson.addProperty("agentid", this.getAgentId());
}
if (StringUtils.isNotBlank(this.getToUser())) {
messageJson.addProperty("touser", this.getToUser());
}
messageJson.addProperty("msgtype", this.getMsgType());
if (StringUtils.isNotBlank(this.getToParty())) {
messageJson.addProperty("toparty", this.getToParty());
}
if (StringUtils.isNotBlank(this.getToTag())) {
messageJson.addProperty("totag", this.getToTag());
}
if (this.getEnableIdTrans()) {
messageJson.addProperty("enable_id_trans", 1);
}
if (this.getEnableDuplicateCheck()) {
messageJson.addProperty("enable_duplicate_check", 1);
}
if (this.getDuplicateCheckInterval() != null) {
messageJson.addProperty("duplicate_check_interval", this.getDuplicateCheckInterval());
}
this.handleMsgType(messageJson);
if (StringUtils.isNotBlank(this.getSafe())) {
messageJson.addProperty("safe", this.getSafe());
}
return messageJson.toString();
}
private void handleMsgType(JsonObject messageJson) {
switch (this.getMsgType()) {
case TEXT: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("text", text);
break;
}
case MARKDOWN: {
JsonObject text = new JsonObject();
text.addProperty("content", this.getContent());
messageJson.add("markdown", text);
break;
}
case TEXTCARD: {
JsonObject text = new JsonObject();
text.addProperty("title", this.getTitle());
text.addProperty("description", this.getDescription());
text.addProperty("url", this.getUrl());
text.addProperty("btntxt", this.getBtnTxt());
messageJson.add("textcard", text);
break;
}
case IMAGE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("image", image);
break;
}
case FILE: {
JsonObject image = new JsonObject();
image.addProperty("media_id", this.getMediaId());
messageJson.add("file", image);
break;
}
case VOICE: {
JsonObject voice = new JsonObject();
voice.addProperty("media_id", this.getMediaId());
messageJson.add("voice", voice);
break;
}
case VIDEO: {
JsonObject video = new JsonObject();
video.addProperty("media_id", this.getMediaId());
video.addProperty("thumb_media_id", this.getThumbMediaId());
video.addProperty("title", this.getTitle());
video.addProperty("description", this.getDescription());
messageJson.add("video", video);
break;
}
case NEWS: {
JsonObject newsJsonObject = new JsonObject();
JsonArray articleJsonArray = new JsonArray();
for (NewArticle article : this.getArticles()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("description", article.getDescription());
articleJson.addProperty("url", article.getUrl());
articleJson.addProperty("picurl", article.getPicUrl());
articleJson.addProperty("appid", article.getAppid());
articleJson.addProperty("pagepath", article.getPagepath());
articleJsonArray.add(articleJson);
}
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("news", newsJsonObject);
break;
}
case MPNEWS: {
JsonObject newsJsonObject = new JsonObject();
if (this.getMediaId() != null) {
newsJsonObject.addProperty("media_id", this.getMediaId());
} else {
JsonArray articleJsonArray = new JsonArray();
for (MpnewsArticle article : this.getMpnewsArticles()) {
article2Json(articleJsonArray, article);
}
newsJsonObject.add("articles", articleJsonArray);
}
messageJson.add("mpnews", newsJsonObject);
break;
}
case TASKCARD: {
JsonObject text = new JsonObject();
text.addProperty("title", this.getTitle());
text.addProperty("description", this.getDescription());
if (StringUtils.isNotBlank(this.getUrl())) {
text.addProperty("url", this.getUrl());
}
text.addProperty("task_id", this.getTaskId());
JsonArray buttonJsonArray = new JsonArray();
for (TaskCardButton button : this.getTaskButtons()) {
btn2Json(buttonJsonArray, button);
}
text.add("btn", buttonJsonArray);
messageJson.add("taskcard", text);
break;
}
case MINIPROGRAM_NOTICE: {
JsonObject notice = new JsonObject();
notice.addProperty("appid", this.getAppId());
notice.addProperty("page", this.getPage());
notice.addProperty("description", this.getDescription());
notice.addProperty("title", this.getTitle());
notice.addProperty("emphasis_first_item", this.getEmphasisFirstItem());
JsonArray content = new JsonArray();
for (Map.Entry<String, String> item : this.getContentItems().entrySet()) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("key", item.getKey());
articleJson.addProperty("value", item.getValue());
content.add(articleJson);
}
notice.add("content_item", content);
messageJson.add("miniprogram_notice", notice);
break;
}
case TEMPLATE_CARD: {
JsonObject template = new JsonObject();
template.addProperty("card_type", this.getCardType());
if (StringUtils.isNotBlank(this.getSourceIconUrl()) || StringUtils.isNotBlank(this.getSourceDesc())) {
JsonObject source = new JsonObject();
if (StringUtils.isNotBlank(this.getSourceIconUrl())) {
source.addProperty("icon_url", this.getSourceIconUrl());
}
if (StringUtils.isNotBlank(this.getSourceDesc())) {
source.addProperty("desc", this.getSourceDesc());
}
source.addProperty("desc_color", this.getSourceDescColor());
template.add("source", source);
}
if (StringUtils.isNotBlank(this.getActionMenuDesc())) {
JsonObject action_menu = new JsonObject();
action_menu.addProperty("desc", this.getActionMenuDesc());
JsonArray actionList = new JsonArray();
List<ActionMenuItem> actionMenuItemList = this.getActionMenuActionList();
for (ActionMenuItem actionItemI : actionMenuItemList) {
actionList.add(actionItemI.toJson());
}
action_menu.add("action_list", actionList);
template.add("action_menu", action_menu);
}
if (StringUtils.isNotBlank(this.getMainTitleTitle()) || StringUtils.isNotBlank(this.getMainTitleDesc())) {
JsonObject mainTitle = new JsonObject();
if (StringUtils.isNotBlank(this.getMainTitleTitle())) {
mainTitle.addProperty("title", this.getMainTitleTitle());
}
if (StringUtils.isNotBlank(this.getMainTitleDesc())) {
mainTitle.addProperty("desc", this.getMainTitleDesc());
}
template.add("main_title", mainTitle);
}
if (this.getImageTextArea() != null) {
template.add("image_text_area", this.getImageTextArea().toJson());
}
if (StringUtils.isNotBlank(this.getCardImageUrl()) || this.getCardImageAspectRatio() != null) {
JsonObject cardImage = new JsonObject();
if (StringUtils.isNotBlank(this.getCardImageUrl())) {
cardImage.addProperty("url", this.getCardImageUrl());
}
if (null != this.getCardImageAspectRatio()) {
cardImage.addProperty("aspect_ratio", this.getCardImageAspectRatio());
}
template.add("card_image", cardImage);
}
if (StringUtils.isNotBlank(this.getEmphasisContentTitle()) || StringUtils.isNotBlank(this.getEmphasisContentDesc())) {
JsonObject emphasisContent = new JsonObject();
if (StringUtils.isNotBlank(this.getEmphasisContentTitle())) {
emphasisContent.addProperty("title", this.getEmphasisContentTitle());
}
if (StringUtils.isNotBlank(this.getEmphasisContentDesc())) {
emphasisContent.addProperty("desc", this.getEmphasisContentDesc());
}
template.add("emphasis_content", emphasisContent);
}
if (StringUtils.isNotBlank(this.getSubTitleText())) {
template.addProperty("sub_title_text", this.getSubTitleText());
}
if (StringUtils.isNotBlank(this.getTaskId())) {
template.addProperty("task_id", this.getTaskId());
}
List<VerticalContent> verticalContents = this.getVerticalContents();
if (null != verticalContents && !verticalContents.isEmpty()) {
JsonArray vContentJsonArray = new JsonArray();
for (VerticalContent vContent : this.getVerticalContents()) {
JsonObject tempObject = vContent.toJson();
vContentJsonArray.add(tempObject);
}
template.add("vertical_content_list", vContentJsonArray);
}
List<HorizontalContent> horizontalContents = this.getHorizontalContents();
if (null != horizontalContents && !horizontalContents.isEmpty()) {
JsonArray hContentJsonArray = new JsonArray();
for (HorizontalContent hContent : this.getHorizontalContents()) {
JsonObject tempObject = hContent.toJson();
hContentJsonArray.add(tempObject);
}
template.add("horizontal_content_list", hContentJsonArray);
}
List<TemplateCardJump> jumps = this.getJumps();
if (null != jumps && !jumps.isEmpty()) {
JsonArray jumpJsonArray = new JsonArray();
for (TemplateCardJump jump : this.getJumps()) {
JsonObject tempObject = jump.toJson();
jumpJsonArray.add(tempObject);
}
template.add("jump_list", jumpJsonArray);
}
if (null != this.getCardActionType()) {
JsonObject cardAction = new JsonObject();
cardAction.addProperty("type", this.getCardActionType());
if (StringUtils.isNotBlank(this.getCardActionUrl())) {
cardAction.addProperty("url", this.getCardActionUrl());
}
if (StringUtils.isNotBlank(this.getCardActionAppid())) {
cardAction.addProperty("appid", this.getCardActionAppid());
}
if (StringUtils.isNotBlank(this.getCardActionPagepath())) {
cardAction.addProperty("pagepath", this.getCardActionPagepath());
}
template.add("card_action", cardAction);
}
TemplateCardButtonSelection buttonSelection = this.getButtonSelection();
if (null != buttonSelection) {
template.add("button_selection", buttonSelection.toJson());
}
List<TemplateCardButton> buttons = this.getButtons();
if (null != buttons && !buttons.isEmpty()) {
JsonArray btnJsonArray = new JsonArray();
for (TemplateCardButton btn : this.getButtons()) {
JsonObject tempObject = btn.toJson();
btnJsonArray.add(tempObject);
}
template.add("button_list", btnJsonArray);
}
// checkbox
if (StringUtils.isNotBlank(this.getCheckboxQuestionKey())) {
JsonObject checkBox = new JsonObject();
checkBox.addProperty("question_key", this.getCheckboxQuestionKey());
if (null != this.getCheckboxMode()) {
checkBox.addProperty("mode", this.getCheckboxMode());
}
JsonArray optionArray = new JsonArray();
for (CheckboxOption option : this.getOptions()) {
JsonObject tempObject = option.toJson();
optionArray.add(tempObject);
}
checkBox.add("option_list", optionArray);
template.add("checkbox", checkBox);
}
// submit_button
if (StringUtils.isNotBlank(this.getSubmitButtonText()) || StringUtils.isNotBlank(this.getSubmitButtonKey())) {
JsonObject submit_button = new JsonObject();
if (StringUtils.isNotBlank(this.getSubmitButtonText())) {
submit_button.addProperty("text", this.getSubmitButtonText());
}
if (StringUtils.isNotBlank(this.getSubmitButtonKey())) {
submit_button.addProperty("key", this.getSubmitButtonKey());
}
template.add("submit_button", submit_button);
}
// select_list
List<MultipleSelect> selects = this.getSelects();
if (null != selects && !selects.isEmpty()) {
JsonArray selectJsonArray = new JsonArray();
for (MultipleSelect select : this.getSelects()) {
JsonObject tempObject = select.toJson();
selectJsonArray.add(tempObject);
}
template.add("select_list", selectJsonArray);
}
QuoteArea quoteArea = this.getQuoteArea();
if (null != quoteArea) {
JsonObject quoteAreaJson = quoteArea.toJson();
template.add("quote_area", quoteAreaJson);
}
messageJson.add("template_card", template);
break;
}
default: {
// do nothing
}
}
}
private void btn2Json(JsonArray buttonJsonArray, TaskCardButton button) {
JsonObject buttonJson = new JsonObject();
buttonJson.addProperty("key", button.getKey());
buttonJson.addProperty("name", button.getName());
if (StringUtils.isNotBlank(button.getReplaceName())) {
buttonJson.addProperty("replace_name", button.getReplaceName());
}
if (StringUtils.isNotBlank(button.getColor())) {
buttonJson.addProperty("color", button.getColor());
}
if (button.getBold() != null) {
buttonJson.addProperty("is_bold", button.getBold());
}
buttonJsonArray.add(buttonJson);
}
private void article2Json(JsonArray articleJsonArray, MpnewsArticle article) {
JsonObject articleJson = new JsonObject();
articleJson.addProperty("title", article.getTitle());
articleJson.addProperty("thumb_media_id", article.getThumbMediaId());
articleJson.addProperty("author", article.getAuthor());
articleJson.addProperty("content_source_url", article.getContentSourceUrl());
articleJson.addProperty("content", article.getContent());
articleJson.addProperty("digest", article.getDigest());
articleJson.addProperty("show_cover_pic", article.getShowCoverPic());
articleJsonArray.add(articleJson);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java | package me.chanjar.weixin.cp.bean.message;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 互联企业的消息推送接口返回实体
*
* @author pg created on 2021年6月22日
*/
@Setter
@Getter
public class WxCpLinkedCorpMessageSendResult extends WxCpBaseResp {
private static final long serialVersionUID = 3990693822996824333L;
@SerializedName("invaliduser")
private String[] invalidUser;
@SerializedName("invalidparty")
private String[] invalidParty;
@SerializedName("invalidtag")
private String[] invalidTag;
@Override
public String toString() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* From json wx cp linked corp message send result.
*
* @param json the json
* @return the wx cp linked corp message send result
*/
public static WxCpLinkedCorpMessageSendResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLinkedCorpMessageSendResult.class);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import java.io.Serializable;
/**
* The type Wx cp xml out video message.
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutVideoMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -8672761162722733622L;
/**
* The Video.
*/
@XStreamAlias("Video")
protected final Video video = new Video();
/**
* Instantiates a new Wx cp xml out video message.
*/
public WxCpXmlOutVideoMessage() {
this.msgType = WxConsts.XmlMsgType.VIDEO;
}
/**
* Gets media id.
*
* @return the media id
*/
public String getMediaId() {
return this.video.getMediaId();
}
/**
* Sets media id.
*
* @param mediaId the media id
*/
public void setMediaId(String mediaId) {
this.video.setMediaId(mediaId);
}
/**
* Gets title.
*
* @return the title
*/
public String getTitle() {
return this.video.getTitle();
}
/**
* Sets title.
*
* @param title the title
*/
public void setTitle(String title) {
this.video.setTitle(title);
}
/**
* Gets description.
*
* @return the description
*/
public String getDescription() {
return this.video.getDescription();
}
/**
* Sets description.
*
* @param description the description
*/
public void setDescription(String description) {
this.video.setDescription(description);
}
/**
* The type Video.
*/
@Data
@XStreamAlias("Video")
public static class Video implements Serializable {
private static final long serialVersionUID = -8672761162722733622L;
@XStreamAlias("MediaId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String mediaId;
@XStreamAlias("Title")
@XStreamConverter(value = XStreamCDataConverter.class)
private String title;
@XStreamAlias("Description")
@XStreamConverter(value = XStreamCDataConverter.class)
private String description;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java | package me.chanjar.weixin.cp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
/**
* The type Wx cp xml out event message.
*
* @author eYoung
* created at 2021/12/3 16:36
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutEventMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -692538307520295832L;
@XStreamAlias("Event")
@XStreamConverter(value = XStreamCDataConverter.class)
private String event;
@XStreamAlias("ChatId")
@XStreamConverter(value = XStreamCDataConverter.class)
private String chatId;
@XStreamAlias("ChangeType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String changeType;
@XStreamAlias("UpdateDetail")
@XStreamConverter(value = XStreamCDataConverter.class)
private String updateDetail;
@XStreamAlias("JoinScene")
private String joinScene;
@XStreamAlias("QuitScene")
private String quitScene;
@XStreamAlias("MemChangeCnt")
private String memChangeCnt;
@XStreamAlias("TagType")
@XStreamConverter(value = XStreamCDataConverter.class)
private String tagType;
@XStreamAlias("StrategyId")
private String strategyId;
@XStreamAlias("UserID")
@XStreamConverter(value = XStreamCDataConverter.class)
private String userID;
@XStreamAlias("ExternalUserID")
@XStreamConverter(value = XStreamCDataConverter.class)
private String externalUserID;
@XStreamAlias("State")
@XStreamConverter(value = XStreamCDataConverter.class)
private String state;
@XStreamAlias("WelcomeCode")
@XStreamConverter(value = XStreamCDataConverter.class)
private String welcomeCode;
@XStreamAlias("Source")
@XStreamConverter(value = XStreamCDataConverter.class)
private String source;
@XStreamAlias("FailReason")
@XStreamConverter(value = XStreamCDataConverter.class)
private String failReason;
@XStreamAlias("Id")
@XStreamConverter(value = XStreamCDataConverter.class)
private String id;
/**
* Instantiates a new Wx cp xml out event message.
*/
public WxCpXmlOutEventMessage() {
this.msgType = WxConsts.XmlMsgType.EVENT;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/media/MediaUploadByUrlReq.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/media/MediaUploadByUrlReq.java | package me.chanjar.weixin.cp.bean.media;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 生成异步上传任务
* @author <a href="https://github.com/imyzt">imyzt</a>
* @date 2025/04/27
*/
@Data
public class MediaUploadByUrlReq {
/**
* 场景值。1-客户联系入群欢迎语素材(目前仅支持1)。 注意:每个场景值有对应的使用范围,详见上面的「使用场景说明」
*/
private Integer scene;
/**
* 媒体文件类型。目前仅支持video-视频,file-普通文件 不超过32字节。
*/
private String type;
/**
* 文件名,标识文件展示的名称。比如,使用该media_id发消息时,展示的文件名由该字段控制。 不超过128字节。
*/
private String filename;
/**
* 文件cdn url。url要求支持Range分块下载 不超过1024字节。 如果为腾讯云cos链接,则需要设置为「公有读」权限。
*/
private String url;
/**
* 文件md5。对比从url下载下来的文件md5是否一致。 不超过32字节。
*/
private String md5;
/**
* From json wx cp base resp.
*
* @param json the json
* @return the wx cp base resp
*/
public static MediaUploadByUrlReq fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, MediaUploadByUrlReq.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/media/MediaUploadByUrlResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/media/MediaUploadByUrlResult.java | package me.chanjar.weixin.cp.bean.media;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* 异步上传企微素材
* @author <a href="https://github.com/imyzt">imyzt</a>
* @date 2025/4/27
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class MediaUploadByUrlResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = 330834334738622341L;
/**
* 任务状态。1-处理中,2-完成,3-异常失败
*/
@SerializedName("status")
private Integer status;
@SerializedName("detail")
private Detail detail;
@Data
public static class Detail {
/**
* 任务失败返回码。当status为3时返回非0,其他返回0
* 830001 url非法 确认url是否支持Range分块下载
* 830003 url下载数据失败 确认url本身是否能正常访问
* 45001 文件大小超过限制 确认文件在5字节~200M范围内
* 301019 文件MD5不匹配 确认url对应的文件内容md5,跟所填的md5参数是否一致
* 注意: status=2时,此处微信并未返回任何值
*/
@SerializedName("errcode")
private Integer errCode;
/**
* 注意: status=2时,此处微信并未返回任何值
*/
@SerializedName("errmsg")
private String errMsg;
/**
* 媒体文件上传后获取的唯一标识,3天内有效。当status为2时返回。
*/
@SerializedName("media_id")
private String mediaId;
/**
* 媒体文件创建的时间戳。当status为2时返回。
*/
@SerializedName("created_at")
private String createdAt;
}
/**
* From json wx cp media upload by url result.
*
* @param json the json
* @return the wx cp media upload by url result
*/
public static MediaUploadByUrlResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, MediaUploadByUrlResult.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardImageTextArea.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardImageTextArea.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* @author chenjie03
* @version 1.0
* @since 2022/11/4 12:12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardImageTextArea implements Serializable {
private Integer type;
private String url;
private String title;
private String desc;
private String imageUrl;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
if (null != this.type) {
btnObject.addProperty("type", this.type);
}
if (StringUtils.isNotBlank(this.url)) {
btnObject.addProperty("url", this.url);
}
if (StringUtils.isNotBlank(this.title)) {
btnObject.addProperty("title", this.title);
}
if (StringUtils.isNotBlank(this.desc)) {
btnObject.addProperty("desc", this.desc);
}
if (StringUtils.isNotBlank(this.imageUrl)) {
btnObject.addProperty("image_url", this.imageUrl);
}
return btnObject;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButtonSelectionOption.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButtonSelectionOption.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* @author chenjie03
* @version 1.0
* @since 2022/11/4 11:57
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardButtonSelectionOption implements Serializable {
private String id;
private String text;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
if (StringUtils.isNotBlank(this.id)) {
btnObject.addProperty("id", this.id);
}
if (StringUtils.isNotBlank(this.text)) {
btnObject.addProperty("text", this.text);
}
return btnObject;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.List;
/**
* 下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MultipleSelect implements Serializable {
private static final long serialVersionUID = 3446092543065698516L;
/**
* 下拉式的选择器题目的key,用户提交选项后,会产生回调事件,回调事件会带上该key值表示该题,最长支持1024字节,不可重复
*/
private String question_key;
/**
* 下拉式的选择器上面的title
*/
private String title;
/**
* 默认选定的id,不填或错填默认第一个
*/
private String selected_id;
/**
* 选项列表,下拉选项不超过 10 个,最少1个
*/
private List<CheckboxOption> options;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject selectJson = new JsonObject();
selectJson.addProperty("question_key", this.getQuestion_key());
if (StringUtils.isNotBlank(this.getTitle())) {
selectJson.addProperty("title", this.getTitle());
}
if (StringUtils.isNotBlank(this.getSelected_id())) {
selectJson.addProperty("selected_id", this.getSelected_id());
}
// select_list
List<CheckboxOption> options = this.getOptions();
if (null != options && !options.isEmpty()) {
JsonArray optionJsonArray = new JsonArray();
for (CheckboxOption option : this.getOptions()) {
JsonObject tempObject = option.toJson();
optionJsonArray.add(tempObject);
}
selectJson.add("option_list", optionJsonArray);
}
return selectJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CheckboxOption implements Serializable {
private static final long serialVersionUID = 5405702239190050250L;
/**
* 选项id,用户提交选项后,会产生回调事件,回调事件会带上该id值表示该选项,最长支持128字节,不可重复
* 必填
*/
private String id;
/**
* 选项文案描述,建议不超过17个字.
* 必填
*/
private String text;
/**
* 该选项是否要默认选中
* 必填
*/
private Boolean is_checked;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject optionJson = new JsonObject();
optionJson.addProperty("id", this.getId());
optionJson.addProperty("text", this.getText());
if (null != this.getIs_checked()) {
optionJson.addProperty("is_checked", this.getIs_checked());
}
return optionJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* 跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardJump implements Serializable {
private static final long serialVersionUID = 4440089247405968074L;
/**
* 跳转链接类型,0或不填代表不是链接,1 代表跳转url,2 代表跳转小程序
*/
private Integer type;
/**
* 跳转链接样式的文案内容,建议不超过18个字
*/
private String title;
/**
* 跳转链接的url,jump_list.type是1时必填
*/
private String url;
/**
* 跳转链接的小程序的appid,必须是与当前应用关联的小程序,jump_list.type是2时必填
*/
private String appid;
/**
* 跳转链接的小程序的pagepath,jump_list.type是2时选填
*/
private String pagepath;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject hContentJson = new JsonObject();
if (null != this.getType()) {
hContentJson.addProperty("type", this.getType());
}
hContentJson.addProperty("title", this.getTitle());
if (StringUtils.isNotBlank(this.getUrl())) {
hContentJson.addProperty("url", this.getUrl());
}
if (StringUtils.isNotBlank(this.getAppid())) {
hContentJson.addProperty("appid", this.getAppid());
}
if (StringUtils.isNotBlank(this.getPagepath())) {
hContentJson.addProperty("pagepath", this.getPagepath());
}
return hContentJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* 卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class VerticalContent implements Serializable {
private static final long serialVersionUID = -1383852553854573558L;
/**
* 卡片二级标题,建议不超过38个字.必填字段
*/
private String title;
/**
* 二级普通文本,建议不超过160个字
*/
private String desc;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject vContentJson = new JsonObject();
vContentJson.addProperty("title", this.getTitle());
if (StringUtils.isNotBlank(this.getDesc())) {
vContentJson.addProperty("desc", this.getDesc());
}
return vContentJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* 引用文献样式
*
* @author zp created on 2022/1/2
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class QuoteArea implements Serializable {
private static final long serialVersionUID = -2209656515382964356L;
/**
* 非必填 引用文献样式区域点击事件,0或不填代表没有点击事件,1 代表跳转url,2 代表跳转小程序
*/
private Integer type;
/**
* 点击跳转的url,quote_area.type是1时必填
*/
private String url;
/**
* 点击跳转的小程序的appid,必须是与当前应用关联的小程序,quote_area.type是2时必填
*/
private String appid;
/**
* 点击跳转的小程序的pagepath,quote_area.type是2时选填
*/
private String pagepath;
/**
* 引用文献样式的标题
*/
private String title;
/**
* 引用文献样式的引用文案
*/
private String quoteText;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject quoteAreaJson = new JsonObject();
if (null != this.getType()) {
quoteAreaJson.addProperty("type", this.getType());
}
if (StringUtils.isNotBlank(this.getUrl())) {
quoteAreaJson.addProperty("url", this.getUrl());
}
if (StringUtils.isNotBlank(this.getAppid())) {
quoteAreaJson.addProperty("appid", this.getAppid());
}
if (StringUtils.isNotBlank(this.getPagepath())) {
quoteAreaJson.addProperty("pagepath", this.getPagepath());
}
if (StringUtils.isNotBlank(this.getTitle())) {
quoteAreaJson.addProperty("title", this.getTitle());
}
if (StringUtils.isNotBlank(this.getQuoteText())) {
quoteAreaJson.addProperty("quote_text", this.getQuoteText());
}
return quoteAreaJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
/**
* 二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HorizontalContent implements Serializable {
private static final long serialVersionUID = -2209656515382964372L;
/**
* 链接类型,0或不填代表不是链接,1 代表跳转url,2 代表下载附件
*/
private Integer type;
/**
* 二级标题,建议不超过5个字
*/
private String keyname;
/**
* 二级文本,如果horizontal_content_list.type是2,该字段代表文件名称(要包含文件类型),建议不超过30个字
*/
private String value;
/**
* 链接跳转的url,horizontal_content_list.type是1时必填
*/
private String url;
/**
* 附件的media_id,horizontal_content_list.type是2时必填
*/
private String media_id;
/**
* 成员详情的userid,horizontal_content_list.type是3时必填
*/
private String userid;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject hContentJson = new JsonObject();
if (null != this.getType()) {
hContentJson.addProperty("type", this.getType());
}
hContentJson.addProperty("keyname", this.getKeyname());
if (StringUtils.isNotBlank(this.getValue())) {
hContentJson.addProperty("value", this.getValue());
}
if (StringUtils.isNotBlank(this.getUrl())) {
hContentJson.addProperty("url", this.getUrl());
}
if (StringUtils.isNotBlank(this.getMedia_id())) {
hContentJson.addProperty("media_id", this.getMedia_id());
}
if (StringUtils.isNotBlank(this.getUserid())) {
hContentJson.addProperty("userid", this.getUserid());
}
return hContentJson;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 卡片右上角更多操作按钮点击后出现的操作列表,列表长度取值范围为 [1, 3]
*
* @author xiaohe created on 2022-03-06
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ActionMenuItem implements Serializable {
private static final long serialVersionUID = 400885585614100693L;
/**
* 操作的描述文案
*/
private String text;
/**
* 按钮key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复
*/
private String key;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
btnObject.addProperty("text", this.getText());
btnObject.addProperty("key", this.getKey());
return btnObject;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButtonSelection.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButtonSelection.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.List;
/**
* @author chenjie03
* @version 1.0
* @since 2022/11/4 11:54
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardButtonSelection implements Serializable {
private String questionKey;
private String title;
private String selectedId;
private List<TemplateCardButtonSelectionOption> optionList;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
if (StringUtils.isNotBlank(this.questionKey)) {
btnObject.addProperty("question_key", this.questionKey);
}
if (StringUtils.isNotBlank(this.title)) {
btnObject.addProperty("title", this.title);
}
if (StringUtils.isNotBlank(this.selectedId)) {
btnObject.addProperty("selected_id", this.selectedId);
}
if (this.optionList != null && !this.optionList.isEmpty()) {
JsonArray optionJsonArray = new JsonArray();
for (TemplateCardButtonSelectionOption jump : this.getOptionList()) {
JsonObject tempObject = jump.toJson();
optionJsonArray.add(tempObject);
}
btnObject.add("option_list", optionJsonArray);
}
return btnObject;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java | package me.chanjar.weixin.cp.bean.templatecard;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
* @author yzts created on 2021/9/22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TemplateCardButton implements Serializable {
private static final long serialVersionUID = -4826551822490837002L;
/**
* 按钮文案,建议不超过10个字
*/
private String text;
/**
* 按钮样式,目前可填1~4,不填或错填默认1
*/
private Integer style;
/**
* 按钮key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复
*/
private String key;
/**
* 按钮点击事件类型,0 或不填代表回调点击事件,1 代表跳转url
*/
private int type;
/**
* 跳转事件的url,button_list.type是1时必填
*/
private String url;
/**
* To json json object.
*
* @return the json object
*/
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
btnObject.addProperty("text", this.getText());
if (null != this.getStyle()) {
btnObject.addProperty("style", this.getStyle());
}
btnObject.addProperty("key", this.getKey());
btnObject.addProperty("type", this.getType());
if (null != this.getUrl()) {
btnObject.addProperty("url", this.getUrl());
}
return btnObject;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java | package me.chanjar.weixin.cp.bean.export;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* 异步导出参数
*
* @author zhongjun created on 2022/4/21
*/
@Data
public class WxCpExportRequest implements Serializable {
private static final long serialVersionUID = -8127528999898984359L;
/**
* base64encode的加密密钥,长度固定为43,base64decode之后即得到AESKey。加密方式采用AES-256-CBC方式,数据采用PKCS#7填充至32字节的倍数;IV初始向量大小为16字节,取AESKey
* 前16字节,详见:<a href="http://tools.ietf.org/html/rfc2315">http://tools.ietf.org/html/rfc2315</a>
*/
@SerializedName("encoding_aeskey")
private String encodingAesKey;
/**
* 每块数据的部门数,支持范围[104,106],默认值为10^6
*/
@SerializedName("block_size")
private Integer blockSize;
/**
* 需要导出的标签
* 导出标签成员时使用
*/
@SerializedName("tagid")
private Integer tagId;
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java | package me.chanjar.weixin.cp.bean.export;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import java.util.List;
/**
* 异步导出响应
*
* @author zhongjun created on 2022/4/21
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpExportResult extends WxCpBaseResp {
private static final long serialVersionUID = -8673839248829238966L;
/**
* 任务状态:0-未处理,1-处理中,2-完成,3-异常失败
*/
private Integer status;
@SerializedName("data_list")
private List<ExportData> dataList;
/**
* The type Export data.
*/
@Data
public static class ExportData {
/**
* 数据下载链接,支持指定Range头部分段下载。有效期2个小时
*/
private String url;
/**
* 密文数据大小
*/
private Integer size;
/**
* 密文数据md5
*/
private String md5;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpDepartment.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpDepartment.java | package me.chanjar.weixin.cp.bean.linkedcorp;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 获取互联企业部门列表
*
* @author libo
*/
@Data
public class WxCpLinkedCorpDepartment implements Serializable {
private static final long serialVersionUID = -210249269343292440L;
@SerializedName("department_id")
private String departmentId;
@SerializedName("department_name")
private String departmentName;
@SerializedName("parentid")
private String parentId;
@SerializedName("order")
private Integer order;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpUser.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpUser.java | package me.chanjar.weixin.cp.bean.linkedcorp;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 获取互联企业成员详细信息
*
* @author libo
*/
@Data
public class WxCpLinkedCorpUser implements Serializable {
private static final long serialVersionUID = -5197865724556226531L;
@SerializedName("userid")
private String userId;
@SerializedName("name")
private String name;
@SerializedName("department")
private String[] department;
@SerializedName("mobile")
private String mobile;
@SerializedName("email")
private String email;
@SerializedName("position")
private String position;
@SerializedName("corpid")
private String corpId;
private final List<Attr> extAttrs = new ArrayList<>();
/**
* The type Attr.
*/
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Attr implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
/**
* 属性类型: 0-文本 1-网页
*/
private Integer type;
private String name;
private String textValue;
private String webUrl;
private String webTitle;
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpAgentPerm.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/linkedcorp/WxCpLinkedCorpAgentPerm.java | package me.chanjar.weixin.cp.bean.linkedcorp;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 获取应用可见范围请求类
*
* @author libo
*/
@Data
public class WxCpLinkedCorpAgentPerm implements Serializable {
private static final long serialVersionUID = 6794613362541093845L;
@SerializedName("userids")
private String[] userIdList;
@SerializedName("department_ids")
private String[] departmentIdList;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorp.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorp.java | package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* @author libo
*/
@NoArgsConstructor
@Data
public class WxCpCorpGroupCorp implements Serializable {
private static final long serialVersionUID = 6842919838272832415L;
@SerializedName("corpid")
private String corpid;
@SerializedName("corp_name")
private String corpName;
@SerializedName("agentid")
private Integer agentid;
public static WxCpCorpGroupCorp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCorpGroupCorp.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpMaTransferSession.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpMaTransferSession.java | package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* 获取下级/下游企业小程序session返回类
*
* @author libo
*/
@Data
public class WxCpMaTransferSession implements Serializable {
private static final long serialVersionUID = 4189407986285166516L;
@SerializedName("userid")
private String userId;
@SerializedName("session_key")
private String sessionKey;
/**
* From json WxCpMaTransferSession.
*
* @param json the json
* @return the WxCpMaTransferSession
*/
public static WxCpMaTransferSession fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMaTransferSession.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpListAppShareInfoResp.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpListAppShareInfoResp.java | package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 获取应用共享信息返回类
* @author libo
*/
@Data
public class WxCpCorpGroupCorpListAppShareInfoResp implements Serializable {
private static final long serialVersionUID = 7165788382879237583L;
@SerializedName("ending")
private int ending;
@SerializedName("corp_list")
private List<WxCpCorpGroupCorp> corpList;
@SerializedName("next_cursor")
private String nextCursor;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java | package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 获取下级/下游企业的access_token
* @author libo
*/
@Data
public class WxCpCorpGroupCorpGetTokenReq implements Serializable {
private static final long serialVersionUID = -1876754768932436524L;
@SerializedName("corpid")
private String corpId;
@SerializedName("business_type")
private int businessType;
@SerializedName("agentid")
private int agentId;
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpToken.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpToken.java | package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* 获取下级/下游企业的access_token返回类
* @author libo
*/
@Data
public class WxCpCorpGroupCorpToken implements Serializable {
private static final long serialVersionUID = -8139617060677460515L;
@SerializedName("access_token")
private String accessToken;
@SerializedName("expires_in")
private int expiresIn;
public static WxCpCorpGroupCorpToken fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCorpGroupCorpToken.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.math.BigInteger;
/**
* 会话存档 文档信息对象
*
* @author Wang_Wong
*/
@Data
public class WxCpFileItem implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("filename")
private String fileName;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("sdkfileid")
private String sdkFileId;
/**
* 共享文件的大小 Uint64类型
*/
@SerializedName("filesize")
private BigInteger fileSize;
/**
* From json wx cp file item.
*
* @param json the json
* @return the wx cp file item
*/
public static WxCpFileItem fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileItem.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 内部群信息
*
* @author Wang_Wong
*/
@Data
public class WxCpGroupChat implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("roomname")
private String roomName;
@SerializedName("creator")
private String creator;
@SerializedName("room_create_time")
private Long roomCreateTime;
@SerializedName("notice")
private String notice;
private List<Member> members;
/**
* The type Member.
*/
@Getter
@Setter
public static class Member implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("memberid")
private String memberId;
@SerializedName("jointime")
private Long joinTime;
/**
* From json member.
*
* @param json the json
* @return the member
*/
public Member fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Member.class);
}
}
/**
* From json wx cp group chat.
*
* @param json the json
* @return the wx cp group chat
*/
public static WxCpGroupChat fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupChat.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 获取会话同意情况请求参数.
*
* @author Wang_Wong created on 2022-01-21
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpCheckAgreeRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("info")
private List<Info> info;
/**
* From json wx cp check agree request.
*
* @param json the json
* @return the wx cp check agree request
*/
public static WxCpCheckAgreeRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCheckAgreeRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* The type Info.
*/
@Getter
@Setter
public static class Info implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("userid")
private String userid;
@SerializedName("exteranalopenid")
private String exteranalOpenId;
/**
* From json info.
*
* @param json the json
* @return the info
*/
public static Info fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Info.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 聊天记录数据内容.
*
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-01-17
*/
@Data
public class WxCpChatDatas implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("errcode")
private Integer errCode;
@SerializedName("errmsg")
private String errMsg;
@SerializedName("sdk")
private Long sdk;
@SerializedName("chatdata")
private List<WxCpChatData> chatData;
/**
* The type Wx cp chat data.
*/
@Getter
@Setter
public static class WxCpChatData implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("seq")
private Long seq;
@SerializedName("msgid")
private String msgId;
@SerializedName("publickey_ver")
private Integer publickeyVer;
@SerializedName("encrypt_random_key")
private String encryptRandomKey;
@SerializedName("encrypt_chat_msg")
private String encryptChatMsg;
/**
* From json wx cp chat data.
*
* @param json the json
* @return the wx cp chat data
*/
public static WxCpChatData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpChatData.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp chat datas.
*
* @param json the json
* @return the wx cp chat datas
*/
public static WxCpChatDatas fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpChatDatas.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 获取会话同意情况返回对象.
*
* @author Wang_Wong
*/
@Data
public class WxCpAgreeInfo implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("errcode")
private Integer errcode;
@SerializedName("errmsg")
private String errmsg;
@SerializedName("agreeinfo")
private List<AgreeInfo> agreeInfo;
/**
* The type Agree info.
*/
@Getter
@Setter
public static class AgreeInfo implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("status_change_time")
private Long statusChangeTime;
@SerializedName("userid")
private String userid;
@SerializedName("exteranalopenid")
private String exteranalOpenId;
@SerializedName("agree_status")
private String agreeStatus;
/**
* From json agree info.
*
* @param json the json
* @return the agree info
*/
public static AgreeInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AgreeInfo.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp agree info.
*
* @param json the json
* @return the wx cp agree info
*/
public static WxCpAgreeInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpAgreeInfo.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java | package me.chanjar.weixin.cp.bean.msgaudit;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;
/**
* 聊天记录数据内容.
*
* @author Wang_Wong
*/
@Data
public class WxCpChatModel implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("msgid")
private String msgId;
@SerializedName("action")
private String action;
@SerializedName("from")
private String from;
@SerializedName("tolist")
private String[] tolist;
@SerializedName("roomid")
private String roomId;
@SerializedName("msgtime")
private Long msgTime;
@SerializedName("msgtype")
private String msgType;
/**
* 文本
*/
@SerializedName("text")
private Text text;
/**
* 图片
*/
@SerializedName("image")
private Image image;
/**
* 撤回消息
*/
@SerializedName("revoke")
private Revoke revoke;
/**
* 同意会话聊天内容
*/
@SerializedName(value = "agree")
private Agree agree;
@SerializedName(value = "disagree")
private Agree disagree;
/**
* 语音
*/
@SerializedName(value = "voice")
private Voice voice;
/**
* 视频
*/
@SerializedName(value = "video")
private Video video;
/**
* 名片
*/
@SerializedName(value = "card")
private Card card;
/**
* 位置
*/
@SerializedName(value = "location")
private Location location;
/**
* 表情
*/
@SerializedName(value = "emotion")
private Emotion emotion;
/**
* 文件
*/
@SerializedName(value = "file")
private File file;
/**
* 链接
*/
@SerializedName(value = "link")
private Link link;
/**
* 小程序消息
*/
@SerializedName(value = "weapp")
private Weapp weapp;
/**
* 会话记录消息
*/
@SerializedName(value = "chatrecord")
private ChatRecord chatRecord;
/**
* 待办消息 官网暂无
*/
/**
* 投票消息 官网暂无
*/
/**
* 填表消息
*/
@SerializedName(value = "collect")
private Collect collect;
/**
* 红包消息
* 互通红包消息
*/
@SerializedName("redpacket")
private Redpacket redPacket;
/**
* 会议邀请消息
*/
@SerializedName("meeting")
private Meeting meeting;
/**
* 切换企业日志
*/
@SerializedName("time")
private Long time;
@SerializedName("user")
private String user;
/**
* 在线文档消息
*/
@SerializedName("doc")
private Doc doc;
@SerializedName("info")
private Info info;
/**
* 日程消息
*/
@SerializedName("calendar")
private Calendar calendar;
/**
* 混合消息
*/
@SerializedName("mixed")
private Mixed mixed;
/**
* 音频存档消息
*/
@SerializedName("voiceid")
private String voiceId;
@SerializedName("meeting_voice_call")
private MeetingVoiceCall meetingVoiceCall;
/**
* 音频共享文档消息
*/
@SerializedName("voipid")
private String voipId;
@SerializedName("voip_doc_share")
private WxCpFileItem voipDocShare;
/**
* 视频号消息
*/
@SerializedName("sphfeed")
private SphFeed sphFeed;
/**
* 音视频通话消息
*/
@SerializedName("voiptext")
private VoipText voipText;
/**
* From json wx cp chat model.
*
* @param json the json
* @return the wx cp chat model
*/
public static WxCpChatModel fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpChatModel.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* The type Text.
*/
@Getter
@Setter
public static class Text implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("content")
private String content;
/**
* From json text.
*
* @param json the json
* @return the text
*/
public static Text fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Text.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Image.
*/
@Getter
@Setter
public static class Image implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("sdkfileid")
private String sdkFileId;
@SerializedName("filesize")
private Long fileSize;
/**
* From json image.
*
* @param json the json
* @return the image
*/
public static Image fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Image.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Revoke.
*/
@Getter
@Setter
public static class Revoke implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("pre_msgid")
private String preMsgId;
/**
* From json revoke.
*
* @param json the json
* @return the revoke
*/
public static Revoke fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Revoke.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Agree.
*/
@Getter
@Setter
public static class Agree implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("userid")
private String userId;
@SerializedName(value = "agree_time")
private Long agreeTime;
@SerializedName(value = "disagree_time")
private Long disagreeTime;
/**
* From json agree.
*
* @param json the json
* @return the agree
*/
public static Agree fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Agree.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Voice.
*/
@Getter
@Setter
public static class Voice implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("sdkfileid")
private String sdkFileId;
@SerializedName("voice_size")
private Long voiceSize;
@SerializedName("play_length")
private Long playLength;
/**
* From json voice.
*
* @param json the json
* @return the voice
*/
public static Voice fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Voice.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Video.
*/
@Getter
@Setter
public static class Video implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("sdkfileid")
private String sdkFileId;
@SerializedName("filesize")
private Long fileSize;
@SerializedName("play_length")
private Long playLength;
/**
* From json video.
*
* @param json the json
* @return the video
*/
public static Video fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Video.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Card.
*/
@Getter
@Setter
public static class Card implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("corpname")
private String corpName;
@SerializedName("userid")
private String userId;
/**
* From json card.
*
* @param json the json
* @return the card
*/
public static Card fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Card.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Location.
*/
@Getter
@Setter
public static class Location implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("longitude")
private Double longitude;
@SerializedName("latitude")
private Double latitude;
@SerializedName("address")
private String address;
@SerializedName("title")
private String title;
@SerializedName("zoom")
private Integer zoom;
/**
* From json location.
*
* @param json the json
* @return the location
*/
public static Location fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Location.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Emotion.
*/
@Getter
@Setter
public static class Emotion implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("type")
private Integer type;
@SerializedName("width")
private Integer width;
@SerializedName("height")
private Integer height;
@SerializedName("title")
private String title;
@SerializedName("imagesize")
private Integer imageSize;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("sdkfileid")
private String sdkFileId;
/**
* From json emotion.
*
* @param json the json
* @return the emotion
*/
public static Emotion fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Emotion.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type File.
*/
@Getter
@Setter
public static class File implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("md5sum")
private String md5Sum;
@SerializedName("filename")
private String fileName;
@SerializedName("fileext")
private String fileExt;
@SerializedName("sdkfileid")
private String sdkFileId;
@SerializedName("filesize")
private Long fileSize;
/**
* From json file.
*
* @param json the json
* @return the file
*/
public static File fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, File.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Link.
*/
@Getter
@Setter
public static class Link implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("title")
private String title;
@SerializedName("description")
private String description;
@SerializedName("link_url")
private String linkUrl;
@SerializedName("image_url")
private String imageUrl;
/**
* From json link.
*
* @param json the json
* @return the link
*/
public static Link fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Link.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 小程序消息
*/
@Getter
@Setter
public static class Weapp implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("title")
private String title;
@SerializedName("description")
private String description;
@SerializedName("username")
private String userName;
@SerializedName("displayname")
private String displayName;
/**
* From json weapp.
*
* @param json the json
* @return the weapp
*/
public static Weapp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Weapp.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 会话记录消息
*/
@Getter
@Setter
public static class ChatRecord implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName(value = "item")
private List<ChatRecordItem> item;
@SerializedName("title")
private String title;
/**
* From json chat record.
*
* @param json the json
* @return the chat record
*/
public static ChatRecord fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ChatRecord.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Chat record item.
*/
@Getter
@Setter
public static class ChatRecordItem implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("type")
private String type;
@SerializedName("msgtime")
private Long msgTime;
@SerializedName("content")
private String content;
@SerializedName("from_chatroom")
private Boolean fromChatRoom;
/**
* From json chat record item.
*
* @param json the json
* @return the chat record item
*/
public static ChatRecordItem fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ChatRecordItem.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 填表消息
*/
@Getter
@Setter
public static class Collect implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("room_name")
private String roomName;
@SerializedName("creator")
private String creator;
@SerializedName("create_time")
private String createTime;
@SerializedName("title")
private String title;
@SerializedName("details")
private List<Details> details;
/**
* From json collect.
*
* @param json the json
* @return the collect
*/
public static Collect fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Collect.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Details.
*/
@Getter
@Setter
public static class Details implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
/**
* 表项id Uint64类型
*/
@SerializedName("id")
private BigInteger id;
@SerializedName("ques")
private String ques;
@SerializedName("type")
private String type;
/**
* From json details.
*
* @param json the json
* @return the details
*/
public static Details fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Details.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 红包消息
*/
@Getter
@Setter
public static class Redpacket implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("type")
private Integer type;
@SerializedName("totalcnt")
private Integer totalCnt;
@SerializedName("totalamount")
private Integer totalAmount;
@SerializedName("wish")
private String wish;
/**
* From json redpacket.
*
* @param json the json
* @return the redpacket
*/
public static Redpacket fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Redpacket.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 会议邀请消息
*/
@Getter
@Setter
public static class Meeting implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("topic")
private String topic;
@SerializedName("starttime")
private Long startTime;
@SerializedName("endtime")
private Long endTime;
@SerializedName("address")
private String address;
@SerializedName("remarks")
private String remarks;
@SerializedName("meetingtype")
private Integer meetingType;
/**
* 会议id Uint64类型
*/
@SerializedName("meetingid")
private BigInteger meetingId;
@SerializedName("status")
private Integer status;
/**
* From json meeting.
*
* @param json the json
* @return the meeting
*/
public static Meeting fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Meeting.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 在线文档消息
*/
@Getter
@Setter
public static class Doc implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("title")
private String title;
@SerializedName("doc_creator")
private String docCreator;
@SerializedName("link_url")
private String linkUrl;
/**
* From json doc.
*
* @param json the json
* @return the doc
*/
public static Doc fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Doc.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* MarkDown格式消息
*/
@Getter
@Setter
public static class Info implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("content")
private String content;
@SerializedName("item")
private List<NewsItem> newsItem;
/**
* From json info.
*
* @param json the json
* @return the info
*/
public static Info fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Info.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 图文消息
*/
@Getter
@Setter
public static class NewsItem implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("title")
private String title;
@SerializedName("description")
private String description;
@SerializedName("url")
private String url;
@SerializedName("picurl")
private String picUrl;
/**
* From json news item.
*
* @param json the json
* @return the news item
*/
public static NewsItem fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, NewsItem.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 日程消息
*/
@Getter
@Setter
public static class Calendar implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("title")
private String title;
@SerializedName("creatorname")
private String creatorName;
@SerializedName("attendeename")
private String[] attendeeName;
@SerializedName("starttime")
private Long startTime;
@SerializedName("endtime")
private Long endTime;
@SerializedName("place")
private String place;
@SerializedName("remarks")
private String remarks;
/**
* From json calendar.
*
* @param json the json
* @return the calendar
*/
public static Calendar fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Calendar.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 混合消息
*/
@Getter
@Setter
public static class Mixed implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("item")
private List<Item> item;
/**
* The type Item.
*/
@Getter
@Setter
public static class Item implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("type")
private String type;
@SerializedName("content")
private String content;
}
}
/**
* 音频存档消息
*/
@Getter
@Setter
public static class MeetingVoiceCall implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("endtime")
private Long endTime;
@SerializedName("sdkfileid")
private String sdkFileId;
@SerializedName("demofiledata")
private List<DemoFileData> demoFileData;
@SerializedName("sharescreendata")
private List<ShareScreenData> shareScreenData;
/**
* From json meeting voice call.
*
* @param json the json
* @return the meeting voice call
*/
public static MeetingVoiceCall fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, MeetingVoiceCall.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
/**
* The type Demo file data.
*/
@Getter
@Setter
public static class DemoFileData implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("filename")
private String fileName;
@SerializedName("demooperator")
private String demoOperator;
@SerializedName("starttime")
private Long startTime;
@SerializedName("endtime")
private Long endTime;
/**
* From json demo file data.
*
* @param json the json
* @return the demo file data
*/
public static DemoFileData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, DemoFileData.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Share screen data.
*/
@Getter
@Setter
public static class ShareScreenData implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("share")
private String share;
@SerializedName("starttime")
private Long startTime;
@SerializedName("endtime")
private Long endTime;
/**
* From json share screen data.
*
* @param json the json
* @return the share screen data
*/
public static ShareScreenData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ShareScreenData.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
}
/**
* 视频号消息
*/
@Getter
@Setter
public static class SphFeed implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("feed_type")
private Integer feedType;
@SerializedName("sph_name")
private String sphName;
@SerializedName("feed_desc")
private String feedDesc;
/**
* From json sph feed.
*
* @param json the json
* @return the sph feed
*/
public static SphFeed fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, SphFeed.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* 音视频通话消息
*/
@Getter
@Setter
public static class VoipText implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("callduration")
private Integer callDuration;
@SerializedName("invitetype")
private Integer inviteType;
/**
* From json voip text.
*
* @param json the json
* @return the voip text
*/
public static VoipText fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, VoipText.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java | package me.chanjar.weixin.cp.bean.school;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* 获取订单详情.
*
* @author Wang_Wong
*/
@Data
public class WxCpTrade extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625142879581L;
/**
* 微信交易单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 交易时间
*/
@SerializedName("pay_time")
private Long payTime;
/**
* From json wx cp trade.
*
* @param json the json
* @return the wx cp trade
*/
public static WxCpTrade fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTrade.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpSchoolUnwatchStat extends WxCpBaseResp {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("ending")
private Integer ending;
@SerializedName("next_key")
private String nextKey;
@SerializedName("stat_info")
private StatInfo statInfo;
/**
* The type Stat info.
*/
@Getter
@Setter
public static class StatInfo implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("students")
private List<Student> students;
}
/**
* The type Student.
*/
@Getter
@Setter
public static class Student implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("partyids")
private List<Integer> partyIds;
}
/**
* From json wx cp school unwatch stat.
*
* @param json the json
* @return the wx cp school unwatch stat
*/
public static WxCpSchoolUnwatchStat fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSchoolUnwatchStat.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpResultList extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625142879581L;
@SerializedName("result_list")
private List<QrCodeList> qrCodeList;
/**
* The type Qr code list.
*/
@Setter
@Getter
public static class QrCodeList extends WxCpBaseResp {
@SerializedName("userid")
private String userId;
@SerializedName("qrcode_data")
private String qrCodeData;
/**
* From json qr code list.
*
* @param json the json
* @return the qr code list
*/
public static QrCodeList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, QrCodeList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp result list.
*
* @param json the json
* @return the wx cp result list
*/
public static WxCpResultList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpResultList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpPaymentResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625142879581L;
@SerializedName("project_name")
private String projectName;
@SerializedName("amount")
private Integer amount;
@SerializedName("payment_result")
private List<PaymentResult> paymentResult;
/**
* The type Payment result.
*/
@Setter
@Getter
public static class PaymentResult {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("trade_no")
private String tradeNo;
@SerializedName("payer_parent_userid")
private String payerParentUserId;
@SerializedName("trade_state")
private Integer tradeState;
/**
* From json payment result.
*
* @param json the json
* @return the payment result
*/
public static PaymentResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, PaymentResult.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp payment result.
*
* @param json the json
* @return the wx cp payment result
*/
public static WxCpPaymentResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpPaymentResult.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpCustomizeHealthInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpCustomizeHealthInfo.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpCustomizeHealthInfo extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625142879581L;
@SerializedName("health_infos")
private List<HealthInfo> healthInfos;
@SerializedName("template_id")
private String templateId;
@SerializedName("next_key")
private String nextKey;
@SerializedName("ending")
private Integer ending;
/**
* The type Health info.
*/
@Getter
@Setter
public static class HealthInfo implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("userid")
private String userId;
@SerializedName("health_qrcode_status")
private Integer healthQrCodeStatus;
@SerializedName("self_submit")
private Integer selfSubmit;
@SerializedName("report_values")
private List<ReportValue> reportValues;
@SerializedName("question_templates")
private List<QuestionTemplate> questionTemplates;
/**
* From json health info.
*
* @param json the json
* @return the health info
*/
public static HealthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, HealthInfo.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Report value.
*/
@Getter
@Setter
public static class ReportValue implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("question_id")
private Integer questionId;
@SerializedName("single_chose")
private Integer singleChose;
@SerializedName("text")
private String text;
/**
* From json report value.
*
* @param json the json
* @return the report value
*/
public static ReportValue fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ReportValue.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Question template.
*/
@Getter
@Setter
public static class QuestionTemplate implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("question_id")
private Integer questionId;
@SerializedName("question_type")
private Integer questionType;
@SerializedName("title")
private String title;
@SerializedName("is_must_fill")
private Integer isMustFill;
@SerializedName("is_not_display")
private Integer isNotDisplay;
@SerializedName("option_list")
private List<OptionList> optionList;
/**
* From json question template.
*
* @param json the json
* @return the question template
*/
public static QuestionTemplate fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, QuestionTemplate.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Option list.
*/
@Getter
@Setter
public static class OptionList implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("option_id")
private Integer optionId;
@SerializedName("option_text")
private String optionText;
/**
* From json option list.
*
* @param json the json
* @return the option list
*/
public static OptionList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, OptionList.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp customize health info.
*
* @param json the json
* @return the wx cp customize health info
*/
public static WxCpCustomizeHealthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCustomizeHealthInfo.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpSchoolLivingInfo extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("living_info")
private LivingInfo livingInfo;
/**
* The type Living info.
*/
@Getter
@Setter
public static class LivingInfo implements Serializable {
@SerializedName("theme")
private String theme;
@SerializedName("living_start")
private Long livingStart;
@SerializedName("living_duration")
private Long livingDuration;
@SerializedName("anchor_userid")
private String anchorUserId;
@SerializedName("living_range")
private LivingRange livingRange;
@SerializedName("viewer_num")
private Integer viewerNum;
@SerializedName("comment_num")
private Integer commentNum;
@SerializedName("open_replay")
private Integer openReplay;
@SerializedName("push_stream_url")
private String pushStreamUrl;
/**
* From json living info.
*
* @param json the json
* @return the living info
*/
public static LivingInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, LivingInfo.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Living range.
*/
@Getter
@Setter
public static class LivingRange implements Serializable {
@SerializedName("partyids")
private List<Integer> partyIds;
@SerializedName("group_names")
private List<String> groupNames;
/**
* From json living range.
*
* @param json the json
* @return the living range
*/
public static LivingRange fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, LivingRange.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp school living info.
*
* @param json the json
* @return the wx cp school living info
*/
public static WxCpSchoolLivingInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSchoolLivingInfo.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java | package me.chanjar.weixin.cp.bean.school;
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 WxCpSchoolWatchStat extends WxCpBaseResp {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("ending")
private Integer ending;
@SerializedName("next_key")
private String nextKey;
@SerializedName("stat_infoes")
private StatInfo statInfoes;
/**
* The type Stat info.
*/
@Getter
@Setter
public static class StatInfo implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("students")
private List<Student> students;
@SerializedName("visitors")
private List<Visitor> visitors;
}
/**
* The type Student.
*/
@Getter
@Setter
public static class Student implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("watch_time")
private Integer watchTime;
@SerializedName("is_comment")
private Integer isComment;
@SerializedName("enter_time")
private Long enterTime;
@SerializedName("leave_time")
private Long leaveTime;
@SerializedName("partyids")
private List<Integer> partyIds;
}
/**
* The type Visitor.
*/
@Getter
@Setter
public static class Visitor implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("nickname")
private String nickname;
@SerializedName("watch_time")
private Integer watchTime;
@SerializedName("is_comment")
private Integer isComment;
@SerializedName("enter_time")
private Long enterTime;
@SerializedName("leave_time")
private Long leaveTime;
}
/**
* From json wx cp school watch stat.
*
* @param json the json
* @return the wx cp school watch stat
*/
public static WxCpSchoolWatchStat fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSchoolWatchStat.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 创建家长请求.
*
* @author Wang_Wong created on 2022-06-20
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpCreateParentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("mobile")
private String mobile;
@SerializedName("to_invite")
private Boolean toInvite;
@SerializedName("children")
private List<Children> children;
/**
* The type Children.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp create parent request.
*
* @param json the json
* @return the wx cp create parent request
*/
public static WxCpCreateParentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCreateParentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java | 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 WxCpDepartmentList extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("departments")
private List<Department> departments;
/**
* The type Department.
*/
@Setter
@Getter
public static class Department implements Serializable {
@SerializedName("parentid")
private Integer parentId;
@SerializedName("name")
private String name;
@SerializedName("id")
private Integer id;
@SerializedName("type")
private Integer type;
@SerializedName("register_year")
private Integer registerYear;
@SerializedName("standard_grade")
private Integer standardGrade;
@SerializedName("order")
private Integer order;
@SerializedName("is_graduated")
private Integer isGraduated;
@SerializedName("open_group_chat")
private Integer openGroupChat;
@SerializedName("group_chat_id")
private String groupChatId;
@SerializedName("department_admins")
private List<DepartmentAdmin> departmentAdmins;
/**
* From json department.
*
* @param json the json
* @return the department
*/
public static Department fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Department.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Department admin.
*/
@Setter
@Getter
public static class DepartmentAdmin implements Serializable {
@SerializedName("userid")
private String userId;
@SerializedName("type")
private Integer type;
@SerializedName("subject")
private String subject;
/**
* From json department admin.
*
* @param json the json
* @return the department admin
*/
public static DepartmentAdmin fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, DepartmentAdmin.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp department list.
*
* @param json the json
* @return the wx cp department list
*/
public static WxCpDepartmentList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpDepartmentList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
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 created on 2022-07-13
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpUserResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("student")
private Student student;
@SerializedName("parent")
private Parent parent;
@SerializedName("user_type")
private Integer userType;
/**
* The type Parent.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Parent implements Serializable {
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("relation")
private String relation;
@SerializedName("mobile")
private String mobile;
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("is_subscribe")
private Integer isSubscribe;
@SerializedName("children")
private List<Children> children;
/**
* From json parent.
*
* @param json the json
* @return the parent
*/
public static Parent fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Parent.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Student.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Student implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("department")
private List<Integer> department;
@SerializedName("parents")
private List<Parent> parents;
@SerializedName("name")
private String name;
/**
* From json student.
*
* @param json the json
* @return the student
*/
public static Student fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Student.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Children.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp user result.
*
* @param json the json
* @return the wx cp user result
*/
public static WxCpUserResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserResult.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 批量更新家长.
*
* @author Wang_Wong created on 2022-07-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpBatchUpdateParentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("parents")
private List<Parent> parents;
/**
* The type Parent.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Parent implements Serializable {
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("new_parent_userid")
private String newParentUserId;
@SerializedName("mobile")
private String mobile;
@SerializedName("children")
private List<Children> children;
/**
* From json parent.
*
* @param json the json
* @return the parent
*/
public static Parent fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Parent.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Children.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp batch update parent request.
*
* @param json the json
* @return the wx cp batch update parent request
*/
public static WxCpBatchUpdateParentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchUpdateParentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 批量创建家长.
*
* @author Wang_Wong created on 2022-07-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpBatchCreateParentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("parents")
private List<Parent> parents;
/**
* The type Parent.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Parent implements Serializable {
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("mobile")
private String mobile;
@SerializedName("to_invite")
private Boolean toInvite;
@SerializedName("children")
private List<Children> children;
/**
* From json parent.
*
* @param json the json
* @return the parent
*/
public static Parent fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Parent.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Children.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp batch create parent request.
*
* @param json the json
* @return the wx cp batch create parent request
*/
public static WxCpBatchCreateParentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchCreateParentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java | 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;
/**
* The type Allow scope.
*/
@Setter
@Getter
public static class AllowScope implements Serializable {
@SerializedName("students")
private List<Student> students;
@SerializedName("departments")
private Department departments;
/**
* From json allow scope.
*
* @param json the json
* @return the allow scope
*/
public static AllowScope fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AllowScope.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Department.
*/
@Setter
@Getter
public static class Department implements Serializable {
@SerializedName("partyid")
private List<Integer> partyId;
/**
* From json department.
*
* @param json the json
* @return the department
*/
public static Department fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Department.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Student.
*/
@Setter
@Getter
public static class Student implements Serializable {
@SerializedName("userid")
private String userId;
}
/**
* From json wx cp allow scope.
*
* @param json the json
* @return the wx cp allow scope
*/
public static WxCpAllowScope fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpAllowScope.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 更新家长请求.
*
* @author Wang_Wong created on 2022-06-20
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpUpdateParentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("mobile")
private String mobile;
@SerializedName("new_parent_userid")
private String newParentUserId;
@SerializedName("children")
private List<Children> children;
/**
* The type Children.
*/
@Setter
@Getter
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp update parent request.
*
* @param json the json
* @return the wx cp update parent request
*/
public static WxCpUpdateParentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUpdateParentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 更新部门请求.
*
* @author Wang_Wong created on 2022-06-22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpUpdateDepartmentRequest implements Serializable {
private static final long serialVersionUID = -4960239394895754138L;
@SerializedName("parentid")
private Integer parentId;
@SerializedName("name")
private String name;
@SerializedName("id")
private Integer id;
@SerializedName("new_id")
private Integer newId;
@SerializedName("type")
private Integer type;
@SerializedName("register_year")
private Integer registerYear;
@SerializedName("standard_grade")
private Integer standardGrade;
@SerializedName("order")
private Integer order;
@SerializedName("department_admins")
private List<DepartmentAdmin> departmentAdmins;
/**
* The type Department admin.
*/
@Setter
@Getter
public static class DepartmentAdmin implements Serializable {
@SerializedName("userid")
private String userId;
@SerializedName("op")
private Integer op;
@SerializedName("type")
private Integer type;
@SerializedName("subject")
private String subject;
/**
* From json department admin.
*
* @param json the json
* @return the department admin
*/
public static DepartmentAdmin fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, DepartmentAdmin.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp update department request.
*
* @param json the json
* @return the wx cp update department request
*/
public static WxCpUpdateDepartmentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUpdateDepartmentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 批量删除学生请求.
*
* @author Wang_Wong created on 2022-07-01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpBatchDeleteStudentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("useridlist")
private List<String> userIdList;
/**
* From json wx cp batch delete student request.
*
* @param json the json
* @return the wx cp batch delete student request
*/
public static WxCpBatchDeleteStudentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchDeleteStudentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
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 created on 2022-07-13
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpListParentResult extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("parents")
private List<Parent> parents;
/**
* The type Parent.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Parent implements Serializable {
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("mobile")
private String mobile;
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("is_subscribe")
private Integer isSubscribe;
@SerializedName("children")
private List<Children> children;
/**
* From json parent.
*
* @param json the json
* @return the parent
*/
public static Parent fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Parent.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Children.
*/
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Children implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("relation")
private String relation;
@SerializedName("name")
private String name;
/**
* From json children.
*
* @param json the json
* @return the children
*/
public static Children fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Children.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp list parent result.
*
* @param json the json
* @return the wx cp list parent result
*/
public static WxCpListParentResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpListParentResult.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java | 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;
/**
* 获取外部联系人详情
* https://developer.work.weixin.qq.com/document/path/91670
*
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on : 2022/6/27 9:10
*/
@Data
public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = 4311777322534499260L;
@SerializedName("external_contact")
private ExternalContact externalContact;
@SerializedName("follow_user")
private List<WxCpFollowUser> followedUsers;
/**
* The type Wx cp follow user.
*/
@Getter
@Setter
public static class WxCpFollowUser implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
@SerializedName("userid")
private String userId;
private String remark;
private String description;
@SerializedName("createtime")
private Long createTime;
private String state;
@SerializedName("remark_mobiles")
private String[] remarkMobiles;
@SerializedName("remark_corp_name")
private String remarkCorpName;
private Tag[] tags;
/**
* From json wx cp follow user.
*
* @param json the json
* @return the wx cp follow user
*/
public static WxCpFollowUser fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFollowUser.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Tag.
*/
@Getter
@Setter
public static class Tag implements Serializable {
private static final long serialVersionUID = -7556237053703295482L;
/**
* 该成员添加此外部联系人所打标签的分组名称(标签功能需要企业微信升级到2.7.5及以上版本)
*/
@SerializedName("group_name")
private String groupName;
/**
* 该成员添加此外部联系人所打标签名称
*/
@SerializedName("tag_name")
private String tagName;
/**
* 该成员添加此外部联系人所打标签类型, 1-企业设置, 2-用户自定义
*/
private int type;
/**
* From json tag.
*
* @param json the json
* @return the tag
*/
public static Tag fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Tag.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type External contact.
*/
@Getter
@Setter
public static class ExternalContact implements Serializable {
private static final long serialVersionUID = -1049085217436072418L;
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("position")
private String position;
@SerializedName("name")
private String name;
@SerializedName("avatar")
private String avatar;
@SerializedName("corp_name")
private String corpName;
@SerializedName("corp_full_name")
private String corpFullName;
@SerializedName("type")
private Integer type;
@SerializedName("gender")
private Integer gender;
@SerializedName("unionid")
private String unionId;
@SerializedName("is_subscribe")
private Integer isSubscribe;
@SerializedName("subscriber_info")
private SubscriberInfo subscriberInfo;
@SerializedName("external_profile")
private ExternalProfile externalProfile;
/**
* From json external contact.
*
* @param json the json
* @return the external contact
*/
public static ExternalContact fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ExternalContact.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Subscriber info.
*/
@Getter
@Setter
public static class SubscriberInfo implements Serializable {
private static final long serialVersionUID = -2899906589789022765L;
@SerializedName("tag_id")
private List<String> tagId;
@SerializedName("remark_mobiles")
private List<String> remarkMobiles;
@SerializedName("remark")
private String remark;
/**
* From json subscriber info.
*
* @param json the json
* @return the subscriber info
*/
public static SubscriberInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, SubscriberInfo.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type External profile.
*/
@Getter
@Setter
public static class ExternalProfile implements Serializable {
private static final long serialVersionUID = -2899906589789022765L;
@SerializedName("external_attr")
private List<ExternalAttribute> externalAttrs;
}
/**
* The type External attribute.
*/
@Getter
@Setter
public static class ExternalAttribute implements Serializable {
private static final long serialVersionUID = -1262278808286421085L;
private int type;
private String name;
private Text text;
private Web web;
@SerializedName("miniprogram")
private MiniProgram miniProgram;
/**
* From json external attribute.
*
* @param json the json
* @return the external attribute
*/
public static ExternalAttribute fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ExternalAttribute.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* The type Text.
*/
@Getter
@Setter
public static class Text implements Serializable {
private static final long serialVersionUID = -8161579335600269094L;
private String value;
}
/**
* The type Web.
*/
@Getter
@Setter
public static class Web implements Serializable {
private static final long serialVersionUID = 3664557135411521862L;
private String title;
private String url;
}
/**
* The type Mini program.
*/
@Getter
@Setter
public static class MiniProgram implements Serializable {
private static final long serialVersionUID = -5329210594501835796L;
@SerializedName("pagepath")
private String pagePath;
private String appid;
private String title;
}
/**
* From json wx cp external contact.
*
* @param json the json
* @return the wx cp external contact
*/
public static WxCpExternalContact fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpExternalContact.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 创建部门请求.
*
* @author Wang_Wong created on 2022-06-22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpCreateDepartmentRequest implements Serializable {
private static final long serialVersionUID = -4960239394895754138L;
@SerializedName("parentid")
private Integer parentId;
@SerializedName("name")
private String name;
@SerializedName("id")
private Integer id;
@SerializedName("type")
private Integer type;
@SerializedName("register_year")
private Integer registerYear;
@SerializedName("standard_grade")
private Integer standardGrade;
@SerializedName("order")
private Integer order;
@SerializedName("department_admins")
private List<DepartmentAdmin> departmentAdmins;
/**
* The type Department admin.
*/
@Setter
@Getter
public static class DepartmentAdmin implements Serializable {
@SerializedName("userid")
private String userId;
@SerializedName("type")
private Integer type;
@SerializedName("subject")
private String subject;
/**
* From json department admin.
*
* @param json the json
* @return the department admin
*/
public static DepartmentAdmin fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, DepartmentAdmin.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp create department request.
*
* @param json the json
* @return the wx cp create department request
*/
public static WxCpCreateDepartmentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCreateDepartmentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java | package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 批量创建学生请求.
*
* @author Wang_Wong created on 2022-07-01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxCpBatchCreateStudentRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
@SerializedName("students")
private List<Student> students;
/**
* The type Student.
*/
@Setter
@Getter
public static class Student implements Serializable {
@SerializedName("student_userid")
private String studentUserId;
@SerializedName("name")
private String name;
@SerializedName("department")
private List<Integer> department;
/**
* From json student.
*
* @param json the json
* @return the student
*/
public static Student fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Student.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp batch create student request.
*
* @param json the json
* @return the wx cp batch create student request
*/
public static WxCpBatchCreateStudentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchCreateStudentRequest.class);
}
/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
binarywang/WxJava | https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java | weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java | 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 created on 2022-07-01
*/
@Data
public class WxCpBatchResultList extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("result_list")
private List<ResultList> resultList;
/**
* The type Result list.
*/
@Setter
@Getter
public static class ResultList extends WxCpBaseResp {
@SerializedName("parent_userid")
private String parentUserId;
@SerializedName("student_userid")
private String studentUserId;
/**
* From json result list.
*
* @param json the json
* @return the result list
*/
public static ResultList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ResultList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
/**
* From json wx cp batch result list.
*
* @param json the json
* @return the wx cp batch result list
*/
public static WxCpBatchResultList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchResultList.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
| java | Apache-2.0 | 84b5c4d2d0774f800237634e5d0336f53c004fe3 | 2026-01-04T14:46:39.499027Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.