* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_unassigned_list?access_token=ACCESS_TOKEN
*
- * @param pageId 分页查询,要查询页号,从0开始
- * @param cursor 分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回
+ * @param pageId 分页查询,要查询页号,从0开始
+ * @param cursor 分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回
* @param pageSize 每次返回的最大记录数,默认为1000,最大值为1000
- * @return
- * @throws WxErrorException
+ * @return wx cp user external unassign list
+ * @throws WxErrorException the wx error exception
*/
WxCpUserExternalUnassignList listUnassignedList(Integer pageId, String cursor, Integer pageSize) throws WxErrorException;
@@ -463,10 +469,11 @@ public interface WxCpExternalContactService {
* @param handOverUserid 原添加成员的userid
* @param takeOverUserid 接替成员的userid
* @param cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;
- * @return 客户转接接口实体
+ * @return 客户转接接口实体 wx cp user transfer result resp
* @throws WxErrorException the wx error exception
*/
- WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException;
+ WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
+ String cursor) throws WxErrorException;
/**
* 企业可通过此接口,分配离职成员的客户给其他成员。
@@ -503,10 +510,11 @@ public interface WxCpExternalContactService {
* @param handOverUserid 原添加成员的userid
* @param takeOverUserid 接替成员的userid
* @param cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;
- * @return 客户转接接口实体
+ * @return 客户转接接口实体 wx cp user transfer result resp
* @throws WxErrorException the wx error exception
*/
- WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException;
+ WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
+ String cursor) throws WxErrorException;
/**
*
getPermitUserList(Integer type) throws WxErrorException;
@@ -91,8 +93,8 @@ public interface WxCpMsgAuditService {
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/msgaudit/groupchat/get?access_token=ACCESS_TOKEN
*
* @param roomid 待查询的群id
- * @return
- * @throws WxErrorException
+ * @return group chat
+ * @throws WxErrorException the wx error exception
*/
WxCpGroupChat getGroupChat(@NonNull String roomid) throws WxErrorException;
@@ -105,8 +107,8 @@ public interface WxCpMsgAuditService {
* 请求方式:POST(HTTPS)
*
* @param checkAgreeRequest 待查询的会话信息
- * @return
- * @throws WxErrorException
+ * @return wx cp agree info
+ * @throws WxErrorException the wx error exception
*/
WxCpAgreeInfo checkSingleAgree(@NonNull WxCpCheckAgreeRequest checkAgreeRequest) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
index f524ac94b..a2c47437b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
@@ -22,7 +22,7 @@ public interface WxCpOAuth2Service {
*
*
* @param state 状态码
- * @return url
+ * @return url string
*/
String buildAuthorizationUrl(String state);
@@ -34,7 +34,7 @@ public interface WxCpOAuth2Service {
*
* @param redirectUri 跳转链接地址
* @param state 状态码
- * @return url
+ * @return url string
*/
String buildAuthorizationUrl(String redirectUri, String state);
@@ -47,7 +47,7 @@ public interface WxCpOAuth2Service {
* @param redirectUri 跳转链接地址
* @param state 状态码
* @param scope 取值参考me.chanjar.weixin.common.api.WxConsts.OAuth2Scope类
- * @return url
+ * @return url string
*/
String buildAuthorizationUrl(String redirectUri, String state, String scope);
@@ -61,9 +61,9 @@ public interface WxCpOAuth2Service {
*
*
* @param code 微信oauth授权返回的代码
- * @return WxCpOauth2UserInfo
+ * @return WxCpOauth2UserInfo user info
* @throws WxErrorException 异常
- * @see #getUserInfo(Integer, String)
+ * @see #getUserInfo(Integer, String) #getUserInfo(Integer, String)
*/
WxCpOauth2UserInfo getUserInfo(String code) throws WxErrorException;
@@ -80,9 +80,9 @@ public interface WxCpOAuth2Service {
*
* @param agentId 企业号应用的id
* @param code 通过成员授权获取到的code,最大为512字节。每次成员授权带上的code将不一样,code只能使用一次,5分钟未被使用自动过期。
- * @return WxCpOauth2UserInfo
+ * @return WxCpOauth2UserInfo user info
* @throws WxErrorException 异常
- * @see #getUserInfo(String)
+ * @see #getUserInfo(String) #getUserInfo(String)
*/
WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException;
@@ -93,9 +93,9 @@ public interface WxCpOAuth2Service {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
*
- * @param code
- * @return
- * @throws WxErrorException
+ * @param code the code
+ * @return school user info
+ * @throws WxErrorException the wx error exception
*/
WxCpOauth2UserInfo getSchoolUserInfo(String code) throws WxErrorException;
@@ -112,7 +112,7 @@ public interface WxCpOAuth2Service {
*
*
* @param userTicket 成员票据
- * @return WxCpUserDetail
+ * @return WxCpUserDetail user detail
* @throws WxErrorException 异常
*/
WxCpUserDetail getUserDetail(String userTicket) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaAgentService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaAgentService.java
index 61b704460..6b8b98877 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaAgentService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaAgentService.java
@@ -8,21 +8,20 @@ import me.chanjar.weixin.cp.bean.oa.selfagent.WxCpOpenApprovalData;
* 企业微信自建应用接口.
* https://developer.work.weixin.qq.com/document/path/90269
*
- * @author Wang_Wong
- * created on 2022-04-06
+ * @author Wang_Wong created on 2022-04-06
*/
public interface WxCpOaAgentService {
/**
* 查询第三方应用审批申请当前状态
* 开发者也可主动查询审批单的当前审批状态。
- *
+ *
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/corp/getopenapprovaldata?access_token=ACCESS_TOKEN
*
- * @param thirdNo
- * @return
- * @throws WxErrorException
+ * @param thirdNo the third no
+ * @return open approval data
+ * @throws WxErrorException the wx error exception
*/
WxCpOpenApprovalData getOpenApprovalData(@NonNull String thirdNo) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaCalendarService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaCalendarService.java
index fe419f15f..50d5e8d94 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaCalendarService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaCalendarService.java
@@ -8,8 +8,7 @@ import java.util.List;
/**
* 企业微信日历接口.
*
- * @author Binary Wang
- * created on 2020-09-20
+ * @author Binary Wang created on 2020-09-20
*/
public interface WxCpOaCalendarService {
/**
@@ -24,7 +23,7 @@ public interface WxCpOaCalendarService {
*
*
* @param calendar 日历对象
- * @return 日历ID
+ * @return 日历ID string
* @throws WxErrorException .
*/
String add(WxCpOaCalendar calendar) throws WxErrorException;
@@ -60,7 +59,7 @@ public interface WxCpOaCalendarService {
*
*
* @param calIds 日历id列表
- * @return 日历对象列表
+ * @return 日历对象列表 list
* @throws WxErrorException .
*/
List get(List calIds) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaMeetingRoomService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaMeetingRoomService.java
index 13013c2dc..94535fe1d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaMeetingRoomService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaMeetingRoomService.java
@@ -8,8 +8,7 @@ import java.util.List;
/**
* 企业微信会议室接口.
*
- * @author lm93129
- * created on 2022年8月12日22:33:36
+ * @author lm93129 created on 2022年8月12日22:33:36
*/
public interface WxCpOaMeetingRoomService {
/**
@@ -23,7 +22,7 @@ public interface WxCpOaMeetingRoomService {
*
*
* @param meetingRoom 会议室对象
- * @return 会议室ID
+ * @return 会议室ID string
* @throws WxErrorException .
*/
String addMeetingRoom(WxCpOaMeetingRoom meetingRoom) throws WxErrorException;
@@ -39,7 +38,7 @@ public interface WxCpOaMeetingRoomService {
*
*
* @param meetingRoomRequest 会议室查询对象
- * @return 会议室ID
+ * @return 会议室ID list
* @throws WxErrorException .
*/
List listMeetingRoom(WxCpOaMeetingRoom meetingRoomRequest) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaScheduleService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaScheduleService.java
index 7dcca682b..70c108a05 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaScheduleService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaScheduleService.java
@@ -9,8 +9,7 @@ import java.util.List;
* 企业微信日程接口.
* 官方文档:https://work.weixin.qq.com/api/doc/90000/90135/93648
*
- * @author Binary Wang
- * created on 2020 -12-25
+ * @author Binary Wang created on 2020 -12-25
*/
public interface WxCpOaScheduleService {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaService.java
index 756df126f..ff60b352d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaService.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 企业微信OA相关接口.
*
- * @author Element & Wang_Wong
- * created on 2019-04-06 10:52
+ * @author Element & Wang_Wong created on 2019-04-06 10:52
*/
public interface WxCpOaService {
@@ -68,7 +67,7 @@ public interface WxCpOaService {
* API doc : https://work.weixin.qq.com/api/doc/90000/90135/93384
*
*
- * @return 打卡规则列表
+ * @return 打卡规则列表 crop checkin option
* @throws WxErrorException the wx error exception
*/
List getCropCheckinOption() throws WxErrorException;
@@ -104,7 +103,8 @@ public interface WxCpOaService {
* @param endTime 结束时间
* @return WxCpApprovalInfo approval info
* @throws WxErrorException .
- * @see me.chanjar.weixin.cp.api.WxCpOaService#getApprovalInfo me.chanjar.weixin.cp.api.WxCpOaService#getApprovalInfo
+ * @see me.chanjar.weixin.cp.api.WxCpOaService#getApprovalInfo me.chanjar.weixin.cp.api
+ * .WxCpOaService#getApprovalInfome.chanjar.weixin.cp.api.WxCpOaService#getApprovalInfo
*/
WxCpApprovalInfo getApprovalInfo(@NonNull Date startTime, @NonNull Date endTime) throws WxErrorException;
@@ -129,12 +129,12 @@ public interface WxCpOaService {
* 获取企业假期管理配置
* 企业可通过审批应用或自建应用Secret调用本接口,获取可见范围内员工的“假期管理”配置,包括:各个假期的id、名称、请假单位、时长计算方式、发放规则等。
* 第三方应用可获取应用可见范围内员工的“假期管理”配置,包括:各个假期的id、名称、请假单位、时长计算方式、发放规则等。
- *
+ *
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/oa/vacation/getcorpconf?access_token=ACCESS_TOKEN
*
- * @return
- * @throws WxErrorException
+ * @return corp conf
+ * @throws WxErrorException the wx error exception
*/
WxCpCorpConfInfo getCorpConf() throws WxErrorException;
@@ -143,13 +143,13 @@ public interface WxCpOaService {
* 获取成员假期余额
* 企业可通过审批应用或自建应用Secret调用本接口,获取可见范围内各个员工的假期余额数据。
* 第三方应用可获取应用可见范围内各个员工的假期余额数据。
- *
+ *
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/oa/vacation/getuservacationquota?access_token=ACCESS_TOKEN
*
* @param userId 需要获取假期余额的成员的userid
- * @return
- * @throws WxErrorException
+ * @return user vacation quota
+ * @throws WxErrorException the wx error exception
*/
WxCpUserVacationQuota getUserVacationQuota(@NonNull String userId) throws WxErrorException;
@@ -158,15 +158,15 @@ public interface WxCpOaService {
* 获取审批数据(旧)
* 提示:推荐使用新接口“批量获取审批单号”及“获取审批申请详情”,此接口后续将不再维护、逐步下线。
* 通过本接口来获取公司一段时间内的审批记录。一次拉取调用最多拉取100个审批记录,可以通过多次拉取的方式来满足需求,但调用频率不可超过600次/分。
- *
+ *
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/corp/getapprovaldata?access_token=ACCESS_TOKEN
*
* @param startTime 获取审批记录的开始时间。Unix时间戳
- * @param endTime 获取审批记录的结束时间。Unix时间戳
+ * @param endTime 获取审批记录的结束时间。Unix时间戳
* @param nextSpNum 第一个拉取的审批单号,不填从该时间段的第一个审批单拉取
- * @return
- * @throws WxErrorException
+ * @return approval data
+ * @throws WxErrorException the wx error exception
*/
WxCpGetApprovalData getApprovalData(@NonNull Long startTime, @NonNull Long endTime, Long nextSpNum) throws WxErrorException;
@@ -175,19 +175,20 @@ public interface WxCpOaService {
* 修改成员假期余额
* 企业可通过审批应用或自建应用Secret调用本接口,修改可见范围内员工的“假期余额”。
* 第三方应用可通过应本接口修改应用可见范围内指定员工的“假期余额”。
- *
+ *
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/oa/vacation/setoneuserquota?access_token=ACCESS_TOKEN
*
- * @param userId 需要修改假期余额的成员的userid
- * @param vacationId 假期id
+ * @param userId 需要修改假期余额的成员的userid
+ * @param vacationId 假期id
* @param leftDuration 设置的假期余额,单位为秒,不能大于1000天或24000小时,当假期时间刻度为按小时请假时,必须为360整倍数,即0.1小时整倍数,按天请假时,必须为8640整倍数,即0.1天整倍数
- * @param timeAttr 假期时间刻度:0-按天请假;1-按小时请假
- * @param remarks 修改备注,用于显示在假期余额的修改记录当中,可对修改行为作说明,不超过200字符
- * @return
- * @throws WxErrorException
+ * @param timeAttr 假期时间刻度:0-按天请假;1-按小时请假
+ * @param remarks 修改备注,用于显示在假期余额的修改记录当中,可对修改行为作说明,不超过200字符
+ * @return one user quota
+ * @throws WxErrorException the wx error exception
*/
- WxCpBaseResp setOneUserQuota(@NonNull String userId, @NonNull Integer vacationId, @NonNull Integer leftDuration, @NonNull Integer timeAttr, String remarks) throws WxErrorException;
+ WxCpBaseResp setOneUserQuota(@NonNull String userId, @NonNull Integer vacationId, @NonNull Integer leftDuration,
+ @NonNull Integer timeAttr, String remarks) throws WxErrorException;
/**
@@ -231,7 +232,7 @@ public interface WxCpOaService {
* @param startTime 获取月报的开始时间
* @param endTime 获取月报的结束时间
* @param userIdList 获取月报的userid列表
- * @return 月报数据列表
+ * @return 月报数据列表 checkin month data
* @throws WxErrorException the wx error exception
*/
List getCheckinMonthData(Date startTime, Date endTime, List userIdList) throws WxErrorException;
@@ -242,7 +243,7 @@ public interface WxCpOaService {
* @param startTime 获取排班信息的开始时间。Unix时间戳
* @param endTime 获取排班信息的结束时间。Unix时间戳(与starttime跨度不超过一个月)
* @param userIdList 需要获取排班信息的用户列表(不超过100个)
- * @return 排班表信息
+ * @return 排班表信息 checkin schedule list
* @throws WxErrorException the wx error exception
*/
List getCheckinScheduleList(Date startTime, Date endTime, List userIdList) throws WxErrorException;
@@ -255,17 +256,21 @@ public interface WxCpOaService {
* @throws WxErrorException the wx error exception
*/
void setCheckinScheduleList(WxCpSetCheckinSchedule wxCpSetCheckinSchedule) throws WxErrorException;
+
/**
*
* 录入打卡人员人脸信息
* 企业可通过打卡应用Secret调用本接口,为企业打卡人员录入人脸信息,人脸信息仅用于人脸打卡。
* 上传图片大小限制:图片数据不超过1M
* 请求方式:POST(HTTPS)
- * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN
- * 文档地址:https://developer.work.weixin.qq.com/document/path/93378
+ * 请求地址:
+ * https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN
+ * 文档地址:
+ * https://developer.work.weixin.qq.com/document/path/93378
*
* @param userId 需要录入的用户id
* @param userFace 需要录入的人脸图片数据,需要将图片数据base64处理后填入,对已录入的人脸会进行更新处理
+ * @throws WxErrorException the wx error exception
*/
void addCheckInUserFace(String userId, String userFace) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveService.java
index 8954e8693..ad2dc635f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveService.java
@@ -11,8 +11,7 @@ import java.util.List;
* 企业微信微盘相关接口.
* https://developer.work.weixin.qq.com/document/path/93654
*
- * @author Wang_Wong
- * created on 2022-04-22
+ * @author Wang_Wong created on 2022-04-22
*/
public interface WxCpOaWeDriveService {
@@ -24,8 +23,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_create?access_token=ACCESS_TOKEN
*
* @param request 新建空间对应请求参数
- * @return spaceid(空间id)
- * @throws WxErrorException
+ * @return spaceid (空间id)
+ * @throws WxErrorException the wx error exception
*/
WxCpSpaceCreateData spaceCreate(@NonNull WxCpSpaceCreateRequest request) throws WxErrorException;
@@ -37,8 +36,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_rename?access_token=ACCESS_TOKEN
*
* @param request 重命名空间的请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp spaceRename(@NonNull WxCpSpaceRenameRequest request) throws WxErrorException;
@@ -49,10 +48,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_dismiss?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param spaceId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param spaceId the space id
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp spaceDismiss(@NonNull String userId, @NonNull String spaceId) throws WxErrorException;
@@ -63,10 +62,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_info?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param spaceId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param spaceId the space id
+ * @return wx cp space info
+ * @throws WxErrorException the wx error exception
*/
WxCpSpaceInfo spaceInfo(@NonNull String userId, @NonNull String spaceId) throws WxErrorException;
@@ -78,8 +77,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_add?access_token=ACCESS_TOKEN
*
* @param request 添加成员/部门请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp spaceAclAdd(@NonNull WxCpSpaceAclAddRequest request) throws WxErrorException;
@@ -91,8 +90,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_del?access_token=ACCESS_TOKEN
*
* @param request 移除成员/部门请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp spaceAclDel(@NonNull WxCpSpaceAclDelRequest request) throws WxErrorException;
@@ -104,8 +103,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_setting?access_token=ACCESS_TOKEN
*
* @param request 权限管理请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp spaceSetting(@NonNull WxCpSpaceSettingRequest request) throws WxErrorException;
@@ -116,10 +115,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_share?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param spaceId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param spaceId the space id
+ * @return wx cp space share
+ * @throws WxErrorException the wx error exception
*/
WxCpSpaceShare spaceShare(@NonNull String userId, @NonNull String spaceId) throws WxErrorException;
@@ -131,8 +130,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_list?access_token=ACCESS_TOKEN
*
* @param request 获取文件列表请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp file list
+ * @throws WxErrorException the wx error exception
*/
WxCpFileList fileList(@NonNull WxCpFileListRequest request) throws WxErrorException;
@@ -144,8 +143,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload?access_token=ACCESS_TOKEN
*
* @param request 上传文件请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp file upload
+ * @throws WxErrorException the wx error exception
*/
WxCpFileUpload fileUpload(@NonNull WxCpFileUploadRequest request) throws WxErrorException;
@@ -156,10 +155,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_download?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param fileId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param fileId the file id
+ * @return wx cp file download
+ * @throws WxErrorException the wx error exception
*/
WxCpFileDownload fileDownload(@NonNull String userId, @NonNull String fileId) throws WxErrorException;
@@ -170,11 +169,11 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_rename?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param fileId
- * @param newName
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param fileId the file id
+ * @param newName the new name
+ * @return wx cp file rename
+ * @throws WxErrorException the wx error exception
*/
WxCpFileRename fileRename(@NonNull String userId, @NonNull String fileId, @NonNull String newName) throws WxErrorException;
@@ -190,8 +189,8 @@ public interface WxCpOaWeDriveService {
* @param fatherId 父目录fileid, 在根目录时为空间spaceid
* @param fileType 文件类型, 1:文件夹 3:微文档(文档) 4:微文档(表格)
* @param fileName 文件名字
- * @return
- * @throws WxErrorException
+ * @return wx cp file create
+ * @throws WxErrorException the wx error exception
*/
WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
@NonNull String fatherId, @NonNull Integer fileType, @NonNull String fileName) throws WxErrorException;
@@ -204,8 +203,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_move?access_token=ACCESS_TOKEN
*
* @param request 移动文件的请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp file move
+ * @throws WxErrorException the wx error exception
*/
WxCpFileMove fileMove(@NonNull WxCpFileMoveRequest request) throws WxErrorException;
@@ -218,8 +217,8 @@ public interface WxCpOaWeDriveService {
*
* @param userId 操作者userid
* @param fileId 文件fileid列表
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp fileDelete(@NonNull String userId, @NonNull List fileId) throws WxErrorException;
@@ -231,8 +230,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_add?access_token=ACCESS_TOKEN
*
* @param request 新增指定人请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp fileAclAdd(@NonNull WxCpFileAclAddRequest request) throws WxErrorException;
@@ -244,8 +243,8 @@ public interface WxCpOaWeDriveService {
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_del?access_token=ACCESS_TOKEN
*
* @param request 请求参数
- * @return
- * @throws WxErrorException
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp fileAclDel(@NonNull WxCpFileAclDelRequest request) throws WxErrorException;
@@ -256,12 +255,12 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_setting?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param fileId
- * @param authScope
- * @param auth
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param fileId the file id
+ * @param authScope the auth scope
+ * @param auth the auth
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp fileSetting(@NonNull String userId, @NonNull String fileId, @NonNull Integer authScope, Integer auth) throws WxErrorException;
@@ -272,10 +271,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_share?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param fileId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param fileId the file id
+ * @return wx cp file share
+ * @throws WxErrorException the wx error exception
*/
WxCpFileShare fileShare(@NonNull String userId, @NonNull String fileId) throws WxErrorException;
@@ -286,10 +285,10 @@ public interface WxCpOaWeDriveService {
* 请求方式:POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_info?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param fileId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param fileId the file id
+ * @return wx cp file info
+ * @throws WxErrorException the wx error exception
*/
WxCpFileInfo fileInfo(@NonNull String userId, @NonNull String fileId) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthService.java
index 8ee5e8d50..091f24282 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthService.java
@@ -11,8 +11,7 @@ import me.chanjar.weixin.cp.bean.school.health.WxCpGetReportJobInfo;
* 企业微信家校应用 健康上报接口.
* https://developer.work.weixin.qq.com/document/path/93676
*
- * @author Wang_Wong
- * created on : 2022/5/31 9:10
+ * @author Wang_Wong created on : 2022/5/31 9:10
*/
public interface WxCpSchoolHealthService {
@@ -22,8 +21,8 @@ public interface WxCpSchoolHealthService {
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/health/get_health_report_stat?access_token=ACCESS_TOKEN
*
* @param date 具体某天的使用统计,最长支持获取30天前数据
- * @return
- * @throws WxErrorException
+ * @return health report stat
+ * @throws WxErrorException the wx error exception
*/
WxCpGetHealthReportStat getHealthReportStat(@NonNull String date) throws WxErrorException;
@@ -36,8 +35,8 @@ public interface WxCpSchoolHealthService {
*
* @param offset 否 分页,偏移量, 默认为0
* @param limit 否 分页,预期请求的数据量,默认为100,取值范围 1 ~ 100
- * @return
- * @throws WxErrorException
+ * @return report job ids
+ * @throws WxErrorException the wx error exception
*/
WxCpGetReportJobIds getReportJobIds(Integer offset, Integer limit) throws WxErrorException;
@@ -50,8 +49,8 @@ public interface WxCpSchoolHealthService {
*
* @param jobId 是 任务ID
* @param date 是 具体某天任务详情,仅支持获取最近14天数据
- * @return
- * @throws WxErrorException
+ * @return report job info
+ * @throws WxErrorException the wx error exception
*/
WxCpGetReportJobInfo getReportJobInfo(@NonNull String jobId, @NonNull String date) throws WxErrorException;
@@ -62,12 +61,12 @@ public interface WxCpSchoolHealthService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/health/get_report_answer?access_token=ACCESS_TOKEN
*
- * @param jobId
- * @param date
- * @param offset
- * @param limit
- * @return
- * @throws WxErrorException
+ * @param jobId the job id
+ * @param date the date
+ * @param offset the offset
+ * @param limit the limit
+ * @return report answer
+ * @throws WxErrorException the wx error exception
*/
WxCpGetReportAnswer getReportAnswer(@NonNull String jobId, @NonNull String date, Integer offset, Integer limit) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolService.java
index 46eab7295..4528abb11 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolService.java
@@ -15,8 +15,7 @@ import java.util.List;
* 权限说明:
* 仅复学码应用可以调用
*
- * @author Wang_Wong
- * created on : 2022/5/31 9:10
+ * @author Wang_Wong created on : 2022/5/31 9:10
*/
public interface WxCpSchoolService {
@@ -25,11 +24,11 @@ public interface WxCpSchoolService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/school/user/get_teacher_customize_health_info?access_token=ACCESS_TOKEN
*
- * @param date
- * @param nextKey
- * @param limit
- * @return
- * @throws WxErrorException
+ * @param date the date
+ * @param nextKey the next key
+ * @param limit the limit
+ * @return teacher customize health info
+ * @throws WxErrorException the wx error exception
*/
WxCpCustomizeHealthInfo getTeacherCustomizeHealthInfo(@NotNull String date, String nextKey, Integer limit) throws WxErrorException;
@@ -38,11 +37,11 @@ public interface WxCpSchoolService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/school/user/get_student_customize_health_info?access_token=ACCESS_TOKEN
*
- * @param date
- * @param nextKey
- * @param limit
- * @return
- * @throws WxErrorException
+ * @param date the date
+ * @param nextKey the next key
+ * @param limit the limit
+ * @return student customize health info
+ * @throws WxErrorException the wx error exception
*/
WxCpCustomizeHealthInfo getStudentCustomizeHealthInfo(@NotNull String date, String nextKey, Integer limit) throws WxErrorException;
@@ -51,10 +50,10 @@ public interface WxCpSchoolService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/get_health_qrcode?access_token=ACCESS_TOKEN
*
- * @param userIds
- * @param type
- * @return
- * @throws WxErrorException
+ * @param userIds the user ids
+ * @param type the type
+ * @return health qr code
+ * @throws WxErrorException the wx error exception
*/
WxCpResultList getHealthQrCode(@NotNull List userIds, @NotNull Integer type) throws WxErrorException;
@@ -63,9 +62,9 @@ public interface WxCpSchoolService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/school/get_payment_result?access_token=ACCESS_TOKEN
*
- * @param paymentId
- * @return
- * @throws WxErrorException
+ * @param paymentId the payment id
+ * @return payment result
+ * @throws WxErrorException the wx error exception
*/
WxCpPaymentResult getPaymentResult(@NotNull String paymentId) throws WxErrorException;
@@ -74,20 +73,22 @@ public interface WxCpSchoolService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/school/get_trade?access_token=ACCESS_TOKEN
*
- * @param paymentId
- * @param tradeNo
- * @return
- * @throws WxErrorException
+ * @param paymentId the payment id
+ * @param tradeNo the trade no
+ * @return trade
+ * @throws WxErrorException the wx error exception
*/
WxCpTrade getTrade(@NotNull String paymentId, @NotNull String tradeNo) throws WxErrorException;
/**
* 获取直播详情
* 请求方式:GET(HTTPS)
- * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_living_info?access_token=ACCESS_TOKEN&livingid=LIVINGID
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_living_info?access_token=ACCESS_TOKEN&livingid
+ * =LIVINGID
*
- * @param livingId
- * @return
+ * @param livingId the living id
+ * @return living info
+ * @throws WxErrorException the wx error exception
*/
WxCpSchoolLivingInfo getLivingInfo(@NotNull String livingId) throws WxErrorException;
@@ -98,11 +99,11 @@ public interface WxCpSchoolService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/living/get_user_all_livingid?access_token=ACCESS_TOKEN
*
- * @param userId
- * @param cursor
- * @param limit
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @param cursor the cursor
+ * @param limit the limit
+ * @return user all living id
+ * @throws WxErrorException the wx error exception
*/
WxCpLivingResult.LivingIdResult getUserAllLivingId(@NonNull String userId, String cursor, Integer limit) throws WxErrorException;
@@ -113,10 +114,10 @@ public interface WxCpSchoolService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_watch_stat?access_token=ACCESS_TOKEN
*
- * @param livingId
- * @param nextKey
- * @return
- * @throws WxErrorException
+ * @param livingId the living id
+ * @param nextKey the next key
+ * @return watch stat
+ * @throws WxErrorException the wx error exception
*/
WxCpSchoolWatchStat getWatchStat(@NonNull String livingId, String nextKey) throws WxErrorException;
@@ -127,10 +128,10 @@ public interface WxCpSchoolService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_unwatch_stat?access_token=ACCESS_TOKEN
*
- * @param livingId
- * @param nextKey
- * @return
- * @throws WxErrorException
+ * @param livingId the living id
+ * @param nextKey the next key
+ * @return unwatch stat
+ * @throws WxErrorException the wx error exception
*/
WxCpSchoolUnwatchStat getUnwatchStat(@NonNull String livingId, String nextKey) throws WxErrorException;
@@ -139,9 +140,9 @@ public interface WxCpSchoolService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/living/delete_replay_data?access_token=ACCESS_TOKEN
*
- * @param livingId
- * @return
- * @throws WxErrorException
+ * @param livingId the living id
+ * @return wx cp living result
+ * @throws WxErrorException the wx error exception
*/
WxCpLivingResult deleteReplayData(@NonNull String livingId) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolUserService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolUserService.java
index 18cdc45ed..26cfe3a01 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolUserService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpSchoolUserService.java
@@ -12,8 +12,7 @@ import java.util.List;
* 企业微信家校沟通相关接口.
* https://developer.work.weixin.qq.com/document/path/91638
*
- * @author Wang_Wong
- * created on : 2022/6/18 9:10
+ * @author Wang_Wong created on : 2022/6/18 9:10
*/
public interface WxCpSchoolUserService {
@@ -24,9 +23,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
*
- * @param code
- * @return
- * @throws WxErrorException
+ * @param code the code
+ * @return user info
+ * @throws WxErrorException the wx error exception
*/
WxCpOauth2UserInfo getUserInfo(@NonNull String code) throws WxErrorException;
@@ -37,9 +36,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
*
- * @param code
- * @return
- * @throws WxErrorException
+ * @param code the code
+ * @return school user info
+ * @throws WxErrorException the wx error exception
*/
WxCpOauth2UserInfo getSchoolUserInfo(@NonNull String code) throws WxErrorException;
@@ -48,11 +47,11 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/create_student?access_token=ACCESS_TOKEN
*
- * @param studentUserId
- * @param name
- * @param departments
- * @return
- * @throws WxErrorException
+ * @param studentUserId the student user id
+ * @param name the name
+ * @param departments the departments
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp createStudent(@NonNull String studentUserId, @NonNull String name, @NonNull List departments) throws WxErrorException;
@@ -61,9 +60,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_create_student?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchCreateStudent(@NonNull WxCpBatchCreateStudentRequest request) throws WxErrorException;
@@ -72,9 +71,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_delete_student?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchDeleteStudent(@NonNull WxCpBatchDeleteStudentRequest request) throws WxErrorException;
@@ -83,9 +82,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_update_student?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchUpdateStudent(@NonNull WxCpBatchUpdateStudentRequest request) throws WxErrorException;
@@ -94,9 +93,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_student?access_token=ACCESS_TOKEN&userid=USERID
*
- * @param studentUserId
- * @return
- * @throws WxErrorException
+ * @param studentUserId the student user id
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp deleteStudent(@NonNull String studentUserId) throws WxErrorException;
@@ -105,23 +104,24 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/update_student?access_token=ACCESS_TOKEN
*
- * @param studentUserId
- * @param newStudentUserId
- * @param name
- * @param departments
- * @return
- * @throws WxErrorException
+ * @param studentUserId the student user id
+ * @param newStudentUserId the new student user id
+ * @param name the name
+ * @param departments the departments
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
- WxCpBaseResp updateStudent(@NonNull String studentUserId, String newStudentUserId, String name, List departments) throws WxErrorException;
+ WxCpBaseResp updateStudent(@NonNull String studentUserId, String newStudentUserId, String name,
+ List departments) throws WxErrorException;
/**
* 创建家长
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/create_parent?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp createParent(@NonNull WxCpCreateParentRequest request) throws WxErrorException;
@@ -130,9 +130,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_create_parent?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchCreateParent(@NonNull WxCpBatchCreateParentRequest request) throws WxErrorException;
@@ -141,9 +141,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_delete_parent?access_token=ACCESS_TOKEN
*
- * @param userIdList
- * @return
- * @throws WxErrorException
+ * @param userIdList the user id list
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchDeleteParent(@NonNull String... userIdList) throws WxErrorException;
@@ -152,9 +152,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_update_parent?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp batch result list
+ * @throws WxErrorException the wx error exception
*/
WxCpBatchResultList batchUpdateParent(@NonNull WxCpBatchUpdateParentRequest request) throws WxErrorException;
@@ -163,32 +163,34 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/get?access_token=ACCESS_TOKEN&userid=USERID
*
- * @param userId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @return user
+ * @throws WxErrorException the wx error exception
*/
WxCpUserResult getUser(@NonNull String userId) throws WxErrorException;
/**
* 获取部门成员详情
* 请求方式:GET(HTTPS)
- * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID
+ * &fetch_child=FETCH_CHILD
*
* @param departmentId 获取的部门id
* @param fetchChild 1/0:是否递归获取子部门下面的成员
- * @return
- * @throws WxErrorException
+ * @return user list
+ * @throws WxErrorException the wx error exception
*/
WxCpUserListResult getUserList(@NonNull Integer departmentId, Integer fetchChild) throws WxErrorException;
/**
* 获取部门家长详情
* 请求方式:GET(HTTPS)
- * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list_parent?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list_parent?access_token=ACCESS_TOKEN&department_id
+ * =DEPARTMENT_ID
*
* @param departmentId 获取的部门id
- * @return
- * @throws WxErrorException
+ * @return user list parent
+ * @throws WxErrorException the wx error exception
*/
WxCpListParentResult getUserListParent(@NonNull Integer departmentId) throws WxErrorException;
@@ -197,9 +199,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/update_parent?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp updateParent(@NonNull WxCpUpdateParentRequest request) throws WxErrorException;
@@ -208,9 +210,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_parent?access_token=ACCESS_TOKEN&userid=USERID
*
- * @param userId
- * @return
- * @throws WxErrorException
+ * @param userId the user id
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp deleteParent(@NonNull String userId) throws WxErrorException;
@@ -222,8 +224,8 @@ public interface WxCpSchoolUserService {
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/set_arch_sync_mode?access_token=ACCESS_TOKEN
*
* @param archSyncMode 家校通讯录同步模式:1-禁止将标签同步至家校通讯录,2-禁止将家校通讯录同步至标签,3-禁止家校通讯录和标签相互同步
- * @return
- * @throws WxErrorException
+ * @return arch sync mode
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp setArchSyncMode(@NonNull Integer archSyncMode) throws WxErrorException;
@@ -234,8 +236,8 @@ public interface WxCpSchoolUserService {
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/create?access_token=ACCESS_TOKEN
*
* @param request 请求参数对象
- * @return
- * @throws WxErrorException
+ * @return wx cp create department
+ * @throws WxErrorException the wx error exception
*/
WxCpCreateDepartment createDepartment(@NonNull WxCpCreateDepartmentRequest request) throws WxErrorException;
@@ -245,9 +247,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/update?access_token=ACCESS_TOKEN
*
- * @param request
- * @return
- * @throws WxErrorException
+ * @param request the request
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp updateDepartment(@NonNull WxCpUpdateDepartmentRequest request) throws WxErrorException;
@@ -256,9 +258,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/delete?access_token=ACCESS_TOKEN&id=ID
*
- * @param id
- * @return
- * @throws WxErrorException
+ * @param id the id
+ * @return wx cp base resp
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp deleteDepartment(Integer id) throws WxErrorException;
@@ -270,8 +272,8 @@ public interface WxCpSchoolUserService {
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/set_subscribe_mode?access_token=ACCESS_TOKEN
*
* @param subscribeMode 关注模式, 1:可扫码填写资料加入, 2:禁止扫码填写资料加入
- * @return
- * @throws WxErrorException
+ * @return subscribe mode
+ * @throws WxErrorException the wx error exception
*/
WxCpBaseResp setSubscribeMode(@NonNull Integer subscribeMode) throws WxErrorException;
@@ -282,8 +284,8 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_subscribe_mode?access_token=ACCESS_TOKEN
*
- * @return
- * @throws WxErrorException
+ * @return subscribe mode
+ * @throws WxErrorException the wx error exception
*/
Integer getSubscribeMode() throws WxErrorException;
@@ -292,11 +294,12 @@ public interface WxCpSchoolUserService {
* 学校可通过此接口,根据外部联系人的userid(如何获取?),拉取外部联系人详情。
*
* 请求方式:GET(HTTPS)
- * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid
+ * =EXTERNAL_USERID
*
* @param externalUserId 外部联系人的userid,注意不是学校成员的帐号
- * @return
- * @throws WxErrorException
+ * @return external contact
+ * @throws WxErrorException the wx error exception
*/
WxCpExternalContact getExternalContact(@NonNull String externalUserId) throws WxErrorException;
@@ -307,9 +310,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/agent/get_allow_scope?access_token=ACCESS_TOKEN&agentid=AGENTID
*
- * @param agentId
- * @return
- * @throws WxErrorException
+ * @param agentId the agent id
+ * @return allow scope
+ * @throws WxErrorException the wx error exception
*/
WxCpAllowScope getAllowScope(@NonNull Integer agentId) throws WxErrorException;
@@ -320,9 +323,9 @@ public interface WxCpSchoolUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/convert_to_openid?access_token=ACCESS_TOKEN
*
- * @param externalUserId
- * @return
- * @throws WxErrorException
+ * @param externalUserId the external user id
+ * @return string
+ * @throws WxErrorException the wx error exception
*/
String convertToOpenId(@NonNull String externalUserId) throws WxErrorException;
@@ -331,9 +334,9 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/list?access_token=ACCESS_TOKEN&id=ID
*
- * @param id
- * @return
- * @throws WxErrorException
+ * @param id the id
+ * @return wx cp department list
+ * @throws WxErrorException the wx error exception
*/
WxCpDepartmentList listDepartment(Integer id) throws WxErrorException;
@@ -343,8 +346,8 @@ public interface WxCpSchoolUserService {
* 请求方式:GET(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_subscribe_qr_code?access_token=ACCESS_TOKEN
*
- * @return
- * @throws WxErrorException
+ * @return subscribe qr code
+ * @throws WxErrorException the wx error exception
*/
WxCpSubscribeQrCode getSubscribeQrCode() throws WxErrorException;
@@ -353,10 +356,10 @@ public interface WxCpSchoolUserService {
* 请求方式: POST(HTTPS)
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/school/set_upgrade_info?access_token=ACCESS_TOKEN
*
- * @param upgradeTime
- * @param upgradeSwitch
- * @return
- * @throws WxErrorException
+ * @param upgradeTime the upgrade time
+ * @param upgradeSwitch the upgrade switch
+ * @return upgrade info
+ * @throws WxErrorException the wx error exception
*/
WxCpSetUpgradeInfo setUpgradeInfo(Long upgradeTime, Integer upgradeSwitch) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
index 44237ba8e..8a9bdb19b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
@@ -38,7 +38,7 @@ public interface WxCpService extends WxService {
*
* @return the access token
* @throws WxErrorException the wx error exception
- * @see #getAccessToken(boolean) #getAccessToken(boolean)#getAccessToken(boolean)
+ * @see #getAccessToken(boolean) #getAccessToken(boolean)#getAccessToken(boolean)#getAccessToken(boolean)
*/
String getAccessToken() throws WxErrorException;
@@ -62,7 +62,7 @@ public interface WxCpService extends WxService {
*
* @return the jsapi ticket
* @throws WxErrorException the wx error exception
- * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean)#getJsapiTicket(boolean)
+ * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean)#getJsapiTicket(boolean)#getJsapiTicket(boolean)
*/
String getJsapiTicket() throws WxErrorException;
@@ -89,7 +89,7 @@ public interface WxCpService extends WxService {
*
* @return the agent jsapi ticket
* @throws WxErrorException the wx error exception
- * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean)#getJsapiTicket(boolean)
+ * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean)#getJsapiTicket(boolean)#getJsapiTicket(boolean)
*/
String getAgentJsapiTicket() throws WxErrorException;
@@ -134,7 +134,7 @@ public interface WxCpService extends WxService {
*
* @param url url
* @return the agent jsapi signature
- * @throws WxErrorException
+ * @throws WxErrorException the wx error exception
*/
WxCpAgentJsapiSignature createAgentJsapiSignature(String url) throws WxErrorException;
@@ -265,6 +265,7 @@ public interface WxCpService extends WxService {
/**
* 上传用户列表,增量更新成员
+ *
* @param mediaId 媒体id
* @return jobId 异步任务id
* @throws WxErrorException the wx error exception
@@ -310,9 +311,10 @@ public interface WxCpService extends WxService {
/**
* 构造扫码登录链接 - 构造独立窗口登录二维码
+ *
* @param redirectUri 重定向地址,需要进行UrlEncode
- * @param state 用于保持请求和回调的状态,授权请求后原样带回给企业。该参数可用于防止csrf攻击(跨站请求伪造攻击),建议企业带上该参数,可设置为简单的随机数加session进行校验
- * @return .
+ * @param state 用于保持请求和回调的状态,授权请求后原样带回给企业。该参数可用于防止csrf攻击(跨站请求伪造攻击),建议企业带上该参数,可设置为简单的随机数加session进行校验
+ * @return . string
*/
String buildQrConnectUrl(String redirectUri, String state);
@@ -403,21 +405,21 @@ public interface WxCpService extends WxService {
/**
* 获取家校应用复学码相关接口的服务类对象
*
- * @return
+ * @return school service
*/
WxCpSchoolService getSchoolService();
/**
* 获取家校沟通相关接口的服务类对象
*
- * @return
+ * @return school user service
*/
WxCpSchoolUserService getSchoolUserService();
/**
* 获取家校应用健康上报的服务类对象
*
- * @return
+ * @return school health service
*/
WxCpSchoolHealthService getSchoolHealthService();
@@ -431,21 +433,21 @@ public interface WxCpService extends WxService {
/**
* 获取OA 自建应用相关接口的服务类对象
*
- * @return
+ * @return oa agent service
*/
WxCpOaAgentService getOaAgentService();
/**
* 获取OA效率工具 微盘的服务类对象
*
- * @return
+ * @return oa we drive service
*/
WxCpOaWeDriveService getOaWeDriveService();
/**
* 获取会话存档相关接口的服务类对象
*
- * @return
+ * @return msg audit service
*/
WxCpMsgAuditService getMsgAuditService();
@@ -487,7 +489,7 @@ public interface WxCpService extends WxService {
/**
* 获取微信客服服务
*
- * @return 微信客服服务
+ * @return 微信客服服务 kf service
*/
WxCpKfService getKfService();
@@ -550,7 +552,7 @@ public interface WxCpService extends WxService {
/**
* 获取异步导出服务
*
- * @return 异步导出服务
+ * @return 异步导出服务 export service
*/
WxCpExportService getExportService();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTagService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTagService.java
index 045264f7d..4469bcc9e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTagService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTagService.java
@@ -26,7 +26,7 @@ public interface WxCpTagService {
*
* @param name 标签名称,长度限制为32个字以内(汉字或英文字母),标签名不可与其他标签重名。
* @param id 标签id,非负整型,指定此参数时新增的标签会生成对应的标签id,不指定时则以目前最大的id自增。
- * @return 标签id
+ * @return 标签id string
* @throws WxErrorException .
*/
String create(String name, Integer id) throws WxErrorException;
@@ -51,7 +51,7 @@ public interface WxCpTagService {
/**
* 获得标签列表.
*
- * @return 标签列表
+ * @return 标签列表 list
* @throws WxErrorException .
*/
List listAll() throws WxErrorException;
@@ -60,7 +60,7 @@ public interface WxCpTagService {
* 获取标签成员.
*
* @param tagId 标签ID
- * @return 成员列表
+ * @return 成员列表 list
* @throws WxErrorException .
*/
List listUsersByTagId(String tagId) throws WxErrorException;
@@ -70,7 +70,7 @@ public interface WxCpTagService {
* 对应: http://qydev.weixin.qq.com/wiki/index.php?title=管理标签 中的get接口
*
* @param tagId 标签id
- * @return .
+ * @return . wx cp tag get result
* @throws WxErrorException .
*/
WxCpTagGetResult get(String tagId) throws WxErrorException;
@@ -81,7 +81,7 @@ public interface WxCpTagService {
* @param tagId 标签id
* @param userIds 用户ID 列表
* @param partyIds 企业部门ID列表
- * @return .
+ * @return . wx cp tag add or remove users result
* @throws WxErrorException .
*/
WxCpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List userIds, List partyIds) throws WxErrorException;
@@ -92,7 +92,7 @@ public interface WxCpTagService {
* @param tagId 标签id
* @param userIds 用户id列表
* @param partyIds 企业部门ID列表
- * @return .
+ * @return . wx cp tag add or remove users result
* @throws WxErrorException .
*/
WxCpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List userIds, List partyIds) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTaskCardService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTaskCardService.java
index 9c401a981..ee28d81e5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTaskCardService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTaskCardService.java
@@ -11,8 +11,7 @@ import java.util.List;
* Updted by HeXiao on 2022-03-09.
*
*
- * @author Jeff
- * created on 2019-05-16
+ * @author Jeff created on 2019-05-16
*/
public interface WxCpTaskCardService {
@@ -27,23 +26,26 @@ public interface WxCpTaskCardService {
* @param userIds 企业的成员ID列表
* @param taskId 任务卡片ID
* @param replaceName 替换文案
+ * @throws WxErrorException the wx error exception
*/
void update(List userIds, String taskId, String replaceName) throws WxErrorException;
/**
* 更新按钮为不可点击状态
- * 详情请见https://developer.work.weixin.qq.com/document/path/94888#%E6%9B%B4%E6%96%B0%E6%8C%89%E9%92%AE%E4%B8%BA%E4%B8%8D%E5%8F%AF%E7%82%B9%E5%87%BB%E7%8A%B6%E6%80%81
- * @param userIds 企业的成员ID列表
- * @param partyIds 企业的部门ID列表
- * @param tagIds 企业的标签ID列表
- * @param atAll 更新整个任务接收人员
- * @param responseCode 更新卡片所需要消费的code,可通过发消息接口和回调接口返回值获取,一个code只能调用一次该接口,且只能在24小时内调用
- * @param replaceName 需要更新的按钮的文案
- * @throws WxErrorException
+ * 详情请见https://developer.work.weixin.qq.com/document/path/94888#%E6%9B%B4%E6%96%B0%E6%8C%89%E9%92%AE%E4%B8%BA%E4%B8
+ * %8D%E5%8F%AF%E7%82%B9%E5%87%BB%E7%8A%B6%E6%80%81
+ *
+ * @param userIds 企业的成员ID列表
+ * @param partyIds 企业的部门ID列表
+ * @param tagIds 企业的标签ID列表
+ * @param atAll 更新整个任务接收人员
+ * @param responseCode 更新卡片所需要消费的code,可通过发消息接口和回调接口返回值获取,一个code只能调用一次该接口,且只能在24小时内调用
+ * @param replaceName 需要更新的按钮的文案
+ * @throws WxErrorException the wx error exception
*/
void updateTemplateCardButton(List userIds, List partyIds,
- List tagIds, Integer atAll, String responseCode,
- String replaceName) throws WxErrorException;
+ List tagIds, Integer atAll, String responseCode,
+ String replaceName) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpUserService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpUserService.java
index d5bd6702c..4b75450ff 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpUserService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpUserService.java
@@ -132,7 +132,8 @@ public interface WxCpUserService {
*
* @param userId 企业内的成员id
* @param agentId 非必填,整型,仅用于发红包。其它场景该参数不要填,如微信支付、企业转账、电子发票
- * @return map对象 ,可能包含以下值: - openid 企业微信成员userid对应的openid,若有传参agentid,则是针对该agentid的openid。否则是针对企业微信corpid的openid - appid 应用的appid,若请求包中不包含agentid则不返回appid。该appid在使用微信红包时会用到
+ * @return map对象 ,可能包含以下值: - openid 企业微信成员userid对应的openid,若有传参agentid,则是针对该agentid的openid。否则是针对企业微信corpid的openid -
+ * appid 应用的appid,若请求包中不包含agentid则不返回appid。该appid在使用微信红包时会用到
* @throws WxErrorException the wx error exception
*/
Map userId2Openid(String userId, Integer agentId) throws WxErrorException;
@@ -226,9 +227,9 @@ public interface WxCpUserService {
* 将自建应用或代开发应用获取的userid转换为第三方应用的userid
* https://developer.work.weixin.qq.com/document/path/95603
*
- * @param useridList
+ * @param useridList the userid list
* @return the WxCpUseridToOpenUseridResult
- * @throws WxErrorException
+ * @throws WxErrorException the wx error exception
*/
WxCpUseridToOpenUseridResult useridToOpenUserid(ArrayList useridList) throws WxErrorException;
@@ -239,10 +240,10 @@ public interface WxCpUserService {
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list_id?access_token=ACCESS_TOKEN
*
- * @param cursor
- * @param limit
- * @return
- * @throws WxErrorException
+ * @param cursor the cursor
+ * @param limit the limit
+ * @return user list id
+ * @throws WxErrorException the wx error exception
*/
WxCpDeptUserResult getUserListId(String cursor, Integer limit) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
index 735ccfd85..dea53f5dc 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
@@ -36,34 +36,36 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.*;
/**
* .
*
+ * @param the type parameter
+ * @param the type parameter
* @author chanjarster
*/
@Slf4j
public abstract class BaseWxCpServiceImpl implements WxCpService, RequestHttp {
private WxCpUserService userService = new WxCpUserServiceImpl(this);
- private WxCpChatService chatService = new WxCpChatServiceImpl(this);
+ private final WxCpChatService chatService = new WxCpChatServiceImpl(this);
private WxCpDepartmentService departmentService = new WxCpDepartmentServiceImpl(this);
private WxCpMediaService mediaService = new WxCpMediaServiceImpl(this);
private WxCpMenuService menuService = new WxCpMenuServiceImpl(this);
private WxCpOAuth2Service oauth2Service = new WxCpOAuth2ServiceImpl(this);
private WxCpTagService tagService = new WxCpTagServiceImpl(this);
private WxCpAgentService agentService = new WxCpAgentServiceImpl(this);
- private WxCpOaService oaService = new WxCpOaServiceImpl(this);
- private WxCpSchoolService schoolService = new WxCpSchoolServiceImpl(this);
- private WxCpSchoolUserService schoolUserService = new WxCpSchoolUserServiceImpl(this);
- private WxCpSchoolHealthService schoolHealthService = new WxCpSchoolHealthServiceImpl(this);
- private WxCpLivingService livingService = new WxCpLivingServiceImpl(this);
- private WxCpOaAgentService oaAgentService = new WxCpOaAgentServiceImpl(this);
- private WxCpOaWeDriveService oaWeDriveService = new WxCpOaWeDriveServiceImpl(this);
- private WxCpMsgAuditService msgAuditService = new WxCpMsgAuditServiceImpl(this);
- private WxCpTaskCardService taskCardService = new WxCpTaskCardServiceImpl(this);
- private WxCpExternalContactService externalContactService = new WxCpExternalContactServiceImpl(this);
- private WxCpGroupRobotService groupRobotService = new WxCpGroupRobotServiceImpl(this);
- private WxCpMessageService messageService = new WxCpMessageServiceImpl(this);
- private WxCpOaCalendarService oaCalendarService = new WxCpOaCalendarServiceImpl(this);
- private WxCpOaMeetingRoomService oaMeetingRoomService = new WxCpOaMeetingRoomServiceImpl(this);
- private WxCpOaScheduleService oaScheduleService = new WxCpOaOaScheduleServiceImpl(this);
- private WxCpAgentWorkBenchService workBenchService = new WxCpAgentWorkBenchServiceImpl(this);
+ private final WxCpOaService oaService = new WxCpOaServiceImpl(this);
+ private final WxCpSchoolService schoolService = new WxCpSchoolServiceImpl(this);
+ private final WxCpSchoolUserService schoolUserService = new WxCpSchoolUserServiceImpl(this);
+ private final WxCpSchoolHealthService schoolHealthService = new WxCpSchoolHealthServiceImpl(this);
+ private final WxCpLivingService livingService = new WxCpLivingServiceImpl(this);
+ private final WxCpOaAgentService oaAgentService = new WxCpOaAgentServiceImpl(this);
+ private final WxCpOaWeDriveService oaWeDriveService = new WxCpOaWeDriveServiceImpl(this);
+ private final WxCpMsgAuditService msgAuditService = new WxCpMsgAuditServiceImpl(this);
+ private final WxCpTaskCardService taskCardService = new WxCpTaskCardServiceImpl(this);
+ private final WxCpExternalContactService externalContactService = new WxCpExternalContactServiceImpl(this);
+ private final WxCpGroupRobotService groupRobotService = new WxCpGroupRobotServiceImpl(this);
+ private final WxCpMessageService messageService = new WxCpMessageServiceImpl(this);
+ private final WxCpOaCalendarService oaCalendarService = new WxCpOaCalendarServiceImpl(this);
+ private final WxCpOaMeetingRoomService oaMeetingRoomService = new WxCpOaMeetingRoomServiceImpl(this);
+ private final WxCpOaScheduleService oaScheduleService = new WxCpOaOaScheduleServiceImpl(this);
+ private final WxCpAgentWorkBenchService workBenchService = new WxCpAgentWorkBenchServiceImpl(this);
private WxCpKfService kfService = new WxCpKfServiceImpl(this);
private WxCpExportService exportService = new WxCpExportServiceImpl(this);
@@ -83,6 +85,9 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH
*/
protected final Object globalAgentJsapiTicketRefreshLock = new Object();
+ /**
+ * The Config storage.
+ */
protected WxCpConfigStorage configStorage;
private WxSessionManager sessionManager = new StandardSessionManager();
@@ -234,7 +239,8 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("corpid", corpId);
jsonObject.addProperty("provider_secret", providerSecret);
- return WxCpProviderToken.fromJson(this.post(this.configStorage.getApiUrl(Tp.GET_PROVIDER_TOKEN), jsonObject.toString()));
+ return WxCpProviderToken.fromJson(this.post(this.configStorage.getApiUrl(Tp.GET_PROVIDER_TOKEN),
+ jsonObject.toString()));
}
@Override
@@ -305,6 +311,18 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH
throw new WxRuntimeException("微信服务端异常,超出重试次数");
}
+ /**
+ * Execute internal t.
+ *
+ * @param the type parameter
+ * @param the type parameter
+ * @param executor the executor
+ * @param uri the uri
+ * @param data the data
+ * @param doNotAutoRefresh the do not auto refresh
+ * @return the t
+ * @throws WxErrorException the wx error exception
+ */
protected T executeInternal(RequestExecutor executor, String uri, E data, boolean doNotAutoRefresh) throws WxErrorException {
E dataForLog = DataUtils.handleDataWithSecret(data);
@@ -439,15 +457,26 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH
@Override
public String buildQrConnectUrl(String redirectUri, String state) {
- return String.format("https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=%s&agentid=%s&redirect_uri=%s&state=%s",
+ return String.format("https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=%s&agentid=%s&redirect_uri=%s" +
+ "&state=%s",
this.configStorage.getCorpId(), this.configStorage.getAgentId(),
URIUtil.encodeURIComponent(redirectUri), StringUtils.trimToEmpty(state));
}
+ /**
+ * Gets tmp dir file.
+ *
+ * @return the tmp dir file
+ */
public File getTmpDirFile() {
return this.tmpDirFile;
}
+ /**
+ * Sets tmp dir file.
+ *
+ * @param tmpDirFile the tmp dir file
+ */
public void setTmpDirFile(File tmpDirFile) {
this.tmpDirFile = tmpDirFile;
}
@@ -602,6 +631,11 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH
return this.messageService;
}
+ /**
+ * Sets agent service.
+ *
+ * @param agentService the agent service
+ */
public void setAgentService(WxCpAgentService agentService) {
this.agentService = agentService;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchServiceImpl.java
index 47169998f..3af04c307 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchServiceImpl.java
@@ -7,13 +7,12 @@ import me.chanjar.weixin.cp.api.WxCpAgentWorkBenchService;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.WxCpAgentWorkBench;
-import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.WORKBENCH_DATA_SET;
-import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.WORKBENCH_TEMPLATE_GET;
-import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.WORKBENCH_TEMPLATE_SET;
+import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.*;
/**
- * @author songshiyu
- * created on : create in 11:24 2020/9/28
+ * The type Wx cp agent work bench service.
+ *
+ * @author songshiyu created on : create in 11:24 2020/9/28
* @description: 工作台自定义展示实现
*/
@RequiredArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImpl.java
index 7783422af..c47785f6e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImpl.java
@@ -6,8 +6,8 @@ import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
import me.chanjar.weixin.cp.api.WxCpChatService;
import me.chanjar.weixin.cp.api.WxCpService;
-import me.chanjar.weixin.cp.bean.message.WxCpAppChatMessage;
import me.chanjar.weixin.cp.bean.WxCpChat;
+import me.chanjar.weixin.cp.bean.message.WxCpAppChatMessage;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import org.apache.commons.lang3.StringUtils;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExportServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExportServiceImpl.java
index 30ea5baaa..638dd4e1c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExportServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExportServiceImpl.java
@@ -15,9 +15,8 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Export.*;
/**
* 异步导出接口
*
- * @author zhongjun
- * created on 2022/4/21
- **/
+ * @author zhongjun created on 2022/4/21
+ */
@RequiredArgsConstructor
public class WxCpExportServiceImpl implements WxCpExportService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java
index aa6cc0366..3373e7ccb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java
@@ -32,6 +32,8 @@ import java.util.UUID;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.ExternalContact.*;
/**
+ * The type Wx cp external contact service.
+ *
* @author 曹祖鹏 & yuanqixun & Mr.Pan & Wang_Wong
*/
@RequiredArgsConstructor
@@ -153,7 +155,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpExternalUserIdList unionidToExternalUserid3rd(@NotNull String unionid, @NotNull String openid, String corpid) throws WxErrorException {
+ public WxCpExternalUserIdList unionidToExternalUserid3rd(@NotNull String unionid, @NotNull String openid,
+ String corpid) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("unionid", unionid);
json.addProperty("openid", openid);
@@ -277,7 +280,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException {
+ public WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
+ String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("cursor", cursor);
json.addProperty("handover_userid", handOverUserid);
@@ -296,7 +300,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException {
+ public WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid,
+ @NotNull String takeOverUserid, String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("cursor", cursor);
json.addProperty("handover_userid", handOverUserid);
@@ -307,7 +312,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status, String[] userIds, String[] partyIds) throws WxErrorException {
+ public WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status,
+ String[] userIds, String[] partyIds) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("offset", pageIndex == null ? 0 : pageIndex);
json.addProperty("limit", pageSize == null ? 100 : pageSize);
@@ -368,7 +374,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic(Date startTime, Date endTime, String[] userIds, String[] partyIds) throws WxErrorException {
+ public WxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic(Date startTime, Date endTime,
+ String[] userIds, String[] partyIds) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("start_time", startTime.getTime() / 1000);
json.addProperty("end_time", endTime.getTime() / 1000);
@@ -386,7 +393,9 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
}
@Override
- public WxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer orderBy, Integer orderAsc, Integer pageIndex, Integer pageSize, String[] userIds, String[] partyIds) throws WxErrorException {
+ public WxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer orderBy, Integer orderAsc,
+ Integer pageIndex, Integer pageSize,
+ String[] userIds, String[] partyIds) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("day_begin_time", startTime.getTime() / 1000);
json.addProperty("order_by", orderBy == null ? 1 : orderBy);
@@ -617,7 +626,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
* @throws WxErrorException the wx error exception
*/
@Override
- public WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime, String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException {
+ public WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime,
+ String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("chat_type", chatType);
json.addProperty("start_time", startTime.getTime() / 1000);
@@ -843,13 +853,15 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
@Override
public WxCpInterceptRuleResultResp addInterceptRule(WxCpInterceptRuleResp ruleResp) throws WxErrorException {
return WxCpInterceptRuleResultResp
- .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(ADD_INTERCEPT_RULE), ruleResp.toJson()));
+ .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(ADD_INTERCEPT_RULE),
+ ruleResp.toJson()));
}
@Override
public WxCpInterceptRuleResultResp updateInterceptRule(WxCpInterceptRuleResp ruleResp) throws WxErrorException {
return WxCpInterceptRuleResultResp
- .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(UPDATE_INTERCEPT_RULE), ruleResp.toJson()));
+ .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(UPDATE_INTERCEPT_RULE),
+ ruleResp.toJson()));
}
@Override
@@ -857,7 +869,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("rule_id", rule_id);
return WxCpBaseResp
- .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(DEL_INTERCEPT_RULE), jsonObject));
+ .fromJson(this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(DEL_INTERCEPT_RULE),
+ jsonObject));
}
@Override
@@ -908,7 +921,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
JsonObject json = new JsonObject();
json.addProperty("config_id", configId);
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_JOIN_WAY);
- String responseContent = this.mainService.post(url,json);
+ String responseContent = this.mainService.post(url, json);
return WxCpGroupJoinWayInfo.fromJson(responseContent);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImpl.java
index 6f3d4a617..a5749cbc1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImpl.java
@@ -17,8 +17,7 @@ import static me.chanjar.weixin.cp.constant.WxCpConsts.GroupRobotMsgType;
/**
* 企业微信群机器人消息发送api 实现
*
- * @author yr
- * created on 2020-08-20
+ * @author yr created on 2020-08-20
*/
@RequiredArgsConstructor
public class WxCpGroupRobotServiceImpl implements WxCpGroupRobotService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java
index f997708f6..247b1d090 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java
@@ -10,22 +10,6 @@ import me.chanjar.weixin.cp.api.WxCpKfService;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.bean.kf.*;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAdd;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAddResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountDel;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLink;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLinkResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountListResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountUpd;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfCustomerBatchGetResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgListResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendRequest;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfMsgSendResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceStateTransResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfServiceUpgradeConfigResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerListResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfServicerOpResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.util.List;
@@ -35,8 +19,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Kf.*;
/**
* 微信客服接口-服务实现
*
- * @author Fu
- * created on 2022/1/19 19:41
+ * @author Fu created on 2022/1/19 19:41
*/
@RequiredArgsConstructor
public class WxCpKfServiceImpl implements WxCpKfService {
@@ -65,7 +48,7 @@ public class WxCpKfServiceImpl implements WxCpKfService {
}
@Override
- public WxCpKfAccountListResp listAccount(Integer offset,Integer limit) throws WxErrorException {
+ public WxCpKfAccountListResp listAccount(Integer offset, Integer limit) throws WxErrorException {
String url = cpService.getWxCpConfigStorage().getApiUrl(ACCOUNT_LIST);
JsonObject json = new JsonObject();
if (offset != null) {
@@ -130,7 +113,7 @@ public class WxCpKfServiceImpl implements WxCpKfService {
@Override
public WxCpKfServiceStateTransResp transServiceState(String openKfid, String externalUserId,
- Integer serviceState, String servicerUserId) throws WxErrorException {
+ Integer serviceState, String servicerUserId) throws WxErrorException {
String url = cpService.getWxCpConfigStorage().getApiUrl(SERVICE_STATE_TRANS);
JsonObject json = new JsonObject();
@@ -149,16 +132,16 @@ public class WxCpKfServiceImpl implements WxCpKfService {
String url = cpService.getWxCpConfigStorage().getApiUrl(SYNC_MSG);
JsonObject json = new JsonObject();
- if (cursor!=null) {
+ if (cursor != null) {
json.addProperty("cursor", cursor);
}
- if (token!=null) {
+ if (token != null) {
json.addProperty("token", token);
}
- if (limit!=null) {
+ if (limit != null) {
json.addProperty("limit", limit);
}
- if (voiceFormat!=null) {
+ if (voiceFormat != null) {
json.addProperty("voice_format", voiceFormat);
}
@@ -208,7 +191,7 @@ public class WxCpKfServiceImpl implements WxCpKfService {
@Override
public WxCpBaseResp upgradeMemberService(String openKfid, String externalUserId,
- String userid, String wording) throws WxErrorException {
+ String userid, String wording) throws WxErrorException {
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_UPGRADE_SERVICE);
JsonObject json = new JsonObject();
@@ -227,7 +210,7 @@ public class WxCpKfServiceImpl implements WxCpKfService {
@Override
public WxCpBaseResp upgradeGroupchatService(String openKfid, String externalUserId,
- String chatId, String wording) throws WxErrorException {
+ String chatId, String wording) throws WxErrorException {
String url = cpService.getWxCpConfigStorage().getApiUrl(CUSTOMER_UPGRADE_SERVICE);
JsonObject json = new JsonObject();
@@ -255,6 +238,7 @@ public class WxCpKfServiceImpl implements WxCpKfService {
String response = cpService.post(url, json);
return WxCpBaseResp.fromJson(response);
}
+
@Override
public WxCpKfGetCorpStatisticResp getCorpStatistic(WxCpKfGetCorpStatisticRequest request) throws WxErrorException {
String url = cpService.getWxCpConfigStorage().getApiUrl(GET_CORP_STATISTIC);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpLivingServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpLivingServiceImpl.java
index cbdae00dc..b3d9e9a36 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpLivingServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpLivingServiceImpl.java
@@ -20,8 +20,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Living.*;
* 企业微信直播接口实现类.
* https://developer.work.weixin.qq.com/document/path/93633
*
- * @author Wang_Wong
- * created on 2021-12-21
+ * @author Wang_Wong created on 2021-12-21
*/
@Slf4j
@RequiredArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImpl.java
index 8e88aa20e..7953d69e3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImpl.java
@@ -39,7 +39,8 @@ public class WxCpMediaServiceImpl implements WxCpMediaService {
}
@Override
- public WxMediaUploadResult upload(String mediaType, String filename, String url) throws WxErrorException, IOException {
+ public WxMediaUploadResult upload(String mediaType, String filename, String url) throws WxErrorException,
+ IOException {
HttpURLConnection conn = null;
InputStream inputStream = null;
try {
@@ -50,7 +51,9 @@ public class WxCpMediaServiceImpl implements WxCpMediaService {
//防止屏蔽程序抓取而返回403错误
conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
inputStream = conn.getInputStream();
- return this.mainService.execute(MediaInputStreamUploadRequestExecutor.create(this.mainService.getRequestHttp()), this.mainService.getWxCpConfigStorage().getApiUrl(MEDIA_UPLOAD + mediaType), new InputStreamData(inputStream, filename));
+ return this.mainService.execute(MediaInputStreamUploadRequestExecutor.create(this.mainService.getRequestHttp())
+ , this.mainService.getWxCpConfigStorage().getApiUrl(MEDIA_UPLOAD + mediaType),
+ new InputStreamData(inputStream, filename));
} finally {
if (inputStream != null) {
try {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
index 717b559c0..3d74f8249 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
@@ -12,8 +12,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 消息推送接口实现类.
*
- * @author Binary Wang
- * created on 2020-08-30
+ * @author Binary Wang created on 2020-08-30
*/
@RequiredArgsConstructor
public class WxCpMessageServiceImpl implements WxCpMessageService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMsgAuditServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMsgAuditServiceImpl.java
index b25c7585b..5f7cbf52a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMsgAuditServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMsgAuditServiceImpl.java
@@ -27,8 +27,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.MsgAudit.*;
/**
* 会话内容存档接口实现类.
*
- * @author Wang_Wong
- * created on 2022-01-17
+ * @author Wang_Wong created on 2022-01-17
*/
@Slf4j
@RequiredArgsConstructor
@@ -36,7 +35,8 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
private final WxCpService cpService;
@Override
- public WxCpChatDatas getChatDatas(long seq, @NonNull long limit, String proxy, String passwd, @NonNull long timeout) throws Exception {
+ public WxCpChatDatas getChatDatas(long seq, @NonNull long limit, String proxy, String passwd,
+ @NonNull long timeout) throws Exception {
String configPath = cpService.getWxCpConfigStorage().getMsgAuditLibPath();
if (StringUtils.isEmpty(configPath)) {
throw new WxErrorException("请配置会话存档sdk文件的路径,不要配错了!!");
@@ -45,7 +45,8 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
/**
* 完整的文件库路径:
*
- * /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
+ * /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,
+ * libWeWorkFinanceSdk_Java.so
*/
// 替换斜杠
String replacePath = configPath.replace("\\", "/");
@@ -78,7 +79,8 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
Finance.loadingLibraries(osLib, prefixPath);
long sdk = Finance.NewSdk();
- long ret = Finance.Init(sdk, cpService.getWxCpConfigStorage().getCorpId(), cpService.getWxCpConfigStorage().getCorpSecret());
+ long ret = Finance.Init(sdk, cpService.getWxCpConfigStorage().getCorpId(),
+ cpService.getWxCpConfigStorage().getCorpSecret());
if (ret != 0) {
Finance.DestroySdk(sdk);
throw new WxErrorException("init sdk err ret " + ret);
@@ -106,11 +108,21 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
}
@Override
- public WxCpChatModel getDecryptData(@NonNull long sdk, @NonNull WxCpChatDatas.WxCpChatData chatData, @NonNull Integer pkcs1) throws Exception {
+ public WxCpChatModel getDecryptData(@NonNull long sdk, @NonNull WxCpChatDatas.WxCpChatData chatData,
+ @NonNull Integer pkcs1) throws Exception {
String plainText = this.decryptChatData(sdk, chatData, pkcs1);
return WxCpChatModel.fromJson(plainText);
}
+ /**
+ * Decrypt chat data string.
+ *
+ * @param sdk the sdk
+ * @param chatData the chat data
+ * @param pkcs1 the pkcs 1
+ * @return the string
+ * @throws Exception the exception
+ */
public String decryptChatData(long sdk, WxCpChatDatas.WxCpChatData chatData, Integer pkcs1) throws Exception {
/**
* 企业获取的会话内容,使用企业自行配置的消息加密公钥进行加密,企业可用自行保存的私钥解开会话内容数据。
@@ -148,16 +160,19 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
}
@Override
- public String getChatPlainText(@NonNull long sdk, WxCpChatDatas.@NonNull WxCpChatData chatData, @NonNull Integer pkcs1) throws Exception {
+ public String getChatPlainText(@NonNull long sdk, WxCpChatDatas.@NonNull WxCpChatData chatData,
+ @NonNull Integer pkcs1) throws Exception {
return this.decryptChatData(sdk, chatData, pkcs1);
}
@Override
- public void getMediaFile(@NonNull long sdk, @NonNull String sdkfileid, String proxy, String passwd, @NonNull long timeout, @NonNull String targetFilePath) throws WxErrorException {
+ public void getMediaFile(@NonNull long sdk, @NonNull String sdkfileid, String proxy, String passwd,
+ @NonNull long timeout, @NonNull String targetFilePath) throws WxErrorException {
/**
* 1、媒体文件每次拉取的最大size为512k,因此超过512k的文件需要分片拉取。
* 2、若该文件未拉取完整,sdk的IsMediaDataFinish接口会返回0,同时通过GetOutIndexBuf接口返回下次拉取需要传入GetMediaData的indexbuf。
- * 3、indexbuf一般格式如右侧所示,”Range:bytes=524288-1048575“:表示这次拉取的是从524288到1048575的分片。单个文件首次拉取填写的indexbuf为空字符串,拉取后续分片时直接填入上次返回的indexbuf即可。
+ * 3、indexbuf一般格式如右侧所示,”Range:bytes=524288-1048575“:表示这次拉取的是从524288到1048575的分片。单个文件首次拉取填写的indexbuf
+ * 为空字符串,拉取后续分片时直接填入上次返回的indexbuf即可。
*/
File targetFile = new File(targetFilePath);
if (!targetFile.getParentFile().exists()) {
@@ -177,7 +192,8 @@ public class WxCpMsgAuditServiceImpl implements WxCpMsgAuditService {
}
data_len += Finance.GetDataLen(mediaData);
- log.info("正在分片拉取媒体文件 len:{}, data_len:{}, is_finis:{} \n", Finance.GetIndexLen(mediaData), data_len, Finance.IsMediaDataFinish(mediaData));
+ log.info("正在分片拉取媒体文件 len:{}, data_len:{}, is_finis:{} \n", Finance.GetIndexLen(mediaData), data_len,
+ Finance.IsMediaDataFinish(mediaData));
try {
// 大于512k的文件会分片拉取,此处需要使用追加写,避免后面的分片覆盖之前的数据。
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
index aac6e01a4..f5bd61ba9 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
@@ -67,7 +67,9 @@ public class WxCpOAuth2ServiceImpl implements WxCpOAuth2Service {
@Override
public WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException {
- String responseText = this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_INFO), code, agentId), null);
+ String responseText =
+ this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_INFO), code,
+ agentId), null);
JsonObject jo = GsonParser.parse(responseText);
return WxCpOauth2UserInfo.builder()
@@ -84,7 +86,9 @@ public class WxCpOAuth2ServiceImpl implements WxCpOAuth2Service {
@Override
public WxCpOauth2UserInfo getSchoolUserInfo(String code) throws WxErrorException {
- String responseText = this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_SCHOOL_USER_INFO), code), null);
+ String responseText =
+ this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_SCHOOL_USER_INFO),
+ code), null);
JsonObject jo = GsonParser.parse(responseText);
return WxCpOauth2UserInfo.builder()
@@ -98,7 +102,8 @@ public class WxCpOAuth2ServiceImpl implements WxCpOAuth2Service {
public WxCpUserDetail getUserDetail(String userTicket) throws WxErrorException {
JsonObject param = new JsonObject();
param.addProperty("user_ticket", userTicket);
- String responseText = this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_DETAIL), param.toString());
+ String responseText = this.mainService.post(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_DETAIL),
+ param.toString());
return WxCpGsonBuilder.create().fromJson(responseText, WxCpUserDetail.class);
}
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaAgentServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaAgentServiceImpl.java
index d305a84a3..250ee0cb2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaAgentServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaAgentServiceImpl.java
@@ -17,8 +17,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.GET_OPEN_APPROV
/**
* 企业微信自建应用接口实现类.
*
- * @author Wang_Wong
- * created on 2022-04-06
+ * @author Wang_Wong created on 2022-04-06
*/
@Slf4j
@RequiredArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImpl.java
index da81181e6..ef2420449 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImpl.java
@@ -17,8 +17,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
* .
*
- * @author Binary Wang
- * created on 2020-09-20
+ * @author Binary Wang created on 2020-09-20
*/
@RequiredArgsConstructor
public class WxCpOaCalendarServiceImpl implements WxCpOaCalendarService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImpl.java
index 2bf5b0d57..f486028a0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImpl.java
@@ -7,7 +7,6 @@ import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.cp.api.WxCpOaMeetingRoomService;
import me.chanjar.weixin.cp.api.WxCpService;
-
import me.chanjar.weixin.cp.bean.oa.meetingroom.WxCpOaMeetingRoom;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
@@ -16,9 +15,10 @@ import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
+ * The type Wx cp oa meeting room service.
+ *
* @author fcat
- * @version 1.0
- * Create by 2022/8/12 23:49
+ * @version 1.0 Create by 2022/8/12 23:49
*/
@RequiredArgsConstructor
public class WxCpOaMeetingRoomServiceImpl implements WxCpOaMeetingRoomService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaOaScheduleServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaOaScheduleServiceImpl.java
index cd9d4ede6..c9a6161b2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaOaScheduleServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaOaScheduleServiceImpl.java
@@ -21,8 +21,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
* 企业微信日程接口实现类.
*
- * @author Binary Wang
- * created on 2020-12-25
+ * @author Binary Wang created on 2020-12-25
*/
@Slf4j
@RequiredArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaServiceImpl.java
index b524bf4d3..289968757 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaServiceImpl.java
@@ -24,8 +24,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
* 企业微信 OA 接口实现
*
- * @author Element
- * created on 2019-04-06 11:20
+ * @author Element created on 2019-04-06 11:20
*/
@RequiredArgsConstructor
public class WxCpOaServiceImpl implements WxCpOaService {
@@ -42,7 +41,8 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}
@Override
- public List getCheckinData(Integer openCheckinDataType, @NonNull Date startTime, @NonNull Date endTime,
+ public List getCheckinData(Integer openCheckinDataType, @NonNull Date startTime,
+ @NonNull Date endTime,
List userIdList) throws WxErrorException {
if (userIdList == null || userIdList.size() > USER_IDS_LIMIT) {
throw new WxRuntimeException("用户列表不能为空,不超过 " + USER_IDS_LIMIT + " 个,若用户超过 " + USER_IDS_LIMIT + " 个,请分批获取");
@@ -197,7 +197,8 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}
@Override
- public WxCpBaseResp setOneUserQuota(@NonNull String userId, @NonNull Integer vacationId, @NonNull Integer leftDuration, @NonNull Integer timeAttr, String remarks) throws WxErrorException {
+ public WxCpBaseResp setOneUserQuota(@NonNull String userId, @NonNull Integer vacationId,
+ @NonNull Integer leftDuration, @NonNull Integer timeAttr, String remarks) throws WxErrorException {
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(SET_ONE_USER_QUOTA);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("userid", userId);
@@ -259,7 +260,8 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}
@Override
- public List getCheckinDayData(@NonNull Date startTime, @NonNull Date endTime, List userIdList)
+ public List getCheckinDayData(@NonNull Date startTime, @NonNull Date endTime,
+ List userIdList)
throws WxErrorException {
if (userIdList == null || userIdList.size() > USER_IDS_LIMIT) {
throw new WxRuntimeException("用户列表不能为空,不超过 " + USER_IDS_LIMIT + " 个,若用户超过 " + USER_IDS_LIMIT + " 个,请分批获取");
@@ -289,7 +291,8 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}
@Override
- public List getCheckinMonthData(@NonNull Date startTime, @NonNull Date endTime, List userIdList)
+ public List getCheckinMonthData(@NonNull Date startTime, @NonNull Date endTime,
+ List userIdList)
throws WxErrorException {
if (userIdList == null || userIdList.size() > USER_IDS_LIMIT) {
throw new WxRuntimeException("用户列表不能为空,不超过 " + USER_IDS_LIMIT + " 个,若用户超过 " + USER_IDS_LIMIT + " 个,请分批获取");
@@ -319,7 +322,8 @@ public class WxCpOaServiceImpl implements WxCpOaService {
}
@Override
- public List getCheckinScheduleList(@NonNull Date startTime, @NonNull Date endTime, List userIdList)
+ public List getCheckinScheduleList(@NonNull Date startTime, @NonNull Date endTime,
+ List userIdList)
throws WxErrorException {
if (userIdList == null || userIdList.size() > USER_IDS_LIMIT) {
throw new WxRuntimeException("用户列表不能为空,不超过 " + USER_IDS_LIMIT + " 个,若用户超过 " + USER_IDS_LIMIT + " 个,请分批获取");
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaWeDriveServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaWeDriveServiceImpl.java
index 3d5bb22f0..979e86e55 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaWeDriveServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOaWeDriveServiceImpl.java
@@ -17,8 +17,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
* 企业微信微盘接口实现类.
*
- * @author Wang_Wong
- * created on 2022-04-22
+ * @author Wang_Wong created on 2022-04-22
*/
@Slf4j
@RequiredArgsConstructor
@@ -126,7 +125,8 @@ public class WxCpOaWeDriveServiceImpl implements WxCpOaWeDriveService {
}
@Override
- public WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId, @NonNull String fatherId, @NonNull Integer fileType, @NonNull String fileName) throws WxErrorException {
+ public WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId, @NonNull String fatherId,
+ @NonNull Integer fileType, @NonNull String fileName) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(FILE_CREATE);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("userid", userId);
@@ -168,7 +168,8 @@ public class WxCpOaWeDriveServiceImpl implements WxCpOaWeDriveService {
}
@Override
- public WxCpBaseResp fileSetting(@NonNull String userId, @NonNull String fileId, @NonNull Integer authScope, Integer auth) throws WxErrorException {
+ public WxCpBaseResp fileSetting(@NonNull String userId, @NonNull String fileId, @NonNull Integer authScope,
+ Integer auth) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(FILE_SETTING);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("userid", userId);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolHealthServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolHealthServiceImpl.java
index 4a96415c0..60f379da8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolHealthServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolHealthServiceImpl.java
@@ -19,8 +19,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.School.*;
/**
* 企业微信家校应用 健康上报接口实现类.
*
- * @author Wang_Wong
- * created on : 2022/5/31 9:16
+ * @author Wang_Wong created on : 2022/5/31 9:16
*/
@Slf4j
@RequiredArgsConstructor
@@ -58,7 +57,8 @@ public class WxCpSchoolHealthServiceImpl implements WxCpSchoolHealthService {
}
@Override
- public WxCpGetReportAnswer getReportAnswer(@NonNull String jobId, @NonNull String date, Integer offset, Integer limit) throws WxErrorException {
+ public WxCpGetReportAnswer getReportAnswer(@NonNull String jobId, @NonNull String date, Integer offset,
+ Integer limit) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(GET_REPORT_ANSWER);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("jobid", jobId);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolServiceImpl.java
index eab2d5445..7d8cadca3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolServiceImpl.java
@@ -21,8 +21,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.School.*;
* 企业微信家校应用 复学码相关接口实现类.
* https://developer.work.weixin.qq.com/document/path/93744
*
- * @author Wang_Wong
- * created on : 2022/6/1 14:05
+ * @author Wang_Wong created on : 2022/6/1 14:05
*/
@Slf4j
@RequiredArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolUserServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolUserServiceImpl.java
index 21c92341d..fac1689e0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolUserServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpSchoolUserServiceImpl.java
@@ -24,8 +24,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.School.*;
* 企业微信家校沟通相关接口.
* https://developer.work.weixin.qq.com/document/path/91638
*
- * @author Wang_Wong
- * created on : 2022/6/18 9:10
+ * @author Wang_Wong created on : 2022/6/18 9:10
*/
@Slf4j
@RequiredArgsConstructor
@@ -44,7 +43,8 @@ public class WxCpSchoolUserServiceImpl implements WxCpSchoolUserService {
}
@Override
- public WxCpBaseResp createStudent(@NonNull String studentUserId, @NonNull String name, @NonNull List departments) throws WxErrorException {
+ public WxCpBaseResp createStudent(@NonNull String studentUserId, @NonNull String name,
+ @NonNull List departments) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(CREATE_STUDENT);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("student_userid", studentUserId);
@@ -87,7 +87,8 @@ public class WxCpSchoolUserServiceImpl implements WxCpSchoolUserService {
}
@Override
- public WxCpBaseResp updateStudent(@NonNull String studentUserId, String newStudentUserId, String name, List departments) throws WxErrorException {
+ public WxCpBaseResp updateStudent(@NonNull String studentUserId, String newStudentUserId, String name,
+ List departments) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(UPDATE_STUDENT);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("student_userid", studentUserId);
@@ -151,7 +152,8 @@ public class WxCpSchoolUserServiceImpl implements WxCpSchoolUserService {
@Override
public WxCpUserListResult getUserList(@NonNull Integer departmentId, Integer fetchChild) throws WxErrorException {
- String apiUrl = String.format(this.cpService.getWxCpConfigStorage().getApiUrl(GET_USER_LIST), departmentId, fetchChild);
+ String apiUrl = String.format(this.cpService.getWxCpConfigStorage().getApiUrl(GET_USER_LIST), departmentId,
+ fetchChild);
String responseContent = this.cpService.get(apiUrl, null);
return WxCpUserListResult.fromJson(responseContent);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceApacheHttpClientImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceApacheHttpClientImpl.java
index b428bc34a..7e69152a1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceApacheHttpClientImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceApacheHttpClientImpl.java
@@ -1,8 +1,8 @@
package me.chanjar.weixin.cp.api.impl;
-import me.chanjar.weixin.common.enums.WxType;
import me.chanjar.weixin.common.bean.WxAccessToken;
+import me.chanjar.weixin.common.enums.WxType;
import me.chanjar.weixin.common.error.WxError;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.error.WxRuntimeException;
@@ -21,6 +21,8 @@ import org.apache.http.impl.client.CloseableHttpClient;
import java.io.IOException;
/**
+ * The type Wx cp service apache http client.
+ *
* @author someone
*/
public class WxCpServiceApacheHttpClientImpl extends BaseWxCpServiceImpl {
@@ -49,7 +51,8 @@ public class WxCpServiceApacheHttpClientImpl extends BaseWxCpServiceImpl {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceOkHttpImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceOkHttpImpl.java
index 5fb5a7375..733f68e24 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceOkHttpImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpServiceOkHttpImpl.java
@@ -1,8 +1,8 @@
package me.chanjar.weixin.cp.api.impl;
import lombok.extern.slf4j.Slf4j;
-import me.chanjar.weixin.common.enums.WxType;
import me.chanjar.weixin.common.bean.WxAccessToken;
+import me.chanjar.weixin.common.enums.WxType;
import me.chanjar.weixin.common.error.WxError;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.http.HttpType;
@@ -15,6 +15,8 @@ import java.io.IOException;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.GET_TOKEN;
/**
+ * The type Wx cp service ok http.
+ *
* @author someone
*/
@Slf4j
@@ -48,7 +50,8 @@ public class WxCpServiceOkHttpImpl extends BaseWxCpServiceImpl
@@ -18,8 +19,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.TaskCard.*;
* Created by Jeff on 2019-05-16.
*
*
- * @author Jeff
- * created on 2019-05-16
+ * @author Jeff created on 2019-05-16
*/
@RequiredArgsConstructor
public class WxCpTaskCardServiceImpl implements WxCpTaskCardService {
@@ -41,8 +41,8 @@ public class WxCpTaskCardServiceImpl implements WxCpTaskCardService {
@Override
public void updateTemplateCardButton(List userIds, List partyIds,
- List tagIds, Integer atAll,
- String responseCode, String replaceName) throws WxErrorException {
+ List tagIds, Integer atAll,
+ String responseCode, String replaceName) throws WxErrorException {
Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
Map data = new HashMap<>(7);
data.put("userids", userIds);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/Gender.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/Gender.java
index 99da96262..b47697ffa 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/Gender.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/Gender.java
@@ -30,6 +30,12 @@ public enum Gender {
private final String genderName;
private final String code;
+ /**
+ * From code gender.
+ *
+ * @param code the code
+ * @return the gender
+ */
public static Gender fromCode(String code) {
for (Gender a : Gender.values()) {
if (a.code.equals(code)) {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
index 04b0dd72e..898ca78b5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
@@ -70,14 +70,28 @@ public class WxCpAgent implements Serializable {
@SerializedName("home_url")
private String homeUrl;
+ /**
+ * From json wx cp agent.
+ *
+ * @param json the json
+ * @return the wx cp agent
+ */
public static WxCpAgent fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpAgent.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Users.
+ */
@Data
public static class Users implements Serializable {
private static final long serialVersionUID = 8801100463558788565L;
@@ -86,6 +100,9 @@ public class WxCpAgent implements Serializable {
private List users;
}
+ /**
+ * The type User.
+ */
@Data
public static class User implements Serializable {
private static final long serialVersionUID = 7287632514385508024L;
@@ -94,12 +111,18 @@ public class WxCpAgent implements Serializable {
private String userId;
}
+ /**
+ * The type Parties.
+ */
@Data
public static class Parties {
@SerializedName("partyid")
private List partyIds = null;
}
+ /**
+ * The type Tags.
+ */
@Data
public static class Tags {
@SerializedName("tagid")
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentWorkBench.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentWorkBench.java
index fc2881bda..a2737f723 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentWorkBench.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentWorkBench.java
@@ -14,9 +14,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author songshiyu
- * created on : create in 16:09 2020/9/27
- * 工作台自定义展示
+ * The type Wx cp agent work bench.
+ *
+ * @author songshiyu created on : create in 16:09 2020/9/27 工作台自定义展示
*/
@Data
@Builder
@@ -60,6 +60,8 @@ public class WxCpAgentWorkBench implements Serializable {
/**
* 生成模板Json字符串
+ *
+ * @return the string
*/
public String toTemplateString() {
JsonObject templateObject = new JsonObject();
@@ -74,6 +76,8 @@ public class WxCpAgentWorkBench implements Serializable {
/**
* 生成用户数据Json字符串
+ *
+ * @return the string
*/
public String toUserDataString() {
JsonObject userDataObject = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpBaseResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpBaseResp.java
index f1b342df0..6bf9a30ae 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpBaseResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpBaseResp.java
@@ -10,28 +10,49 @@ import java.io.Serializable;
/**
* 返回结果
*
- * @author yqx & WangWong
- * created on 2020/3/16
+ * @author yqx & WangWong created on 2020/3/16
*/
@Getter
@Setter
public class WxCpBaseResp implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
+ /**
+ * The Errcode.
+ */
@SerializedName("errcode")
protected Long errcode;
+ /**
+ * The Errmsg.
+ */
@SerializedName("errmsg")
protected String errmsg;
+ /**
+ * Success boolean.
+ *
+ * @return the boolean
+ */
public boolean success() {
return getErrcode() == 0;
}
+ /**
+ * From json wx cp base resp.
+ *
+ * @param json the json
+ * @return the wx cp base resp
+ */
public static WxCpBaseResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBaseResp.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDepart.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDepart.java
index 5c640c51c..bc54e7e80 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDepart.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDepart.java
@@ -21,10 +21,21 @@ public class WxCpDepart implements Serializable {
private Long parentId;
private Long order;
+ /**
+ * From json wx cp depart.
+ *
+ * @param json the json
+ * @return the wx cp depart
+ */
public static WxCpDepart fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpDepart.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpInviteResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpInviteResult.java
index 5ab4f5246..3cbeb7ce7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpInviteResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpInviteResult.java
@@ -21,6 +21,12 @@ public class WxCpInviteResult implements Serializable {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp invite result.
+ *
+ * @param json the json
+ * @return the wx cp invite result
+ */
public static WxCpInviteResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpInviteResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMaJsCode2SessionResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMaJsCode2SessionResult.java
index 7291489d9..f4de0b988 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMaJsCode2SessionResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMaJsCode2SessionResult.java
@@ -27,6 +27,12 @@ public class WxCpMaJsCode2SessionResult implements Serializable {
@SerializedName("corpid")
private String corpId;
+ /**
+ * From json wx cp ma js code 2 session result.
+ *
+ * @param json the json
+ * @return the wx cp ma js code 2 session result
+ */
public static WxCpMaJsCode2SessionResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMaJsCode2SessionResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOauth2UserInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOauth2UserInfo.java
index a35a37c05..433e54a68 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOauth2UserInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOauth2UserInfo.java
@@ -13,7 +13,7 @@ import java.io.Serializable;
* 用oauth2获取用户信息的结果类
* Created by BinaryWang on 2019/5/26.
*
- *
+ *
* 文档1:https://developer.work.weixin.qq.com/document/path/91707
*
* @author Binary Wang
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpProviderToken.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpProviderToken.java
index 2caac57ec..872b96d93 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpProviderToken.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpProviderToken.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
/**
* 服务商凭证.
*
- * @author Binary Wang
- * created on 2019-11-02
+ * @author Binary Wang created on 2019-11-02
*/
@Data
public class WxCpProviderToken implements Serializable {
@@ -28,6 +27,12 @@ public class WxCpProviderToken implements Serializable {
@SerializedName("expires_in")
private Integer expiresIn;
+ /**
+ * From json wx cp provider token.
+ *
+ * @param json the json
+ * @return the wx cp provider token
+ */
public static WxCpProviderToken fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpProviderToken.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTag.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTag.java
index 8649f0ced..33d3d07b2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTag.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTag.java
@@ -23,10 +23,21 @@ public class WxCpTag implements Serializable {
private String name;
+ /**
+ * From json wx cp tag.
+ *
+ * @param json the json
+ * @return the wx cp tag
+ */
public static WxCpTag fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTag.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagAddOrRemoveUsersResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagAddOrRemoveUsersResult.java
index adac17488..c590c6c0e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagAddOrRemoveUsersResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagAddOrRemoveUsersResult.java
@@ -25,6 +25,12 @@ public class WxCpTagAddOrRemoveUsersResult implements Serializable {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp tag add or remove users result.
+ *
+ * @param json the json
+ * @return the wx cp tag add or remove users result
+ */
public static WxCpTagAddOrRemoveUsersResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTagAddOrRemoveUsersResult.class);
}
@@ -41,6 +47,11 @@ public class WxCpTagAddOrRemoveUsersResult implements Serializable {
@SerializedName("invalidparty")
private String[] invalidParty;
+ /**
+ * Gets invalid user list.
+ *
+ * @return the invalid user list
+ */
public List getInvalidUserList() {
return this.content2List(this.invalidUsers);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagGetResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagGetResult.java
index 244419b06..3dc34ab65 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagGetResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTagGetResult.java
@@ -46,10 +46,21 @@ public class WxCpTagGetResult implements Serializable {
@SerializedName("tagname")
private String tagname;
+ /**
+ * From json wx cp tag get result.
+ *
+ * @param json the json
+ * @return the wx cp tag get result
+ */
public static WxCpTagGetResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTagGetResult.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTaskCardUpdateResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTaskCardUpdateResult.java
index c22bb2b8a..d4cee5549 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTaskCardUpdateResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTaskCardUpdateResult.java
@@ -16,8 +16,7 @@ import java.util.List;
* Created by Jeff on 2019-05-16.
*
*
- * @author Jeff
- * created on 2019-05-16
+ * @author Jeff created on 2019-05-16
*/
@Data
@AllArgsConstructor
@@ -36,6 +35,12 @@ public class WxCpTaskCardUpdateResult implements Serializable {
@SerializedName("invaliduser")
private List invalidUsers;
+ /**
+ * From json wx cp task card update result.
+ *
+ * @param json the json
+ * @return the wx cp task card update result
+ */
public static WxCpTaskCardUpdateResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTaskCardUpdateResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAdmin.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAdmin.java
index 438ef79fd..776726de8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAdmin.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAdmin.java
@@ -23,6 +23,9 @@ public class WxCpTpAdmin extends WxCpBaseResp {
@SerializedName("admin")
private List admin;
+ /**
+ * The type Admin.
+ */
@Getter
@Setter
public static class Admin extends WxCpBaseResp {
@@ -30,7 +33,7 @@ public class WxCpTpAdmin extends WxCpBaseResp {
@SerializedName("userid")
private String userId;
-
+
@SerializedName("open_userid")
private String openUserId;
@@ -42,6 +45,12 @@ public class WxCpTpAdmin extends WxCpBaseResp {
}
}
+ /**
+ * From json wx cp tp admin.
+ *
+ * @param json the json
+ * @return the wx cp tp admin
+ */
public static WxCpTpAdmin fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpAdmin.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAuthInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAuthInfo.java
index 1f089e762..fa5021615 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAuthInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAuthInfo.java
@@ -43,6 +43,9 @@ public class WxCpTpAuthInfo extends WxCpBaseResp {
@SerializedName("edition_info")
private EditionInfo editionInfo;
+ /**
+ * The type Dealer corp info.
+ */
@Getter
@Setter
public static class DealerCorpInfo extends WxCpBaseResp {
@@ -55,6 +58,9 @@ public class WxCpTpAuthInfo extends WxCpBaseResp {
private String corpName;
}
+ /**
+ * The type Auth corp info.
+ */
@Getter
@Setter
public static class AuthCorpInfo implements Serializable {
@@ -151,6 +157,9 @@ public class WxCpTpAuthInfo extends WxCpBaseResp {
}
+ /**
+ * The type Agent.
+ */
@Getter
@Setter
public static class Agent implements Serializable {
@@ -297,6 +306,12 @@ public class WxCpTpAuthInfo extends WxCpBaseResp {
}
+ /**
+ * From json wx cp tp auth info.
+ *
+ * @param json the json
+ * @return the wx cp tp auth info
+ */
public static WxCpTpAuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpAuthInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearch.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearch.java
index cc84dfd4d..e5e44d18a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearch.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearch.java
@@ -8,9 +8,11 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
+ * The type Wx cp tp contact search.
+ *
* @author uianz
* @description
- * @since 2020/12/23 下午 02:43
+ * @since 2020 /12/23 下午 02:43
*/
@Data
@Accessors(chain = true)
@@ -59,6 +61,11 @@ public class WxCpTpContactSearch implements Serializable {
@SerializedName("full_match_field")
private Integer fullMatchField;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearchResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearchResp.java
index 21db4e083..5646d5f10 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearchResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpContactSearchResp.java
@@ -9,9 +9,11 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Wx cp tp contact search resp.
+ *
* @author uianz
* @description
- * @since 2020/12/23 下午 02:55
+ * @since 2020 /12/23 下午 02:55
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -23,6 +25,9 @@ public class WxCpTpContactSearchResp extends WxCpBaseResp {
@SerializedName("query_result")
private QueryResult queryResult;
+ /**
+ * The type Query result.
+ */
@Data
public static class QueryResult implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
@@ -32,6 +37,9 @@ public class WxCpTpContactSearchResp extends WxCpBaseResp {
@SerializedName("party")
private Party party;
+ /**
+ * The type User.
+ */
@Data
public static class User implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
@@ -41,6 +49,9 @@ public class WxCpTpContactSearchResp extends WxCpBaseResp {
private List openUserId;
}
+ /**
+ * The type Party.
+ */
@Data
public static class Party implements Serializable {
private static final long serialVersionUID = -4301684507150486556L;
@@ -51,6 +62,12 @@ public class WxCpTpContactSearchResp extends WxCpBaseResp {
}
+ /**
+ * From json wx cp tp contact search resp.
+ *
+ * @param json the json
+ * @return the wx cp tp contact search resp
+ */
public static WxCpTpContactSearchResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpContactSearchResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpCorp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpCorp.java
index efe6d8285..939a4eddf 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpCorp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpCorp.java
@@ -32,10 +32,21 @@ public class WxCpTpCorp implements Serializable {
@SerializedName("auth_info")
private String authInfo;
+ /**
+ * From json wx cp tp corp.
+ *
+ * @param json the json
+ * @return the wx cp tp corp
+ */
public static WxCpTpCorp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpCorp.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpDepart.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpDepart.java
index ab94a6b6b..39d3601a2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpDepart.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpDepart.java
@@ -20,10 +20,21 @@ public class WxCpTpDepart implements Serializable {
private Integer parentid;
private Integer order;
+ /**
+ * From json wx cp tp depart.
+ *
+ * @param json the json
+ * @return the wx cp tp depart
+ */
public static WxCpTpDepart fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpDepart.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java
index eaf10feae..7293ccf30 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java
@@ -45,7 +45,7 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
*/
@SerializedName("auth_user_info")
private AuthUserInfo authUserInfo;
-
+
/**
* 推广二维码安装相关信息
*/
@@ -58,6 +58,9 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
@SerializedName("edition_info")
private EditionInfo editionInfo;
+ /**
+ * The type Auth corp info.
+ */
@Getter
@Setter
public static class AuthCorpInfo implements Serializable {
@@ -154,6 +157,9 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
}
+ /**
+ * The type Agent.
+ */
@Getter
@Setter
public static class Agent implements Serializable {
@@ -284,7 +290,7 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
@SerializedName("open_userid")
private String openUserid;
}
-
+
/**
* 推广二维码安装相关信息
*/
@@ -353,6 +359,12 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
}
+ /**
+ * From json wx cp tp permanent code info.
+ *
+ * @param json the json
+ * @return the wx cp tp permanent code info
+ */
public static WxCpTpPermanentCodeInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpPermanentCodeInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPreauthCode.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPreauthCode.java
index 6dc9ddc2d..31c61b3a2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPreauthCode.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPreauthCode.java
@@ -8,19 +8,30 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 预授权码返回
*
- * @author yqx
- * created on 2020/3/19
+ * @author yqx created on 2020/3/19
*/
@Getter
@Setter
public class WxCpTpPreauthCode extends WxCpBaseResp {
+ /**
+ * The Pre auth code.
+ */
@SerializedName("pre_auth_code")
String preAuthCode;
+ /**
+ * The Expires in.
+ */
@SerializedName("expires_in")
Long expiresIn;
+ /**
+ * From json wx cp tp preauth code.
+ *
+ * @param json the json
+ * @return the wx cp tp preauth code
+ */
public static WxCpTpPreauthCode fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpPreauthCode.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpProlongTryResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpProlongTryResult.java
index 8d89f0de6..427e020a2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpProlongTryResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpProlongTryResult.java
@@ -7,8 +7,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 应用市场延长试用期结果
- * @author leiguoqing
- * created on 2022年4月24日
+ *
+ * @author leiguoqing created on 2022年4月24日
*/
@Getter
@Setter
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTag.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTag.java
index 73d7a5157..74e1fec3f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTag.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTag.java
@@ -7,8 +7,10 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
+ * The type Wx cp tp tag.
+ *
* @author zhangq
- * @since 2021-02-14 16:15 16:15
+ * @since 2021 -02-14 16:15 16:15
*/
@Data
public class WxCpTpTag implements Serializable {
@@ -20,6 +22,12 @@ public class WxCpTpTag implements Serializable {
@SerializedName("tagname")
private String tagName;
+ /**
+ * Deserialize wx cp tp tag.
+ *
+ * @param json the json
+ * @return the wx cp tp tag
+ */
public static WxCpTpTag deserialize(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpTag.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagAddOrRemoveUsersResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagAddOrRemoveUsersResult.java
index 8a9fecf21..dfbf25048 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagAddOrRemoveUsersResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagAddOrRemoveUsersResult.java
@@ -6,11 +6,17 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
* 企业微信第三方开发-增加标签成员成员api响应体
*
* @author zhangq
- * @since 2021/2/14 16:44
+ * @since 2021 /2/14 16:44
*/
public class WxCpTpTagAddOrRemoveUsersResult extends WxCpTagAddOrRemoveUsersResult {
private static final long serialVersionUID = 3490401800490702052L;
+ /**
+ * Deserialize wx cp tp tag add or remove users result.
+ *
+ * @param json the json
+ * @return the wx cp tp tag add or remove users result
+ */
public static WxCpTpTagAddOrRemoveUsersResult deserialize(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpTagAddOrRemoveUsersResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagGetResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagGetResult.java
index 4fdc9a58a..162030c95 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagGetResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpTagGetResult.java
@@ -6,11 +6,17 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
* 获取标签成员接口响应体
*
* @author zhangq
- * @since 2021/2/14 16:28
+ * @since 2021 /2/14 16:28
*/
public class WxCpTpTagGetResult extends WxCpTagGetResult {
private static final long serialVersionUID = 9051748686315562400L;
+ /**
+ * Deserialize wx cp tp tag get result.
+ *
+ * @param json the json
+ * @return the wx cp tp tag get result
+ */
public static WxCpTpTagGetResult deserialize(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpTagGetResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserDetail.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserDetail.java
index 280939125..a60d387a7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserDetail.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserDetail.java
@@ -6,6 +6,8 @@ import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
+ * The type Wx cp tp user detail.
+ *
* @author huangxiaoming
*/
@Data
@@ -48,6 +50,12 @@ public class WxCpTpUserDetail extends WxCpBaseResp {
@SerializedName("qr_code")
private String qrCode;
+ /**
+ * From json wx cp tp user detail.
+ *
+ * @param json the json
+ * @return the wx cp tp user detail
+ */
public static WxCpTpUserDetail fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpUserDetail.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserInfo.java
index 0138b2a9d..c6664fd0a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpUserInfo.java
@@ -6,9 +6,10 @@ import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
+ * The type Wx cp tp user info.
+ *
* @author huangxiaoming
*/
-
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpTpUserInfo extends WxCpBaseResp {
@@ -53,6 +54,12 @@ public class WxCpTpUserInfo extends WxCpBaseResp {
@SerializedName("open_userid")
private String openUserId;
+ /**
+ * From json wx cp tp user info.
+ *
+ * @param json the json
+ * @return the wx cp tp user info
+ */
public static WxCpTpUserInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpUserInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpXmlPackage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpXmlPackage.java
index 4d9d9493a..cdba33229 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpXmlPackage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpXmlPackage.java
@@ -26,18 +26,33 @@ public class WxCpTpXmlPackage implements Serializable {
*/
private Map allFieldsMap;
+ /**
+ * The To user name.
+ */
@XStreamAlias("ToUserName")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String toUserName;
+ /**
+ * The Agent id.
+ */
@XStreamAlias("AgentID")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String agentId;
+ /**
+ * The Msg encrypt.
+ */
@XStreamAlias("Encrypt")
@XStreamConverter(value = XStreamCDataConverter.class)
protected String msgEncrypt;
+ /**
+ * From xml wx cp tp xml package.
+ *
+ * @param xml the xml
+ * @return the wx cp tp xml package
+ */
public static WxCpTpXmlPackage fromXml(String xml) {
//修改微信变态的消息内容格式,方便解析
//xml = xml.replace("", "");
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUser.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUser.java
index 776e347ce..681152c29 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUser.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUser.java
@@ -74,26 +74,56 @@ public class WxCpUser implements Serializable {
private String[] directLeader;
+ /**
+ * Add external attr.
+ *
+ * @param externalAttr the external attr
+ */
public void addExternalAttr(ExternalAttribute externalAttr) {
this.externalAttrs.add(externalAttr);
}
+ /**
+ * Add ext attr.
+ *
+ * @param name the name
+ * @param value the value
+ */
public void addExtAttr(String name, String value) {
this.extAttrs.add(new Attr().setType(0).setName(name).setTextValue(value));
}
+ /**
+ * Add ext attr.
+ *
+ * @param attr the attr
+ */
public void addExtAttr(Attr attr) {
this.extAttrs.add(attr);
}
+ /**
+ * From json wx cp user.
+ *
+ * @param json the json
+ * @return the wx cp user
+ */
public static WxCpUser fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUser.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Attr.
+ */
@Data
@Accessors(chain = true)
@Builder
@@ -112,6 +142,9 @@ public class WxCpUser implements Serializable {
private String webTitle;
}
+ /**
+ * The type External attribute.
+ */
@Data
@Builder
@NoArgsConstructor
@@ -151,6 +184,9 @@ public class WxCpUser implements Serializable {
}
+ /**
+ * The type Wechat channels.
+ */
@Data
@Builder
@NoArgsConstructor
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUserExternalContactInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUserExternalContactInfo.java
index ca6ebb8bb..562bf82ed 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUserExternalContactInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUserExternalContactInfo.java
@@ -27,6 +27,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
@SerializedName("follow_user")
private List followedUsers;
+ /**
+ * The type External contact.
+ */
@Getter
@Setter
public static class ExternalContact implements Serializable {
@@ -63,6 +66,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
private ExternalProfile externalProfile;
}
+ /**
+ * The type External profile.
+ */
@Setter
@Getter
public static class ExternalProfile implements Serializable {
@@ -72,6 +78,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
private List externalAttrs;
}
+ /**
+ * The type External attribute.
+ */
@Data
@Builder
@NoArgsConstructor
@@ -79,6 +88,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
public static class ExternalAttribute implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
+ /**
+ * The type Text.
+ */
@Setter
@Getter
public static class Text implements Serializable {
@@ -87,6 +99,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
private String value;
}
+ /**
+ * The type Web.
+ */
@Setter
@Getter
public static class Web implements Serializable {
@@ -96,6 +111,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
private String url;
}
+ /**
+ * The type Mini program.
+ */
@Setter
@Getter
public static class MiniProgram implements Serializable {
@@ -119,6 +137,9 @@ public class WxCpUserExternalContactInfo implements Serializable {
private MiniProgram miniProgram;
}
+ /**
+ * The type Followed user.
+ */
@Setter
@Getter
public static class FollowedUser implements Serializable {
@@ -143,10 +164,19 @@ public class WxCpUserExternalContactInfo implements Serializable {
}
+ /**
+ * From json wx cp user external contact info.
+ *
+ * @param json the json
+ * @return the wx cp user external contact info
+ */
public static WxCpUserExternalContactInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalContactInfo.class);
}
+ /**
+ * The type Tag.
+ */
@Setter
@Getter
public static class Tag implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUserid.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUserid.java
index 2b5cfd435..5f2f082a7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUserid.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUserid.java
@@ -11,7 +11,6 @@ import java.io.Serializable;
* 将自建应用或代开发应用获取的userid转换为第三方应用的userid
* 中间对象
* Created by gxh0797 on 2022.07.26.
- *
*/
@Data
public class WxCpUseridToOpenUserid implements Serializable {
@@ -22,6 +21,12 @@ public class WxCpUseridToOpenUserid implements Serializable {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp userid to open userid.
+ *
+ * @param json the json
+ * @return the wx cp userid to open userid
+ */
public static WxCpUseridToOpenUserid fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUseridToOpenUserid.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUseridResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUseridResult.java
index 90d002f17..360772883 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUseridResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUseridResult.java
@@ -11,7 +11,6 @@ import java.util.List;
* userid转换为open_userid
* 将自建应用或代开发应用获取的userid转换为第三方应用的userid
* Created by gxh0797 on 2022.07.26.
- *
*/
@Data
public class WxCpUseridToOpenUseridResult implements Serializable {
@@ -22,6 +21,12 @@ public class WxCpUseridToOpenUseridResult implements Serializable {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp userid to open userid result.
+ *
+ * @param json the json
+ * @return the wx cp userid to open userid result
+ */
public static WxCpUseridToOpenUseridResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUseridToOpenUseridResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxTpLoginInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxTpLoginInfo.java
index 19ee03e68..5cadc6bca 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxTpLoginInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxTpLoginInfo.java
@@ -11,9 +11,8 @@ import java.util.List;
/**
* 登录信息
*
- * @author Jamie.shi
- * created on 2020-08-03 17:18
- **/
+ * @author Jamie.shi created on 2020-08-03 17:18
+ */
@Data
@EqualsAndHashCode(callSuper = true)
public class WxTpLoginInfo extends WxCpBaseResp {
@@ -29,10 +28,19 @@ public class WxTpLoginInfo extends WxCpBaseResp {
private AuthInfo authInfo;
private List agent;
+ /**
+ * From json wx tp login info.
+ *
+ * @param json the json
+ * @return the wx tp login info
+ */
public static WxTpLoginInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxTpLoginInfo.class);
}
+ /**
+ * The type User info.
+ */
@Data
public static class UserInfo implements Serializable {
private static final long serialVersionUID = -4558358748587735192L;
@@ -45,6 +53,9 @@ public class WxTpLoginInfo extends WxCpBaseResp {
private String avatar;
}
+ /**
+ * The type Corp info bean.
+ */
@Data
public static class CorpInfoBean implements Serializable {
private static final long serialVersionUID = -3160146744148144984L;
@@ -53,12 +64,18 @@ public class WxTpLoginInfo extends WxCpBaseResp {
private String corpId;
}
+ /**
+ * The type Auth info.
+ */
@Data
public static class AuthInfo implements Serializable {
private static final long serialVersionUID = -8697184659526210472L;
private List department;
+ /**
+ * The type Department.
+ */
@Data
public static class Department implements Serializable {
private static final long serialVersionUID = -4389328276936557541L;
@@ -68,6 +85,9 @@ public class WxTpLoginInfo extends WxCpBaseResp {
}
}
+ /**
+ * The type Agent.
+ */
@Data
public static class Agent implements Serializable {
private static final long serialVersionUID = 1461544500964159037L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java
index ed55debc3..c2b0bce03 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportRequest.java
@@ -9,15 +9,15 @@ import java.io.Serializable;
/**
* 异步导出参数
*
- * @author zhongjun
- * created on 2022/4/21
- **/
+ * @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字节,详见:http://tools.ietf.org/html/rfc2315
+ * base64encode的加密密钥,长度固定为43,base64decode之后即得到AESKey。加密方式采用AES-256-CBC方式,数据采用PKCS#7填充至32字节的倍数;IV初始向量大小为16字节,取AESKey
+ * 前16字节,详见:http://tools.ietf.org/html/rfc2315
*/
@SerializedName("encoding_aeskey")
private String encodingAesKey;
@@ -35,6 +35,11 @@ public class WxCpExportRequest implements Serializable {
@SerializedName("tagid")
private Integer tagId;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java
index b03dbeb93..86f52ab8c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/export/WxCpExportResult.java
@@ -10,9 +10,8 @@ import java.util.List;
/**
* 异步导出响应
*
- * @author zhongjun
- * created on 2022/4/21
- **/
+ * @author zhongjun created on 2022/4/21
+ */
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpExportResult extends WxCpBaseResp {
@@ -27,6 +26,9 @@ public class WxCpExportResult extends WxCpBaseResp {
private List dataList;
+ /**
+ * The type Export data.
+ */
@Data
public static class ExportData {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentResult.java
index ea055731d..1eb7ad107 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentResult.java
@@ -9,8 +9,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 企业发表内容到客户的朋友圈 创建发表任务结果
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -20,6 +19,12 @@ public class WxCpAddMomentResult extends WxCpBaseResp {
@SerializedName("jobid")
private String jobId;
+ /**
+ * From json wx cp add moment result.
+ *
+ * @param json the json
+ * @return the wx cp add moment result
+ */
public static WxCpAddMomentResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpAddMomentResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentTask.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentTask.java
index 53b2a2d11..005c4f3de 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentTask.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpAddMomentTask.java
@@ -16,8 +16,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 创建发表任务
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@Builder
@@ -31,6 +30,11 @@ public class WxCpAddMomentTask implements Serializable {
private List attachments;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayInfo.java
index 66d94da2c..3a6a61902 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayInfo.java
@@ -25,6 +25,9 @@ public class WxCpContactWayInfo implements Serializable {
@SerializedName("contact_way")
private ContactWay contactWay;
+ /**
+ * The type Contact way.
+ */
@Getter
@Setter
public static class ContactWay implements Serializable {
@@ -157,10 +160,21 @@ public class WxCpContactWayInfo implements Serializable {
*/
private Conclusion conclusions;
+ /**
+ * From json wx cp contact way info . contact way.
+ *
+ * @param json the json
+ * @return the wx cp contact way info . contact way
+ */
public static WxCpContactWayInfo.ContactWay fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpContactWayInfo.ContactWay.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
@@ -189,14 +203,28 @@ public class WxCpContactWayInfo implements Serializable {
}
+ /**
+ * From json wx cp contact way info.
+ *
+ * @param json the json
+ * @return the wx cp contact way info
+ */
public static WxCpContactWayInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpContactWayInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The enum Type.
+ */
public enum TYPE {
/**
* 单人
@@ -212,6 +240,9 @@ public class WxCpContactWayInfo implements Serializable {
}
+ /**
+ * The enum Scene.
+ */
public enum SCENE {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayResult.java
index 789dac318..157a0ecac 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpContactWayResult.java
@@ -22,6 +22,12 @@ public class WxCpContactWayResult extends WxCpBaseResp {
@SerializedName("qr_code")
private String qrCode;
+ /**
+ * From json wx cp contact way result.
+ *
+ * @param json the json
+ * @return the wx cp contact way result
+ */
public static WxCpContactWayResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpContactWayResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpExternalUserIdList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpExternalUserIdList.java
index d8cb46794..693dd8001 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpExternalUserIdList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpExternalUserIdList.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 企业客户微信unionid的升级 - 企业客户external_userid列表
*
- * @author Mr.Pan
- * created on 2021/11/18
+ * @author Mr.Pan created on 2021/11/18
*/
@Getter
@Setter
@@ -23,6 +22,9 @@ public class WxCpExternalUserIdList extends WxCpBaseResp {
@SerializedName("external_userid_info")
private List externalUserIdInfo;
+ /**
+ * The type External user id info.
+ */
@Getter
@Setter
public static class ExternalUserIdInfo implements Serializable {
@@ -48,6 +50,12 @@ public class WxCpExternalUserIdList extends WxCpBaseResp {
}
+ /**
+ * From json wx cp external user id list.
+ *
+ * @param json the json
+ * @return the wx cp external user id list
+ */
public static WxCpExternalUserIdList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpExternalUserIdList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentComments.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentComments.java
index 52e91b403..b1c914944 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentComments.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentComments.java
@@ -13,8 +13,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 获取客户朋友圈的互动数据
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -26,6 +25,9 @@ public class WxCpGetMomentComments extends WxCpBaseResp {
@SerializedName("like_list")
private List likeList;
+ /**
+ * The type Comment like item.
+ */
@Getter
@Setter
public static class CommentLikeItem {
@@ -37,6 +39,12 @@ public class WxCpGetMomentComments extends WxCpBaseResp {
private Long createTime;
}
+ /**
+ * From json wx cp get moment comments.
+ *
+ * @param json the json
+ * @return the wx cp get moment comments
+ */
public static WxCpGetMomentComments fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentComments.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentCustomerList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentCustomerList.java
index 6f2b16c8d..c10c2f69d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentCustomerList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentCustomerList.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 获取客户朋友圈发表时选择的可见范围
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -25,6 +24,12 @@ public class WxCpGetMomentCustomerList extends WxCpBaseResp {
@SerializedName("customer_list")
private List customerList;
+ /**
+ * From json wx cp get moment customer list.
+ *
+ * @param json the json
+ * @return the wx cp get moment customer list
+ */
public static WxCpGetMomentCustomerList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentCustomerList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentList.java
index 57f615b49..46b17a1b5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentList.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 获取企业全部的发表列表
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -25,6 +24,12 @@ public class WxCpGetMomentList extends WxCpBaseResp {
@SerializedName("moment_list")
private List momentList;
+ /**
+ * From json wx cp get moment list.
+ *
+ * @param json the json
+ * @return the wx cp get moment list
+ */
public static WxCpGetMomentList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentSendResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentSendResult.java
index 813e211fb..80e4f144c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentSendResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentSendResult.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 获取客户朋友圈发表后的可见客户列表
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -25,6 +24,12 @@ public class WxCpGetMomentSendResult extends WxCpBaseResp {
@SerializedName("customer_list")
private List customerList;
+ /**
+ * From json wx cp get moment send result.
+ *
+ * @param json the json
+ * @return the wx cp get moment send result
+ */
public static WxCpGetMomentSendResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentSendResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTask.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTask.java
index 506a5c56e..46740d6e0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTask.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTask.java
@@ -13,8 +13,7 @@ import java.util.List;
/**
* 企业发表内容到客户的朋友圈 获取客户朋友圈企业发表的列表
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -27,6 +26,9 @@ public class WxCpGetMomentTask extends WxCpBaseResp {
@SerializedName("task_list")
private List taskList;
+ /**
+ * The type Moment task item.
+ */
@Getter
@Setter
public static class MomentTaskItem {
@@ -36,6 +38,12 @@ public class WxCpGetMomentTask extends WxCpBaseResp {
private String publishStatus;
}
+ /**
+ * From json wx cp get moment task.
+ *
+ * @param json the json
+ * @return the wx cp get moment task
+ */
public static WxCpGetMomentTask fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentTask.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTaskResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTaskResult.java
index c34ce731c..6f6a53504 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTaskResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGetMomentTaskResult.java
@@ -13,8 +13,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 企业发表内容到客户的朋友圈 获取任务创建结果
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -25,6 +24,9 @@ public class WxCpGetMomentTaskResult extends WxCpBaseResp {
private String type;
private TaskResult result;
+ /**
+ * The type Task result.
+ */
@Getter
@Setter
public static class TaskResult extends WxCpBaseResp {
@@ -37,6 +39,12 @@ public class WxCpGetMomentTaskResult extends WxCpBaseResp {
@SerializedName("invalid_external_contact_list")
private ExternalContactList invalidExternalContactList;
+ /**
+ * From json task result.
+ *
+ * @param json the json
+ * @return the task result
+ */
public static TaskResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, TaskResult.class);
}
@@ -46,6 +54,12 @@ public class WxCpGetMomentTaskResult extends WxCpBaseResp {
}
}
+ /**
+ * From json wx cp get moment task result.
+ *
+ * @param json the json
+ * @return the wx cp get moment task result
+ */
public static WxCpGetMomentTaskResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetMomentTaskResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayInfo.java
index a78aa9098..c181f82bd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayInfo.java
@@ -11,18 +11,23 @@ import java.io.Serializable;
import java.util.List;
/**
- *客户群「加入群聊」对象
+ * 客户群「加入群聊」对象
+ *
* @author Jc
*/
@Data
@NoArgsConstructor
-public class WxCpGroupJoinWayInfo implements Serializable {
+public class WxCpGroupJoinWayInfo implements Serializable {
private static final long serialVersionUID = 5621905029624794129L;
@SerializedName("join_way")
private JoinWay joinWay;
+
+ /**
+ * The type Join way.
+ */
@Getter
@Setter
- public static class JoinWay implements Serializable {
+ public static class JoinWay implements Serializable {
private static final long serialVersionUID = 5621905029624794122L;
/**
@@ -68,24 +73,47 @@ public class WxCpGroupJoinWayInfo implements Serializable {
@SerializedName("qr_code")
private String qrCode;
/**
- 企业自定义的state参数,用于区分不同的入群渠道。不超过30个UTF-8字符
- 如果有设置此参数,在调用获取客户群详情接口时会返回每个群成员对应的该参数值
+ * 企业自定义的state参数,用于区分不同的入群渠道。不超过30个UTF-8字符
+ * 如果有设置此参数,在调用获取客户群详情接口时会返回每个群成员对应的该参数值
*/
@SerializedName("state")
private String state;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
+
+ /**
+ * From json wx cp group join way info . join way.
+ *
+ * @param json the json
+ * @return the wx cp group join way info . join way
+ */
public static WxCpGroupJoinWayInfo.JoinWay fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupJoinWayInfo.JoinWay.class);
}
}
+ /**
+ * From json wx cp group join way info.
+ *
+ * @param json the json
+ * @return the wx cp group join way info
+ */
public static WxCpGroupJoinWayInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupJoinWayInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayResult.java
index f77b6089c..adfd90a3a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupJoinWayResult.java
@@ -7,16 +7,23 @@ import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
- *客户群「加入群聊」配置处理结果
+ * 客户群「加入群聊」配置处理结果
+ *
* @author Jc
*/
@Data
@EqualsAndHashCode(callSuper = true)
-public class WxCpGroupJoinWayResult extends WxCpBaseResp {
+public class WxCpGroupJoinWayResult extends WxCpBaseResp {
private static final long serialVersionUID = 5621905029624794129L;
@SerializedName("config_id")
private String configId;
+ /**
+ * From json wx cp group join way result.
+ *
+ * @param json the json
+ * @return the wx cp group join way result
+ */
public static WxCpGroupJoinWayResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupJoinWayResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupWelcomeTemplateResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupWelcomeTemplateResult.java
index 66b56fb44..5f4fbe569 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupWelcomeTemplateResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpGroupWelcomeTemplateResult.java
@@ -11,8 +11,7 @@ import java.io.Serializable;
/**
* 入群欢迎语素材.
*
- * @author Mr.Pan
- * created on 2021-11-3
+ * @author Mr.Pan created on 2021-11-3
*/
@Data
@Builder
@@ -46,6 +45,12 @@ public class WxCpGroupWelcomeTemplateResult extends WxCpBaseResp implements Seri
*/
private Integer notify;
+ /**
+ * From json wx cp group welcome template result.
+ *
+ * @param json the json
+ * @return the wx cp group welcome template result
+ */
public static WxCpGroupWelcomeTemplateResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGroupWelcomeTemplateResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResp.java
index ff3d48ce1..a02ea5bd2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResp.java
@@ -7,14 +7,12 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
-import java.util.Date;
import java.util.List;
/**
* 新增敏感词规则请求参数封装实体类
*
- * @author didi
- * created on 2022-04-17
+ * @author didi created on 2022-04-17
*/
@Data
@Builder
@@ -35,25 +33,51 @@ public class WxCpInterceptRuleResp {
@SerializedName("applicable_range")
private ApplicableRange applicableRange;
+ /**
+ * The type Applicable range.
+ */
@Data
public static class ApplicableRange {
@SerializedName("user_list")
private List userList;
@SerializedName("department_list")
private List departmentList;
+
+ /**
+ * From json applicable range.
+ *
+ * @param json the json
+ * @return the applicable range
+ */
public static ApplicableRange fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ApplicableRange.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp intercept rule resp.
+ *
+ * @param json the json
+ * @return the wx cp intercept rule resp
+ */
public static WxCpInterceptRuleResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpInterceptRuleResp.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResultResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResultResp.java
index 2ce6c28f2..a62e8e41c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResultResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpInterceptRuleResultResp.java
@@ -10,15 +10,22 @@ import java.io.Serializable;
/**
* 新建敏感词规则负返回结果
+ *
* @author didi
*/
@Data
@EqualsAndHashCode(callSuper = true)
-public class WxCpInterceptRuleResultResp extends WxCpBaseResp implements Serializable {
+public class WxCpInterceptRuleResultResp extends WxCpBaseResp implements Serializable {
@SerializedName("rule_id")
- private String ruleId;
+ private String ruleId;
+ /**
+ * From json wx cp intercept rule result resp.
+ *
+ * @param json the json
+ * @return the wx cp intercept rule result resp
+ */
public static WxCpInterceptRuleResultResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpInterceptRuleResultResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplate.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplate.java
index 2d5343459..a88f73904 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplate.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplate.java
@@ -53,10 +53,21 @@ public class WxCpMsgTemplate implements Serializable {
*/
private List attachments;
+ /**
+ * From json wx cp msg template.
+ *
+ * @param json the json
+ * @return the wx cp msg template
+ */
public static WxCpMsgTemplate fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplateAddResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplateAddResult.java
index 87e0be446..42f796c80 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplateAddResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpMsgTemplateAddResult.java
@@ -28,10 +28,21 @@ public class WxCpMsgTemplateAddResult implements Serializable {
@SerializedName("msgid")
private String msgId;
+ /**
+ * From json wx cp msg template add result.
+ *
+ * @param json the json
+ * @return the wx cp msg template add result
+ */
public static WxCpMsgTemplateAddResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplateAddResult.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpNewExternalUserIdList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpNewExternalUserIdList.java
index fcf2d06f8..9f7a5c01e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpNewExternalUserIdList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpNewExternalUserIdList.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 企业客户微信unionid的升级 - 企业客户external_userid列表
*
- * @author Mr.Pan
- * created on 2021/11/18
+ * @author Mr.Pan created on 2021/11/18
*/
@Getter
@Setter
@@ -22,6 +21,9 @@ public class WxCpNewExternalUserIdList extends WxCpBaseResp {
@SerializedName("items")
private List items;
+ /**
+ * The type New external user id info.
+ */
@Getter
@Setter
public static class NewExternalUserIdInfo implements Serializable {
@@ -41,6 +43,12 @@ public class WxCpNewExternalUserIdList extends WxCpBaseResp {
}
+ /**
+ * From json wx cp new external user id list.
+ *
+ * @param json the json
+ * @return the wx cp new external user id list
+ */
public static WxCpNewExternalUserIdList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpNewExternalUserIdList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumInfo.java
index c837d3085..a30fb1600 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumInfo.java
@@ -46,10 +46,21 @@ public class WxCpProductAlbumInfo implements Serializable {
@SerializedName("attachments")
private List attachments;
+ /**
+ * From json wx cp product album info.
+ *
+ * @param json the json
+ * @return the wx cp product album info
+ */
public static WxCpProductAlbumInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpProductAlbumInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumListResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumListResult.java
index 2b6f4b208..895d13237 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumListResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumListResult.java
@@ -28,6 +28,12 @@ public class WxCpProductAlbumListResult extends WxCpBaseResp implements Serializ
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * From json wx cp product album list result.
+ *
+ * @param json the json
+ * @return the wx cp product album list result
+ */
public static WxCpProductAlbumListResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpProductAlbumListResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumResult.java
index 527bfb6eb..8088b8405 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpProductAlbumResult.java
@@ -24,6 +24,12 @@ public class WxCpProductAlbumResult extends WxCpBaseResp implements Serializable
@SerializedName("product")
private WxCpProductAlbumInfo product;
+ /**
+ * From json wx cp product album result.
+ *
+ * @param json the json
+ * @return the wx cp product album result
+ */
public static WxCpProductAlbumResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpProductAlbumResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUpdateRemarkRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUpdateRemarkRequest.java
index c39134086..115e58f34 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUpdateRemarkRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUpdateRemarkRequest.java
@@ -13,8 +13,7 @@ import java.io.Serializable;
/**
* 修改客户备注信息请求.
*
- * @author Binary Wang
- * created on 2020-09-19
+ * @author Binary Wang created on 2020-09-19
*/
@Data
@Builder
@@ -24,6 +23,11 @@ import java.io.Serializable;
public class WxCpUpdateRemarkRequest implements Serializable {
private static final long serialVersionUID = -4960239393895754138L;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalContactList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalContactList.java
index 29e7e28e5..cc092b647 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalContactList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalContactList.java
@@ -30,31 +30,67 @@ public class WxCpUserExternalContactList implements Serializable {
@Expose
private List externalUserId = null;
+ /**
+ * Gets errcode.
+ *
+ * @return the errcode
+ */
public Long getErrcode() {
return errcode;
}
+ /**
+ * Sets errcode.
+ *
+ * @param errcode the errcode
+ */
public void setErrcode(Long errcode) {
this.errcode = errcode;
}
+ /**
+ * Gets errmsg.
+ *
+ * @return the errmsg
+ */
public String getErrmsg() {
return errmsg;
}
+ /**
+ * Sets errmsg.
+ *
+ * @param errmsg the errmsg
+ */
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
+ /**
+ * Gets external user id.
+ *
+ * @return the external user id
+ */
public List getExternalUserId() {
return externalUserId;
}
+ /**
+ * Sets external user id.
+ *
+ * @param externalUserId the external user id
+ */
public void setExternalUserId(List externalUserId) {
this.externalUserId = externalUserId;
}
+ /**
+ * From json wx cp user external contact list.
+ *
+ * @param json the json
+ * @return the wx cp user external contact list
+ */
public static WxCpUserExternalContactList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalContactList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatInfo.java
index 4eb018db4..88f6c8a64 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatInfo.java
@@ -10,8 +10,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author yqx
- * created on 2020/3/116
+ * The type Wx cp user external group chat info.
+ *
+ * @author yqx created on 2020/3/116
*/
@Getter
@Setter
@@ -20,6 +21,9 @@ public class WxCpUserExternalGroupChatInfo extends WxCpBaseResp {
@SerializedName("group_chat")
private GroupChat groupChat;
+ /**
+ * The type Group chat.
+ */
@Getter
@Setter
public static class GroupChat implements Serializable {
@@ -47,6 +51,9 @@ public class WxCpUserExternalGroupChatInfo extends WxCpBaseResp {
private List adminList;
}
+ /**
+ * The type Group member.
+ */
@Getter
@Setter
public static class GroupMember implements Serializable {
@@ -110,6 +117,9 @@ public class WxCpUserExternalGroupChatInfo extends WxCpBaseResp {
private Invitor invitor;
}
+ /**
+ * The type Invitor.
+ */
@Getter
@Setter
public static class Invitor {
@@ -121,6 +131,9 @@ public class WxCpUserExternalGroupChatInfo extends WxCpBaseResp {
private String userId;
}
+ /**
+ * The type Group admin.
+ */
@Getter
@Setter
public static class GroupAdmin {
@@ -132,6 +145,12 @@ public class WxCpUserExternalGroupChatInfo extends WxCpBaseResp {
private String userId;
}
+ /**
+ * From json wx cp user external group chat info.
+ *
+ * @param json the json
+ * @return the wx cp user external group chat info
+ */
public static WxCpUserExternalGroupChatInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalGroupChatInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java
index 5a1bb6fc6..372790894 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java
@@ -10,8 +10,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author yqx
- * created on 2020/3/116
+ * The type Wx cp user external group chat list.
+ *
+ * @author yqx created on 2020/3/116
*/
@Getter
@Setter
@@ -24,6 +25,9 @@ public class WxCpUserExternalGroupChatList extends WxCpBaseResp {
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type Chat status.
+ */
@Getter
@Setter
public static class ChatStatus implements Serializable {
@@ -46,6 +50,12 @@ public class WxCpUserExternalGroupChatList extends WxCpBaseResp {
}
+ /**
+ * From json wx cp user external group chat list.
+ *
+ * @param json the json
+ * @return the wx cp user external group chat list
+ */
public static WxCpUserExternalGroupChatList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalGroupChatList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatStatistic.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatStatistic.java
index 845273286..e8e95d3b9 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatStatistic.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatStatistic.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 联系客户群统计数据
*
- * @author yqx
- * created on 2020/3/16
+ * @author yqx created on 2020/3/16
*/
@Getter
@Setter
@@ -29,6 +28,9 @@ public class WxCpUserExternalGroupChatStatistic extends WxCpBaseResp {
@SerializedName("items")
private List itemList;
+ /**
+ * The type Statistic item.
+ */
@Getter
@Setter
public static class StatisticItem implements Serializable {
@@ -41,6 +43,9 @@ public class WxCpUserExternalGroupChatStatistic extends WxCpBaseResp {
private ItemData itemData;
}
+ /**
+ * The type Item data.
+ */
@Getter
@Setter
public static class ItemData implements Serializable {
@@ -89,6 +94,12 @@ public class WxCpUserExternalGroupChatStatistic extends WxCpBaseResp {
private int msgTotal;
}
+ /**
+ * From json wx cp user external group chat statistic.
+ *
+ * @param json the json
+ * @return the wx cp user external group chat statistic
+ */
public static WxCpUserExternalGroupChatStatistic fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalGroupChatStatistic.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatTransferResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatTransferResp.java
index a083198ec..ea3ed3935 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatTransferResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatTransferResp.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 分配离职成员的客户群结果
*
- * @author pg
- * created on 2021年6月21日
+ * @author pg created on 2021年6月21日
*/
@Getter
@Setter
@@ -24,6 +23,12 @@ public class WxCpUserExternalGroupChatTransferResp extends WxCpBaseResp {
@SerializedName("failed_chat_list")
private List failedChatList;
+ /**
+ * From json wx cp user external group chat transfer resp.
+ *
+ * @param json the json
+ * @return the wx cp user external group chat transfer resp
+ */
public static WxCpUserExternalGroupChatTransferResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalGroupChatTransferResp.class);
}
@@ -32,6 +37,9 @@ public class WxCpUserExternalGroupChatTransferResp extends WxCpBaseResp {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Group chat failed transfer.
+ */
@Getter
@Setter
public static class GroupChatFailedTransfer extends WxCpBaseResp {
@@ -42,8 +50,15 @@ public class WxCpUserExternalGroupChatTransferResp extends WxCpBaseResp {
@SerializedName("chat_id")
private String chatId;
+ /**
+ * From json wx cp user external group chat transfer resp . group chat failed transfer.
+ *
+ * @param json the json
+ * @return the wx cp user external group chat transfer resp . group chat failed transfer
+ */
public static WxCpUserExternalGroupChatTransferResp.GroupChatFailedTransfer fromJson(String json) {
- return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalGroupChatTransferResp.GroupChatFailedTransfer.class);
+ return WxCpGsonBuilder.create().fromJson(json,
+ WxCpUserExternalGroupChatTransferResp.GroupChatFailedTransfer.class);
}
public String toJson() {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupInfo.java
index 69e337b82..59815ac8d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupInfo.java
@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.util.List;
/**
- *
+ * The type Wx cp user external tag group info.
*/
@Getter
@Setter
@@ -20,6 +20,9 @@ public class WxCpUserExternalTagGroupInfo extends WxCpBaseResp {
@SerializedName("tag_group")
private TagGroup tagGroup;
+ /**
+ * The type Tag group.
+ */
@Getter
@Setter
public static class TagGroup implements Serializable {
@@ -43,11 +46,19 @@ public class WxCpUserExternalTagGroupInfo extends WxCpBaseResp {
@SerializedName("tag")
private List tag;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Tag.
+ */
@Getter
@Setter
public static class Tag implements Serializable {
@@ -78,6 +89,12 @@ public class WxCpUserExternalTagGroupInfo extends WxCpBaseResp {
return WxGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp user external tag group info.
+ *
+ * @param json the json
+ * @return the wx cp user external tag group info
+ */
public static WxCpUserExternalTagGroupInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalTagGroupInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupList.java
index a4d625729..215eab231 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalTagGroupList.java
@@ -11,6 +11,8 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Wx cp user external tag group list.
+ *
* @author huangxm129
*/
@Getter
@@ -21,6 +23,9 @@ public class WxCpUserExternalTagGroupList extends WxCpBaseResp {
@SerializedName("tag_group")
private List tagGroupList;
+ /**
+ * The type Tag group.
+ */
@Getter
@Setter
public static class TagGroup implements Serializable {
@@ -45,6 +50,9 @@ public class WxCpUserExternalTagGroupList extends WxCpBaseResp {
@SerializedName("tag")
private List tag;
+ /**
+ * The type Tag.
+ */
@Getter
@Setter
public static class Tag implements Serializable {
@@ -75,6 +83,12 @@ public class WxCpUserExternalTagGroupList extends WxCpBaseResp {
return WxGsonBuilder.create().toJson(this);
}
+ /**
+ * From json wx cp user external tag group list.
+ *
+ * @param json the json
+ * @return the wx cp user external tag group list
+ */
public static WxCpUserExternalTagGroupList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalTagGroupList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUnassignList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUnassignList.java
index 2038fab01..8605760fa 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUnassignList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUnassignList.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 离职员工外部联系人列表
*
- * @author yqx & Wang_Wong
- * created on 2020/3/15
+ * @author yqx & Wang_Wong created on 2020/3/15
*/
@Getter
@Setter
@@ -28,6 +27,9 @@ public class WxCpUserExternalUnassignList extends WxCpBaseResp {
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type Unassign info.
+ */
@Getter
@Setter
public static class UnassignInfo implements Serializable {
@@ -52,6 +54,12 @@ public class WxCpUserExternalUnassignList extends WxCpBaseResp {
private Long dimissionTime;
}
+ /**
+ * From json wx cp user external unassign list.
+ *
+ * @param json the json
+ * @return the wx cp user external unassign list
+ */
public static WxCpUserExternalUnassignList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalUnassignList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUserBehaviorStatistic.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUserBehaviorStatistic.java
index 8d25d8e7e..4c2a41383 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUserBehaviorStatistic.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalUserBehaviorStatistic.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 联系客户统计数据
*
- * @author yqx
- * created on 2020/3/16
+ * @author yqx created on 2020/3/16
*/
@Getter
@Setter
@@ -22,6 +21,9 @@ public class WxCpUserExternalUserBehaviorStatistic extends WxCpBaseResp {
@SerializedName("behavior_data")
private List behaviorList;
+ /**
+ * The type Behavior.
+ */
@Getter
@Setter
public static class Behavior implements Serializable {
@@ -76,6 +78,12 @@ public class WxCpUserExternalUserBehaviorStatistic extends WxCpBaseResp {
private int newContactCnt;
}
+ /**
+ * From json wx cp user external user behavior statistic.
+ *
+ * @param json the json
+ * @return the wx cp user external user behavior statistic
+ */
public static WxCpUserExternalUserBehaviorStatistic fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalUserBehaviorStatistic.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerReq.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerReq.java
index d8607cd80..3b14747d7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerReq.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerReq.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 转接在职成员的客户给其他成员,请求对象
*
- * @author pg
- * created on 2021年6月21日
+ * @author pg created on 2021年6月21日
*/
@Getter
@Setter
@@ -43,6 +42,11 @@ public class WxCpUserTransferCustomerReq implements Serializable {
@SerializedName("transfer_success_msg")
private String transferMsg;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerResp.java
index 40840c4b3..dbb921ad0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferCustomerResp.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 转接在职成员的客户给其他成员,返回对象
*
- * @author pg
- * created on 2021年6月21日
+ * @author pg created on 2021年6月21日
*/
@Getter
@Setter
@@ -24,6 +23,12 @@ public class WxCpUserTransferCustomerResp extends WxCpBaseResp {
*/
private List customer;
+ /**
+ * From json wx cp user transfer customer resp.
+ *
+ * @param json the json
+ * @return the wx cp user transfer customer resp
+ */
public static WxCpUserTransferCustomerResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserTransferCustomerResp.class);
}
@@ -49,10 +54,21 @@ public class WxCpUserTransferCustomerResp extends WxCpBaseResp {
*/
private Integer errcode;
+ /**
+ * From json wx cp user transfer customer resp . transfer customer.
+ *
+ * @param json the json
+ * @return the wx cp user transfer customer resp . transfer customer
+ */
public static WxCpUserTransferCustomerResp.TransferCustomer fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserTransferCustomerResp.TransferCustomer.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferResultResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferResultResp.java
index 5cf9df6f4..948d267b4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferResultResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserTransferResultResp.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 在职成员的客户转接情况
*
- * @author pg
- * created on 2021年6月21日
+ * @author pg created on 2021年6月21日
*/
@Getter
@Setter
@@ -24,6 +23,12 @@ public class WxCpUserTransferResultResp extends WxCpBaseResp {
private List customer;
+ /**
+ * From json wx cp user transfer result resp.
+ *
+ * @param json the json
+ * @return the wx cp user transfer result resp
+ */
public static WxCpUserTransferResultResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserTransferResultResp.class);
}
@@ -55,15 +60,29 @@ public class WxCpUserTransferResultResp extends WxCpBaseResp {
@SerializedName("takeover_time")
private Long takeOverTime;
+ /**
+ * From json wx cp user transfer result resp . transfer result.
+ *
+ * @param json the json
+ * @return the wx cp user transfer result resp . transfer result
+ */
public static WxCpUserTransferResultResp.TransferResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserTransferResultResp.TransferResult.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The enum Status.
+ */
public enum STATUS {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserWithExternalPermission.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserWithExternalPermission.java
index d8366ff3f..ca1fa8cdf 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserWithExternalPermission.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserWithExternalPermission.java
@@ -9,6 +9,8 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Wx cp user with external permission.
+ *
* @author 曹祖鹏
*/
@Data
@@ -26,6 +28,12 @@ public class WxCpUserWithExternalPermission implements Serializable {
@Expose
private List followers = null;
+ /**
+ * From json wx cp user with external permission.
+ *
+ * @param json the json
+ * @return the wx cp user with external permission
+ */
public static WxCpUserWithExternalPermission fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserWithExternalPermission.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpWelcomeMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpWelcomeMsg.java
index 6d37ad6ee..a0aae4b06 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpWelcomeMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpWelcomeMsg.java
@@ -15,8 +15,7 @@ import java.util.List;
/**
* 新客户欢迎语.
*
- * @author Binary Wang
- * created on 2020-08-16
+ * @author Binary Wang created on 2020-08-16
*/
@Data
@Builder
@@ -32,6 +31,11 @@ public class WxCpWelcomeMsg implements Serializable {
private List attachments;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java
index 41461bc7f..8129ee181 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/ExternalContact.java
@@ -9,8 +9,7 @@ import java.util.List;
/**
* 外部联系人.
*
- * @author Binary Wang
- * created on 2020-11-04
+ * @author Binary Wang created on 2020-11-04
*/
@Getter
@Setter
@@ -50,6 +49,9 @@ public class ExternalContact implements Serializable {
@SerializedName("external_profile")
private ExternalProfile externalProfile;
+ /**
+ * The type External profile.
+ */
@Data
public static class ExternalProfile implements Serializable {
private static final long serialVersionUID = -2899906589789022765L;
@@ -64,6 +66,9 @@ public class ExternalContact implements Serializable {
private List externalAttrs;
}
+ /**
+ * The type Wechat channel.
+ */
@Data
@Builder
@NoArgsConstructor
@@ -78,6 +83,9 @@ public class ExternalContact implements Serializable {
}
+ /**
+ * The type External attribute.
+ */
@Data
@Builder
@NoArgsConstructor
@@ -96,6 +104,9 @@ public class ExternalContact implements Serializable {
@SerializedName("miniprogram")
private MiniProgram miniProgram;
+ /**
+ * The type Text.
+ */
@Data
public static class Text implements Serializable {
private static final long serialVersionUID = -8161579335600269094L;
@@ -103,6 +114,9 @@ public class ExternalContact implements Serializable {
private String value;
}
+ /**
+ * The type Web.
+ */
@Data
public static class Web implements Serializable {
private static final long serialVersionUID = 3664557135411521862L;
@@ -111,6 +125,9 @@ public class ExternalContact implements Serializable {
private String url;
}
+ /**
+ * The type Mini program.
+ */
@Data
public static class MiniProgram implements Serializable {
private static final long serialVersionUID = -5329210594501835796L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java
index e4501691e..3dad23605 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/FollowedUser.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 添加了外部联系人的企业成员.
*
- * @author Binary Wang
- * created on 2020-11-04
+ * @author Binary Wang created on 2020-11-04
*/
@Data
public class FollowedUser implements Serializable {
@@ -53,6 +52,9 @@ public class FollowedUser implements Serializable {
@SerializedName("oper_userid")
private String operatorUserId;
+ /**
+ * The type Tag.
+ */
@Data
public static class Tag implements Serializable {
private static final long serialVersionUID = -7556237053703295482L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java
index 65e332613..de866fb30 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactBatchInfo.java
@@ -28,6 +28,9 @@ public class WxCpExternalContactBatchInfo extends WxCpBaseResp implements Serial
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type External contact info.
+ */
@Getter
@Setter
public static class ExternalContactInfo implements Serializable {
@@ -41,6 +44,12 @@ public class WxCpExternalContactBatchInfo extends WxCpBaseResp implements Serial
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java
index cad105e71..1a58c7e1d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpExternalContactInfo.java
@@ -29,6 +29,12 @@ public class WxCpExternalContactInfo implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java
index e8cb1b81c..2b7879375 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgListResult.java
@@ -31,6 +31,9 @@ public class WxCpGroupMsgListResult extends WxCpBaseResp implements Serializable
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type External contact group msg info.
+ */
@Getter
@Setter
public static class ExternalContactGroupMsgInfo implements Serializable {
@@ -53,6 +56,12 @@ public class WxCpGroupMsgListResult extends WxCpBaseResp implements Serializable
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java
index 5cae404f0..604700b3a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgResult.java
@@ -28,6 +28,9 @@ public class WxCpGroupMsgResult extends WxCpBaseResp implements Serializable {
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type External contact group msg detail info.
+ */
@Getter
@Setter
public static class ExternalContactGroupMsgDetailInfo implements Serializable {
@@ -53,6 +56,12 @@ public class WxCpGroupMsgResult extends WxCpBaseResp implements Serializable {
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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java
index 704e53b8d..657c12ff6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgSendResult.java
@@ -28,6 +28,9 @@ public class WxCpGroupMsgSendResult extends WxCpBaseResp implements Serializable
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type External contact group msg send info.
+ */
@Getter
@Setter
public static class ExternalContactGroupMsgSendInfo implements Serializable {
@@ -49,6 +52,12 @@ public class WxCpGroupMsgSendResult extends WxCpBaseResp implements Serializable
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java
index 0f2299bb4..f363fc2ee 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/contact/WxCpGroupMsgTaskResult.java
@@ -28,6 +28,9 @@ public class WxCpGroupMsgTaskResult extends WxCpBaseResp implements Serializable
@SerializedName("next_cursor")
private String nextCursor;
+ /**
+ * The type External contact group msg task info.
+ */
@Getter
@Setter
public static class ExternalContactGroupMsgTaskInfo implements Serializable {
@@ -43,6 +46,12 @@ public class WxCpGroupMsgTaskResult extends WxCpBaseResp implements Serializable
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/CustomerItem.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/CustomerItem.java
index 3bcbe03e0..3504d9aed 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/CustomerItem.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/CustomerItem.java
@@ -5,6 +5,8 @@ import lombok.Getter;
import lombok.Setter;
/**
+ * The type Customer item.
+ *
* @author Boris
*/
@Getter
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/ExternalContactList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/ExternalContactList.java
index c9f2e0a58..2d9ac4471 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/ExternalContactList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/ExternalContactList.java
@@ -6,6 +6,9 @@ import lombok.Setter;
import java.util.List;
+/**
+ * The type External contact list.
+ */
@Getter
@Setter
public class ExternalContactList {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/MomentInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/MomentInfo.java
index 3fd364ddb..1eabdc145 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/MomentInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/MomentInfo.java
@@ -7,6 +7,8 @@ import me.chanjar.weixin.cp.bean.external.msg.*;
import java.util.List;
/**
+ * The type Moment info.
+ *
* @author Borisg
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java
index b3f2c387e..35924fbeb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/SenderList.java
@@ -7,6 +7,8 @@ import lombok.Setter;
import java.util.List;
/**
+ * The type Sender list.
+ *
* @author Boris
*/
@Getter
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/VisibleRange.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/VisibleRange.java
index 1bf6c46cb..596408795 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/VisibleRange.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/moment/VisibleRange.java
@@ -7,6 +7,8 @@ import lombok.experimental.Accessors;
import java.io.Serializable;
/**
+ * The type Visible range.
+ *
* @author Boris
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java
index d714b093c..6b6efc936 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Attachment.java
@@ -7,6 +7,8 @@ import me.chanjar.weixin.cp.constant.WxCpConsts;
import java.io.Serializable;
/**
+ * The type Attachment.
+ *
* @author chutian0124
*/
@Data
@@ -27,26 +29,51 @@ public class Attachment implements Serializable {
private File file;
+ /**
+ * Sets image.
+ *
+ * @param image the image
+ */
public void setImage(Image image) {
this.image = image;
this.msgType = WxCpConsts.WelcomeMsgType.IMAGE;
}
+ /**
+ * Sets link.
+ *
+ * @param link the link
+ */
public void setLink(Link link) {
this.link = link;
this.msgType = WxCpConsts.WelcomeMsgType.LINK;
}
+ /**
+ * Sets mini program.
+ *
+ * @param miniProgram the mini program
+ */
public void setMiniProgram(MiniProgram miniProgram) {
this.miniProgram = miniProgram;
this.msgType = WxCpConsts.WelcomeMsgType.MINIPROGRAM;
}
+ /**
+ * Sets video.
+ *
+ * @param video the video
+ */
public void setVideo(Video video) {
this.video = video;
this.msgType = WxCpConsts.WelcomeMsgType.VIDEO;
}
+ /**
+ * Sets file.
+ *
+ * @param file the file
+ */
public void setFile(File file) {
this.file = file;
this.msgType = WxCpConsts.WelcomeMsgType.FILE;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java
index 5bbd1ce38..656f46ba3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/File.java
@@ -6,8 +6,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author Binary Wang
- * created on 2021-08-23
+ * The type File.
+ *
+ * @author Binary Wang created on 2021-08-23
*/
@Data
public class File implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java
index 6eec31b80..cd2cdee29 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Image.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 图片消息.
*
- * @author Binary Wang
- * created on 2020-08-16
+ * @author Binary Wang created on 2020-08-16
*/
@Data
public class Image implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java
index 80e22159a..45ed02fae 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Link.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 图文消息.
*
- * @author Binary Wang
- * created on 2020-08-16
+ * @author Binary Wang created on 2020-08-16
*/
@Data
public class Link implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java
index 74b8b4922..d9a8a019b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Location.java
@@ -5,8 +5,7 @@ import lombok.Data;
/**
* 地理位置
*
- * @author leiin
- * created on 2021-10-29
+ * @author leiin created on 2021-10-29
*/
@Data
public class Location {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java
index 1f9037567..013fe882b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/MiniProgram.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 小程序消息.
*
- * @author Binary Wang
- * created on 2020-08-16
+ * @author Binary Wang created on 2020-08-16
*/
@Data
public class MiniProgram implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java
index a796eeec7..5aeeb4565 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Text.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 消息文本消息.
*
- * @author Binary Wang
- * created on 2020-08-16
+ * @author Binary Wang created on 2020-08-16
*/
@Data
@Accessors(chain = true)
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java
index 251972cf9..c1428a662 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/msg/Video.java
@@ -8,8 +8,7 @@ import java.io.Serializable;
/**
* 视频消息
*
- * @author pg
- * created on 2021-6-21
+ * @author pg created on 2021-6-21
*/
@Data
public class Video implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/product/Attachment.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/product/Attachment.java
index c1480fbb7..960800e11 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/product/Attachment.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/product/Attachment.java
@@ -24,6 +24,11 @@ public class Attachment implements Serializable {
*/
private Image image;
+ /**
+ * Sets image.
+ *
+ * @param image the image
+ */
public void setImage(Image image) {
this.image = image;
this.type = WxCpConsts.ProductAttachmentType.IMAGE;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAdd.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAdd.java
index 428c255a3..b1ea05fad 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAdd.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAdd.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
/**
* 添加客服帐号-请求参数
*
- * @author Fu
- * created on 2022/1/19 18:59
+ * @author Fu created on 2022/1/19 18:59
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAddResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAddResp.java
index 8a3c0978d..c21849413 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAddResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountAddResp.java
@@ -10,8 +10,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 添加客服帐号-返回结果
*
- * @author Fu
- * created on 2022/1/19 19:04
+ * @author Fu created on 2022/1/19 19:04
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -26,6 +25,12 @@ public class WxCpKfAccountAddResp extends WxCpBaseResp {
@SerializedName("open_kfid")
private String openKfid;
+ /**
+ * From json wx cp kf account add resp.
+ *
+ * @param json the json
+ * @return the wx cp kf account add resp
+ */
public static WxCpKfAccountAddResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfAccountAddResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountDel.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountDel.java
index d68714a6e..bd4bdf30c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountDel.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountDel.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
/**
* 删除客服帐号-请求参数
*
- * @author Fu
- * created on 2022/1/19 19:09
+ * @author Fu created on 2022/1/19 19:09
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLink.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLink.java
index b10141245..a903d0fa5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLink.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLink.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
/**
* 获取客服帐号链接-请求参数
*
- * @author Fu
- * created on 2022/1/19 19:18
+ * @author Fu created on 2022/1/19 19:18
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLinkResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLinkResp.java
index 0ef73b9c4..e04a8f56a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLinkResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountLinkResp.java
@@ -10,8 +10,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 获取客服帐号链接-结果
*
- * @author Fu
- * created on 2022/1/19 19:18
+ * @author Fu created on 2022/1/19 19:18
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -26,6 +25,12 @@ public class WxCpKfAccountLinkResp extends WxCpBaseResp {
@SerializedName("url")
private String url;
+ /**
+ * From json wx cp kf account link resp.
+ *
+ * @param json the json
+ * @return the wx cp kf account link resp
+ */
public static WxCpKfAccountLinkResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfAccountLinkResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountListResp.java
index 0355c2df6..a7ec3c909 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountListResp.java
@@ -1,6 +1,5 @@
package me.chanjar.weixin.cp.bean.kf;
-import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -13,8 +12,7 @@ import java.util.List;
/**
* 获取客服帐号列表-结果
*
- * @author Fu
- * created on 2022/1/19 19:13
+ * @author Fu created on 2022/1/19 19:13
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -29,6 +27,9 @@ public class WxCpKfAccountListResp extends WxCpBaseResp {
@SerializedName("account_list")
private List accountList;
+ /**
+ * The type Account list dto.
+ */
@NoArgsConstructor
@Data
public static class AccountListDTO {
@@ -51,6 +52,12 @@ public class WxCpKfAccountListResp extends WxCpBaseResp {
private String avatar;
}
+ /**
+ * From json wx cp kf account list resp.
+ *
+ * @param json the json
+ * @return the wx cp kf account list resp
+ */
public static WxCpKfAccountListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfAccountListResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountUpd.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountUpd.java
index a54d1d7ca..fa375c872 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountUpd.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfAccountUpd.java
@@ -9,8 +9,7 @@ import java.io.Serializable;
/**
* 修改客服帐号-请求参数
*
- * @author Fu
- * created on 2022/1/19 19:10
+ * @author Fu created on 2022/1/19 19:10
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfCustomerBatchGetResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfCustomerBatchGetResp.java
index 964e32204..72b6b1044 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfCustomerBatchGetResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfCustomerBatchGetResp.java
@@ -1,7 +1,6 @@
package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@@ -9,9 +8,12 @@ import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.bean.external.contact.ExternalContact;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import java.util.List;
+
/**
- * @author leiin
- * created on 2022/1/26 7:56 下午
+ * The type Wx cp kf customer batch get resp.
+ *
+ * @author leiin created on 2022/1/26 7:56 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -26,6 +28,12 @@ public class WxCpKfCustomerBatchGetResp extends WxCpBaseResp {
@SerializedName("invalid_external_userid")
private List invalidExternalUserId;
+ /**
+ * From json wx cp kf customer batch get resp.
+ *
+ * @param json the json
+ * @return the wx cp kf customer batch get resp
+ */
public static WxCpKfCustomerBatchGetResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfCustomerBatchGetResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticRequest.java
index 604901e7c..d447fb649 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticRequest.java
@@ -7,9 +7,8 @@ import lombok.NoArgsConstructor;
/**
* 获取「客户数据统计」企业汇总数据
*
- * @author zhongjun
- * created on 2022/4/25
- **/
+ * @author zhongjun created on 2022/4/25
+ */
@NoArgsConstructor
@Data
public class WxCpKfGetCorpStatisticRequest {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticResp.java
index dd3c876da..2243a70ad 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfGetCorpStatisticResp.java
@@ -12,9 +12,8 @@ import java.util.List;
/**
* 获取「客户数据统计」企业汇总数据
*
- * @author zhongjun
- * created on 2022/4/25
- **/
+ * @author zhongjun created on 2022/4/25
+ */
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Data
@@ -27,6 +26,9 @@ public class WxCpKfGetCorpStatisticResp extends WxCpBaseResp {
@SerializedName("statistic_list")
private List statisticList;
+ /**
+ * The type Statistic list.
+ */
@NoArgsConstructor
@Data
public static class StatisticList {
@@ -43,6 +45,9 @@ public class WxCpKfGetCorpStatisticResp extends WxCpBaseResp {
private Statistic statistic;
}
+ /**
+ * The type Statistic.
+ */
@NoArgsConstructor
@Data
public static class Statistic {
@@ -84,12 +89,19 @@ public class WxCpKfGetCorpStatisticResp extends WxCpBaseResp {
private Integer aiTransferRate;
/**
- * 知识命中率。一个自然日内,客户给智能助手发送的消息中,命中知识库的占比。只有在开启了智能回复原生功能并配置了知识库的情况下,才会产生该项统计数据。当api托管了会话分配,智能回复原生功能失效。若不返回,代表没有向配置知识库的智能接待助手发送消息,该项无法计算
+ * 知识命中率。一个自然日内,客户给智能助手发送的消息中,命中知识库的占比。只有在开启了智能回复原生功能并配置了知识库的情况下,才会产生该项统计数据。当api
+ * 托管了会话分配,智能回复原生功能失效。若不返回,代表没有向配置知识库的智能接待助手发送消息,该项无法计算
*/
@SerializedName("ai_knowledge_hit_rate")
private Integer aiKnowledgeHitRate;
}
+ /**
+ * From json wx cp kf get corp statistic resp.
+ *
+ * @param json the json
+ * @return the wx cp kf get corp statistic resp
+ */
public static WxCpKfGetCorpStatisticResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfGetCorpStatisticResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgListResp.java
index b2f7545d7..197b65ecd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgListResp.java
@@ -1,24 +1,19 @@
package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfBusinessCardMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfEventMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfLinkMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfLocationMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfMenuMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfMiniProgramMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfResourceMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfTextMsg;
+import me.chanjar.weixin.cp.bean.kf.msg.*;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import java.util.List;
+
/**
- * @author leiin
- * created on 2022/1/26 5:24 下午
+ * The type Wx cp kf msg list resp.
+ *
+ * @author leiin created on 2022/1/26 5:24 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -35,6 +30,9 @@ public class WxCpKfMsgListResp extends WxCpBaseResp {
@SerializedName("msg_list")
private List msgList;
+ /**
+ * The type Wx cp kf msg item.
+ */
@NoArgsConstructor
@Data
public static class WxCpKfMsgItem {
@@ -67,6 +65,12 @@ public class WxCpKfMsgListResp extends WxCpBaseResp {
private WxCpKfEventMsg event;
}
+ /**
+ * From json wx cp kf msg list resp.
+ *
+ * @param json the json
+ * @return the wx cp kf msg list resp
+ */
public static WxCpKfMsgListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfMsgListResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendRequest.java
index cef24cfbb..ba451813e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendRequest.java
@@ -3,16 +3,12 @@ package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfLinkMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfLocationMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfMenuMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfMiniProgramMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfResourceMsg;
-import me.chanjar.weixin.cp.bean.kf.msg.WxCpKfTextMsg;
+import me.chanjar.weixin.cp.bean.kf.msg.*;
/**
- * @author leiin
- * created on 2022/1/26 7:00 下午
+ * The type Wx cp kf msg send request.
+ *
+ * @author leiin created on 2022/1/26 7:00 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendResp.java
index 83b126718..62bd624d8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfMsgSendResp.java
@@ -8,8 +8,9 @@ import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
- * @author leiin
- * created on 2022/1/26 7:41 下午
+ * The type Wx cp kf msg send resp.
+ *
+ * @author leiin created on 2022/1/26 7:41 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -18,6 +19,12 @@ public class WxCpKfMsgSendResp extends WxCpBaseResp {
@SerializedName("msgid")
private String msgId;
+ /**
+ * From json wx cp kf msg send resp.
+ *
+ * @param json the json
+ * @return the wx cp kf msg send resp
+ */
public static WxCpKfMsgSendResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfMsgSendResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateResp.java
index 343745364..d273cc32d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateResp.java
@@ -8,8 +8,9 @@ import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
- * @author leiin
- * created on 2022/1/26 5:00 下午
+ * The type Wx cp kf service state resp.
+ *
+ * @author leiin created on 2022/1/26 5:00 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -22,6 +23,12 @@ public class WxCpKfServiceStateResp extends WxCpBaseResp {
@SerializedName("servicer_userid")
private String servicerUserId;
+ /**
+ * From json wx cp kf service state resp.
+ *
+ * @param json the json
+ * @return the wx cp kf service state resp
+ */
public static WxCpKfServiceStateResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServiceStateResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateTransResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateTransResp.java
index a8836dd8e..604efb12a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateTransResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceStateTransResp.java
@@ -8,8 +8,9 @@ import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
- * @author leiin
- * created on 2022/1/26 5:03 下午
+ * The type Wx cp kf service state trans resp.
+ *
+ * @author leiin created on 2022/1/26 5:03 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -21,6 +22,12 @@ public class WxCpKfServiceStateTransResp extends WxCpBaseResp {
@SerializedName("msg_code")
private String msgCode;
+ /**
+ * From json wx cp kf service state trans resp.
+ *
+ * @param json the json
+ * @return the wx cp kf service state trans resp
+ */
public static WxCpKfServiceStateTransResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServiceStateTransResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceUpgradeConfigResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceUpgradeConfigResp.java
index 150bab725..61eb1b775 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceUpgradeConfigResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServiceUpgradeConfigResp.java
@@ -1,16 +1,18 @@
package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import java.util.List;
+
/**
- * @author leiin
- * created on 2022/4/26 5:21 下午
+ * The type Wx cp kf service upgrade config resp.
+ *
+ * @author leiin created on 2022/4/26 5:21 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -25,10 +27,19 @@ public class WxCpKfServiceUpgradeConfigResp extends WxCpBaseResp {
@SerializedName("groupchat_range")
private GroupchatRange groupchatRange;
+ /**
+ * From json wx cp kf service upgrade config resp.
+ *
+ * @param json the json
+ * @return the wx cp kf service upgrade config resp
+ */
public static WxCpKfServiceUpgradeConfigResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServiceUpgradeConfigResp.class);
}
+ /**
+ * The type Member range.
+ */
@Data
@NoArgsConstructor
public static class MemberRange {
@@ -39,6 +50,9 @@ public class WxCpKfServiceUpgradeConfigResp extends WxCpBaseResp {
private List departmentIdList;
}
+ /**
+ * The type Groupchat range.
+ */
@Data
@NoArgsConstructor
public static class GroupchatRange {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerListResp.java
index 69b7e97d7..0b3e4636c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerListResp.java
@@ -1,16 +1,18 @@
package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import java.util.List;
+
/**
- * @author leiin
- * created on 2022/1/26 4:29 下午
+ * The type Wx cp kf servicer list resp.
+ *
+ * @author leiin created on 2022/1/26 4:29 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -21,6 +23,9 @@ public class WxCpKfServicerListResp extends WxCpBaseResp {
@SerializedName("servicer_list")
private List servicerList;
+ /**
+ * The type Wx cp kf servicer status.
+ */
@NoArgsConstructor
@Data
public static class WxCpKfServicerStatus {
@@ -29,6 +34,12 @@ public class WxCpKfServicerListResp extends WxCpBaseResp {
private Integer status;
}
+ /**
+ * From json wx cp kf servicer list resp.
+ *
+ * @param json the json
+ * @return the wx cp kf servicer list resp
+ */
public static WxCpKfServicerListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServicerListResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerOpResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerOpResp.java
index d72b48225..4e48e0234 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerOpResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfServicerOpResp.java
@@ -2,17 +2,18 @@ package me.chanjar.weixin.cp.bean.kf;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import java.util.List;
+
/**
* 添加/删除客服接待人员返回结果
- * @author leiin
- * created on 2022/1/26 4:11 下午
+ *
+ * @author leiin created on 2022/1/26 4:11 下午
*/
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@@ -24,6 +25,9 @@ public class WxCpKfServicerOpResp extends WxCpBaseResp {
@SerializedName("result_list")
private List resultList;
+ /**
+ * The type Wx cp kf servicer resp.
+ */
@Data
@NoArgsConstructor
public static class WxCpKfServicerResp extends WxCpBaseResp {
@@ -32,6 +36,12 @@ public class WxCpKfServicerOpResp extends WxCpBaseResp {
private String userId;
}
+ /**
+ * From json wx cp kf servicer op resp.
+ *
+ * @param json the json
+ * @return the wx cp kf servicer op resp
+ */
public static WxCpKfServicerOpResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpKfServicerOpResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfBusinessCardMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfBusinessCardMsg.java
index 22593c330..95fe7f72b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfBusinessCardMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfBusinessCardMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 5:35 下午
+ * The type Wx cp kf business card msg.
+ *
+ * @author leiin created on 2022/1/26 5:35 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfEventMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfEventMsg.java
index 42c4b2450..6febab987 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfEventMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfEventMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 6:44 下午
+ * The type Wx cp kf event msg.
+ *
+ * @author leiin created on 2022/1/26 6:44 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLinkMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLinkMsg.java
index 2fe2503e1..64809f1eb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLinkMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLinkMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 5:33 下午
+ * The type Wx cp kf link msg.
+ *
+ * @author leiin created on 2022/1/26 5:33 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLocationMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLocationMsg.java
index 742f5c8a6..6e7fa9ab7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLocationMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfLocationMsg.java
@@ -4,8 +4,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 5:32 下午
+ * The type Wx cp kf location msg.
+ *
+ * @author leiin created on 2022/1/26 5:32 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMenuMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMenuMsg.java
index 6153192b8..e994a0a00 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMenuMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMenuMsg.java
@@ -1,15 +1,17 @@
package me.chanjar.weixin.cp.bean.kf.msg;
import com.google.gson.annotations.SerializedName;
-import java.util.List;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
+import java.util.List;
+
/**
- * @author leiin
- * created on 2022/1/26 6:33 下午
+ * The type Wx cp kf menu msg.
+ *
+ * @author leiin created on 2022/1/26 6:33 下午
*/
@NoArgsConstructor
@Data
@@ -35,6 +37,9 @@ public class WxCpKfMenuMsg {
@SerializedName("tail_content")
private String tailContent;
+ /**
+ * The type Wx cp kf menu item.
+ */
@NoArgsConstructor
@Data
public static class WxCpKfMenuItem {
@@ -61,6 +66,9 @@ public class WxCpKfMenuMsg {
private MiniProgram miniProgram;
}
+ /**
+ * The type Menu click.
+ */
@Getter
@Setter
public static class MenuClick {
@@ -81,6 +89,9 @@ public class WxCpKfMenuMsg {
private String content;
}
+ /**
+ * The type Menu view.
+ */
@Getter
@Setter
public static class MenuView {
@@ -100,6 +111,9 @@ public class WxCpKfMenuMsg {
private String content;
}
+ /**
+ * The type Mini program.
+ */
@Getter
@Setter
public static class MiniProgram {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMiniProgramMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMiniProgramMsg.java
index 0c9101e1b..49829a729 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMiniProgramMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfMiniProgramMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 6:22 下午
+ * The type Wx cp kf mini program msg.
+ *
+ * @author leiin created on 2022/1/26 6:22 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfResourceMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfResourceMsg.java
index 3deb29b72..fd25095b5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfResourceMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfResourceMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 5:31 下午
+ * The type Wx cp kf resource msg.
+ *
+ * @author leiin created on 2022/1/26 5:31 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfTextMsg.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfTextMsg.java
index 1fd44b49c..22c8eb548 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfTextMsg.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfTextMsg.java
@@ -5,8 +5,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * @author leiin
- * created on 2022/1/26 5:30 下午
+ * The type Wx cp kf text msg.
+ *
+ * @author leiin created on 2022/1/26 5:30 下午
*/
@NoArgsConstructor
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccount.java
index 4deb42bff..60975f544 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccount.java
@@ -10,8 +10,8 @@ import lombok.experimental.SuperBuilder;
/**
* 订单账号信息
- * @author Totoro
- * created on 2022/6/27 14:04
+ *
+ * @author Totoro created on 2022/6/27 14:04
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -28,5 +28,4 @@ public class WxCpTpLicenseAccount extends WxCpTpLicenseBaseAccount {
private String activeCode;
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountCount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountCount.java
index 69e9cd714..68e8d784d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountCount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountCount.java
@@ -10,8 +10,9 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
- * @author Totoro
- * created on 2022/6/27 11:54
+ * The type Wx cp tp license account count.
+ *
+ * @author Totoro created on 2022/6/27 11:54
*/
@Data
@Builder
@@ -25,6 +26,11 @@ public class WxCpTpLicenseAccountCount implements Serializable {
@SerializedName("external_contact_count")
private Integer externalContactCount;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountDuration.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountDuration.java
index 49e9db60a..ebc58f1ec 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountDuration.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseAccountDuration.java
@@ -8,9 +8,9 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
+ * The type Wx cp tp license account duration.
*
- * @author Totoro
- * created on 2022-6-27 11:22:53
+ * @author Totoro created on 2022-6-27 11:22:53
*/
@Data
@Builder
@@ -21,4 +21,4 @@ public class WxCpTpLicenseAccountDuration implements Serializable {
private Integer months;
- }
+}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveAccount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveAccount.java
index 50f3f7cf2..2493c657c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveAccount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveAccount.java
@@ -9,8 +9,9 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
- * @author Totoro
- * created on 2022-6-27 16:26:35
+ * The type Wx cp tp license active account.
+ *
+ * @author Totoro created on 2022-6-27 16:26:35
*/
@Data
@Builder
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveCodeInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveCodeInfo.java
index 6eb46f8cc..86d70ed8a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveCodeInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseActiveCodeInfo.java
@@ -10,8 +10,8 @@ import lombok.experimental.SuperBuilder;
/**
* 激活码信息
* 文档地址:https://developer.work.weixin.qq.com/document/path/95553
- * @author Totoro
- * created on 2022/6/27 14:34
+ *
+ * @author Totoro created on 2022/6/27 14:34
*/
@EqualsAndHashCode(callSuper = true)
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseBaseAccount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseBaseAccount.java
index 88ad34070..7e363f4fd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseBaseAccount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseBaseAccount.java
@@ -10,8 +10,8 @@ import java.io.Serializable;
/**
* 许可证账号基础类
- * @author Totoro
- * created on 2022/6/27 14:39
+ *
+ * @author Totoro created on 2022/6/27 14:39
*/
@Data
@SuperBuilder
@@ -32,6 +32,11 @@ public class WxCpTpLicenseBaseAccount implements Serializable {
private Integer type;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseCorpAccount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseCorpAccount.java
index 871ed8695..05b523ec9 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseCorpAccount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseCorpAccount.java
@@ -8,8 +8,9 @@ import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
- * @author Totoro
- * created on 2022/6/27 15:21
+ * The type Wx cp tp license corp account.
+ *
+ * @author Totoro created on 2022/6/27 15:21
*/
@EqualsAndHashCode(callSuper = true)
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseInvalidAccount.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseInvalidAccount.java
index 476bc3b88..85994d7ed 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseInvalidAccount.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseInvalidAccount.java
@@ -8,8 +8,9 @@ import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
- * @author Totoro
- * created on 2022-6-27 15:35:30
+ * The type Wx cp tp license invalid account.
+ *
+ * @author Totoro created on 2022-6-27 15:35:30
*/
@EqualsAndHashCode(callSuper = true)
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseOrder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseOrder.java
index 45cb8227f..0cfbe5b02 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseOrder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseOrder.java
@@ -9,8 +9,8 @@ import java.io.Serializable;
/**
* 详细的订单信息
* 文档地址:https://developer.work.weixin.qq.com/document/path/95648
- * @author Totoro
- * created on 2022/6/27 11:38
+ *
+ * @author Totoro created on 2022/6/27 11:38
*/
@Data
public class WxCpTpLicenseOrder implements Serializable {
@@ -45,6 +45,11 @@ public class WxCpTpLicenseOrder implements Serializable {
private Long payTime;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseSimpleOrder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseSimpleOrder.java
index 036af6a8b..f994fd7a4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseSimpleOrder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseSimpleOrder.java
@@ -10,8 +10,9 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
- * @author Totoro
- * created on 2022/6/27 11:38
+ * The type Wx cp tp license simple order.
+ *
+ * @author Totoro created on 2022/6/27 11:38
*/
@Data
@Builder
@@ -26,6 +27,11 @@ public class WxCpTpLicenseSimpleOrder implements Serializable {
@SerializedName("order_type")
private Integer orderType;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseTransfer.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseTransfer.java
index 2b2d99812..6be49008b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseTransfer.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/WxCpTpLicenseTransfer.java
@@ -10,8 +10,8 @@ import java.io.Serializable;
/**
* 基础的信息
- * @author Totoro
- * created on 2022/6/27 15:50
+ *
+ * @author Totoro created on 2022/6/27 15:50
*/
@Data
@Builder
@@ -41,6 +41,4 @@ public class WxCpTpLicenseTransfer implements Serializable {
private Integer errCode;
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseActiveInfoByUserResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseActiveInfoByUserResp.java
index 10cbe4861..a9284d9d6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseActiveInfoByUserResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseActiveInfoByUserResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 某个企业成员的激活情况
* 文档地址:https://developer.work.weixin.qq.com/document/path/95555
- * @author Totoro
- * created on 2022-6-27 14:51:19
+ *
+ * @author Totoro created on 2022-6-27 14:51:19
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -28,6 +28,12 @@ public class WxCpTpLicenseActiveInfoByUserResp extends WxCpBaseResp {
private List activeInfoList;
+ /**
+ * From json wx cp tp license active info by user resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license active info by user resp
+ */
public static WxCpTpLicenseActiveInfoByUserResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseActiveInfoByUserResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchActiveResultResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchActiveResultResp.java
index ccc5f3204..f1336af5a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchActiveResultResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchActiveResultResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 批量激活帐号结果
* 文档地址:https://developer.work.weixin.qq.com/document/path/95553
- * @author Totoro
- * created on 2022-6-27 16:19:21
+ *
+ * @author Totoro created on 2022-6-27 16:19:21
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -25,8 +25,12 @@ public class WxCpTpLicenseBatchActiveResultResp extends WxCpBaseResp {
private List activeResults;
-
-
+ /**
+ * From json wx cp tp license batch active result resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license batch active result resp
+ */
public static WxCpTpLicenseBatchActiveResultResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseBatchActiveResultResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchCodeInfoResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchCodeInfoResp.java
index c0d7884f4..002970012 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchCodeInfoResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchCodeInfoResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 批量查询的激活码详情
* 文档地址:https://developer.work.weixin.qq.com/document/path/95553
- * @author Totoro
- * created on 2022-6-27 14:51:19
+ *
+ * @author Totoro created on 2022-6-27 14:51:19
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -27,6 +27,12 @@ public class WxCpTpLicenseBatchCodeInfoResp extends WxCpBaseResp {
private List invalidActiveCodeList;
+ /**
+ * From json wx cp tp license batch code info resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license batch code info resp
+ */
public static WxCpTpLicenseBatchCodeInfoResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseBatchCodeInfoResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchTransferResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchTransferResp.java
index f95d463a0..1b24a20a3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchTransferResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseBatchTransferResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 基础结果返回信息
* 文档地址:https://developer.work.weixin.qq.com/document/path/95673
- * @author Totoro
- * created on 2022/6/27 15:49
+ *
+ * @author Totoro created on 2022/6/27 15:49
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -23,10 +23,15 @@ public class WxCpTpLicenseBatchTransferResp extends WxCpBaseResp {
@SerializedName("transfer_result")
private List transferResult;
+ /**
+ * From json wx cp tp license batch transfer resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license batch transfer resp
+ */
public static WxCpTpLicenseBatchTransferResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseBatchTransferResp.class);
}
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCodeInfoResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCodeInfoResp.java
index f649c48a2..152b38d8b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCodeInfoResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCodeInfoResp.java
@@ -10,8 +10,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 查询的激活码详情
* 文档地址:https://developer.work.weixin.qq.com/document/path/95553
- * @author Totoro
- * created on 2022/6/27 14:28
+ *
+ * @author Totoro created on 2022/6/27 14:28
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -22,6 +22,12 @@ public class WxCpTpLicenseCodeInfoResp extends WxCpBaseResp {
private WxCpTpLicenseActiveCodeInfo activeCodeInfo;
+ /**
+ * From json wx cp tp license code info resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license code info resp
+ */
public static WxCpTpLicenseCodeInfoResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseCodeInfoResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCorpAccountListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCorpAccountListResp.java
index 93c64dcfc..79e7f8130 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCorpAccountListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/account/WxCpTpLicenseCorpAccountListResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 企业的帐号列表(已激活)
* 文档地址:https://developer.work.weixin.qq.com/document/path/95544
- * @author Totoro
- * created on 2022/6/27 15:15
+ *
+ * @author Totoro created on 2022/6/27 15:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -30,6 +30,12 @@ public class WxCpTpLicenseCorpAccountListResp extends WxCpBaseResp {
private List orderList;
+ /**
+ * From json wx cp tp license corp account list resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license corp account list resp
+ */
public static WxCpTpLicenseCorpAccountListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseCorpAccountListResp.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseCreateOrderResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseCreateOrderResp.java
index a2092f07f..66648b75d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseCreateOrderResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseCreateOrderResp.java
@@ -9,8 +9,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 订单创建结果
* 文档地址:https://developer.work.weixin.qq.com/document/path/95644
- * @author Totoro
- * created on 2022-6-27 11:26:36
+ *
+ * @author Totoro created on 2022-6-27 11:26:36
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -21,11 +21,15 @@ public class WxCpTpLicenseCreateOrderResp extends WxCpBaseResp {
private String orderId;
+ /**
+ * From json wx cp tp license create order resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license create order resp
+ */
public static WxCpTpLicenseCreateOrderResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseCreateOrderResp.class);
}
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseNewOrderRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseNewOrderRequest.java
index dea1f4dac..232fd9d9e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseNewOrderRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseNewOrderRequest.java
@@ -1,4 +1,5 @@
package me.chanjar.weixin.cp.bean.license.order;
+
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -13,8 +14,8 @@ import java.io.Serializable;
/**
* 下单购买帐号
* 文档地址:https://developer.work.weixin.qq.com/document/path/95644
- * @author Totoro
- * created on 2022/6/27 10:52
+ *
+ * @author Totoro created on 2022/6/27 10:52
*/
@Data
@Builder
@@ -48,13 +49,14 @@ public class WxCpTpLicenseNewOrderRequest implements Serializable {
private WxCpTpLicenseAccountDuration accountDuration;
-
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
-
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderAccountListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderAccountListResp.java
index dcb607ef4..295fdb843 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderAccountListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderAccountListResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 获取订单中的帐号列表
* 文档地址:https://developer.work.weixin.qq.com/document/path/95649
- * @author Totoro
- * created on 2022-6-27 14:14:40
+ *
+ * @author Totoro created on 2022-6-27 14:14:40
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -30,10 +30,15 @@ public class WxCpTpLicenseOrderAccountListResp extends WxCpBaseResp {
private List accountList;
+ /**
+ * From json wx cp tp license order account list resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license order account list resp
+ */
public static WxCpTpLicenseOrderAccountListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseOrderAccountListResp.class);
}
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderInfoResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderInfoResp.java
index 1aacda9ed..691aa25a7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderInfoResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderInfoResp.java
@@ -9,8 +9,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 订单详情结果
* 文档:https://developer.work.weixin.qq.com/document/path/95648
- * @author Totoro
- * created on 2022/06/27 11:56:03
+ *
+ * @author Totoro created on 2022/06/27 11:56:03
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -21,10 +21,15 @@ public class WxCpTpLicenseOrderInfoResp extends WxCpBaseResp {
private WxCpTpLicenseOrder order;
+ /**
+ * From json wx cp tp license order info resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license order info resp
+ */
public static WxCpTpLicenseOrderInfoResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseOrderInfoResp.class);
}
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderListResp.java
index 5b4038a13..a9e0e5d32 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderListResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseOrderListResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 获取订单列表详情
* 文档地址:https://developer.work.weixin.qq.com/document/path/95647
- * @author Totoro
- * created on 2022/6/27 11:39
+ *
+ * @author Totoro created on 2022/6/27 11:39
*/
@Data
@EqualsAndHashCode(callSuper = true)
@@ -30,10 +30,15 @@ public class WxCpTpLicenseOrderListResp extends WxCpBaseResp {
private List orderList;
+ /**
+ * From json wx cp tp license order list resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license order list resp
+ */
public static WxCpTpLicenseOrderListResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseOrderListResp.class);
}
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobRequest.java
index 7c65b4fdd..aabae9459 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobRequest.java
@@ -1,4 +1,5 @@
package me.chanjar.weixin.cp.bean.license.order;
+
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -13,8 +14,8 @@ import java.util.List;
/**
* 创建下单续期帐号任务
* 文档地址:https://developer.work.weixin.qq.com/document/path/95646
- * @author Totoro
- * created on 2022/6/27 11:12
+ *
+ * @author Totoro created on 2022/6/27 11:12
*/
@Data
@Builder
@@ -40,7 +41,11 @@ public class WxCpTpLicenseRenewOrderJobRequest implements Serializable {
private String jobId;
-
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobResp.java
index 91e4970fb..31734b5ad 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobResp.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderJobResp.java
@@ -12,8 +12,8 @@ import java.util.List;
/**
* 创建下单购买帐号任务返回结果
* 文档地址:https://developer.work.weixin.qq.com/document/path/95646
- * @author Totoro
- * created on 2022-6-27 11:15:20
+ *
+ * @author Totoro created on 2022-6-27 11:15:20
*/
@EqualsAndHashCode(callSuper = true)
@Data
@@ -32,12 +32,15 @@ public class WxCpTpLicenseRenewOrderJobResp extends WxCpBaseResp {
private List invalidAccountList;
-
+ /**
+ * From json wx cp tp license renew order job resp.
+ *
+ * @param json the json
+ * @return the wx cp tp license renew order job resp
+ */
public static WxCpTpLicenseRenewOrderJobResp fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpLicenseRenewOrderJobResp.class);
}
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderRequest.java
index fa7e3d11e..196e02c1c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/license/order/WxCpTpLicenseRenewOrderRequest.java
@@ -1,4 +1,5 @@
package me.chanjar.weixin.cp.bean.license.order;
+
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -12,8 +13,8 @@ import java.io.Serializable;
/**
* 续期帐号订单
* 文档地址:https://developer.work.weixin.qq.com/document/path/95646
- * @author Totoro
- * created on 2022-6-27 11:21:51
+ *
+ * @author Totoro created on 2022-6-27 11:21:51
*/
@Data
@Builder
@@ -30,6 +31,11 @@ public class WxCpTpLicenseRenewOrderRequest implements Serializable {
private WxCpTpLicenseAccountDuration accountDuration;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingCreateRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingCreateRequest.java
index e733b805d..00d0320cd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingCreateRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingCreateRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 创建预约直播请求.
*
- * @author Wang_Wong
- * created on 2021-12-23
+ * @author Wang_Wong created on 2021-12-23
*/
@Data
@Builder
@@ -55,6 +54,9 @@ public class WxCpLivingCreateRequest implements Serializable {
@SerializedName("activity_detail")
private ActivityDetail activityDetail;
+ /**
+ * The type Activity detail.
+ */
@Getter
@Setter
public static class ActivityDetail implements Serializable {
@@ -65,20 +67,42 @@ public class WxCpLivingCreateRequest implements Serializable {
@SerializedName("description")
private String description;
+ /**
+ * From json activity detail.
+ *
+ * @param json the json
+ * @return the activity detail
+ */
public static ActivityDetail fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ActivityDetail.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp living create request.
+ *
+ * @param json the json
+ * @return the wx cp living create request
+ */
public static WxCpLivingCreateRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLivingCreateRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingInfo.java
index 59ba35cd1..f8fdeb351 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingInfo.java
@@ -69,10 +69,21 @@ public class WxCpLivingInfo implements Serializable {
@SerializedName("subscribe_count")
private Integer subscribeCount;
+ /**
+ * From json wx cp living info.
+ *
+ * @param json the json
+ * @return the wx cp living info
+ */
public static WxCpLivingInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLivingInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingModifyRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingModifyRequest.java
index 358429bee..fe8a44670 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingModifyRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingModifyRequest.java
@@ -13,8 +13,7 @@ import java.io.Serializable;
/**
* 创建预约直播请求.
*
- * @author Wang_Wong
- * created on 2021-12-23
+ * @author Wang_Wong created on 2021-12-23
*/
@Data
@Builder
@@ -45,10 +44,21 @@ public class WxCpLivingModifyRequest implements Serializable {
@SerializedName("type")
private Integer type;
+ /**
+ * From json wx cp living modify request.
+ *
+ * @param json the json
+ * @return the wx cp living modify request
+ */
public static WxCpLivingModifyRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLivingModifyRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingResult.java
index 09c912ad8..92f698848 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingResult.java
@@ -23,6 +23,9 @@ public class WxCpLivingResult implements Serializable {
@SerializedName("errmsg")
private String errmsg;
+ /**
+ * The type Living id result.
+ */
@Getter
@Setter
public static class LivingIdResult implements Serializable {
@@ -34,20 +37,42 @@ public class WxCpLivingResult implements Serializable {
@SerializedName("livingid_list")
private String[] livingIdList;
+ /**
+ * From json living id result.
+ *
+ * @param json the json
+ * @return the living id result
+ */
public static LivingIdResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, LivingIdResult.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp living result.
+ *
+ * @param json the json
+ * @return the wx cp living result
+ */
public static WxCpLivingResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLivingResult.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingShareInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingShareInfo.java
index f0b96cc96..16f74e253 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingShareInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpLivingShareInfo.java
@@ -29,10 +29,21 @@ public class WxCpLivingShareInfo implements Serializable {
@SerializedName("invitor_external_userid")
private String invitorExternalUserid;
+ /**
+ * From json wx cp living share info.
+ *
+ * @param json the json
+ * @return the wx cp living share info
+ */
public static WxCpLivingShareInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpLivingShareInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpWatchStat.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpWatchStat.java
index 4a77bdd45..f1c25a170 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpWatchStat.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/living/WxCpWatchStat.java
@@ -26,6 +26,9 @@ public class WxCpWatchStat implements Serializable {
@SerializedName("stat_info")
private StatInfo statInfo;
+ /**
+ * The type Stat info.
+ */
@Getter
@Setter
public static class StatInfo implements Serializable {
@@ -39,6 +42,9 @@ public class WxCpWatchStat implements Serializable {
}
+ /**
+ * The type User.
+ */
@Getter
@Setter
public static class User implements Serializable {
@@ -57,6 +63,9 @@ public class WxCpWatchStat implements Serializable {
}
+ /**
+ * The type External user.
+ */
@Getter
@Setter
public static class ExternalUser implements Serializable {
@@ -79,10 +88,21 @@ public class WxCpWatchStat implements Serializable {
}
+ /**
+ * From json wx cp watch stat.
+ *
+ * @param json the json
+ * @return the wx cp watch stat
+ */
public static WxCpWatchStat fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpWatchStat.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java
index 10dd3c1b2..e1cbb5c65 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpAppChatMessage.java
@@ -75,6 +75,11 @@ public class WxCpAppChatMessage implements Serializable {
/**
* 构建文本消息.
+ *
+ * @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();
@@ -87,6 +92,8 @@ public class WxCpAppChatMessage implements Serializable {
/**
* 生成json字符串.
+ *
+ * @return the string
*/
public String toJson() {
JsonObject messageJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java
index bb28fa8a2..a0e9be359 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpGroupRobotMessage.java
@@ -16,8 +16,7 @@ import static me.chanjar.weixin.cp.constant.WxCpConsts.GroupRobotMsgType.*;
/**
* 微信群机器人消息
*
- * @author yr
- * created on 2020-08-20
+ * @author yr created on 2020-08-20
*/
@AllArgsConstructor
@NoArgsConstructor
@@ -62,6 +61,11 @@ public class WxCpGroupRobotMessage implements Serializable {
*/
private String mediaId;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
JsonObject messageJson = new JsonObject();
messageJson.addProperty("msgtype", this.getMsgType());
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
index 19461070c..92209fd4e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
@@ -23,8 +23,7 @@ import static me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType.*;
* 互联企业消息.
* https://developer.work.weixin.qq.com/document/path/90250
*
- * @author Binary Wang
- * created on 2020-08-30
+ * @author Binary Wang created on 2020-08-30
*/
@Data
@Builder
@@ -44,7 +43,8 @@ public class WxCpLinkedCorpMessage implements Serializable {
*/
private String[] toUsers;
/**
- * 部门ID列表,最多支持100个。partyid在互联圈子内唯一。每个元素都是字符串类型,格式为:linked_id/party_id,其中linked_id是互联id,party_id是在互联圈子中的部门id。如果是本企业的部门,则直接传party_id即可。
+ * 部门ID列表,最多支持100个。partyid在互联圈子内唯一。每个元素都是字符串类型,格式为:linked_id/party_id,其中linked_id是互联id,party_id是在互联圈子中的部门id
+ * 。如果是本企业的部门,则直接传party_id即可。
*/
private String[] toParties;
/**
@@ -100,6 +100,11 @@ public class WxCpLinkedCorpMessage implements Serializable {
this.msgType = msgType;
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
JsonObject messageJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java
index 5008db115..9d264664e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageSendResult.java
@@ -9,8 +9,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 互联企业的消息推送接口返回实体
*
- * @author pg
- * created on 2021年6月22日
+ * @author pg created on 2021年6月22日
*/
@Setter
@Getter
@@ -31,6 +30,12 @@ public class WxCpLinkedCorpMessageSendResult extends WxCpBaseResp {
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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
index 1ce367d9f..c52d564c8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
@@ -219,6 +219,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得文本消息builder.
+ *
+ * @return the text builder
*/
public static TextBuilder TEXT() {
return new TextBuilder();
@@ -226,6 +228,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得文本卡片消息builder.
+ *
+ * @return the text card builder
*/
public static TextCardBuilder TEXTCARD() {
return new TextCardBuilder();
@@ -233,6 +237,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得图片消息builder.
+ *
+ * @return the image builder
*/
public static ImageBuilder IMAGE() {
return new ImageBuilder();
@@ -240,6 +246,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得语音消息builder.
+ *
+ * @return the voice builder
*/
public static VoiceBuilder VOICE() {
return new VoiceBuilder();
@@ -247,6 +255,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得视频消息builder.
+ *
+ * @return the video builder
*/
public static VideoBuilder VIDEO() {
return new VideoBuilder();
@@ -254,6 +264,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得图文消息builder.
+ *
+ * @return the news builder
*/
public static NewsBuilder NEWS() {
return new NewsBuilder();
@@ -261,6 +273,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得mpnews图文消息builder.
+ *
+ * @return the mpnews builder
*/
public static MpnewsBuilder MPNEWS() {
return new MpnewsBuilder();
@@ -268,6 +282,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得markdown消息builder.
+ *
+ * @return the markdown msg builder
*/
public static MarkdownMsgBuilder MARKDOWN() {
return new MarkdownMsgBuilder();
@@ -275,6 +291,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得文件消息builder.
+ *
+ * @return the file builder
*/
public static FileBuilder FILE() {
return new FileBuilder();
@@ -282,6 +300,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得任务卡片消息builder.
+ *
+ * @return the task card builder
*/
public static TaskCardBuilder TASKCARD() {
return new TaskCardBuilder();
@@ -289,6 +309,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得任务卡片消息builder.
+ *
+ * @return the template card builder
*/
public static TemplateCardBuilder TEMPLATECARD() {
return new TemplateCardBuilder();
@@ -296,6 +318,8 @@ public class WxCpMessage implements Serializable {
/**
* 获得小程序通知消息builder.
+ *
+ * @return the mini program notice msg builder
*/
public static MiniProgramNoticeMsgBuilder newMiniProgramNoticeBuilder() {
return new MiniProgramNoticeMsgBuilder();
@@ -323,6 +347,11 @@ public class WxCpMessage implements Serializable {
this.msgType = msgType;
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
JsonObject messageJson = new JsonObject();
if (this.getAgentId() != null) {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java
index fdb72c7a7..2ddf95d8d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendResult.java
@@ -25,6 +25,12 @@ public class WxCpMessageSendResult implements Serializable {
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);
}
@@ -53,6 +59,11 @@ public class WxCpMessageSendResult implements Serializable {
@SerializedName("response_code")
private String responseCode;
+ /**
+ * Gets invalid user list.
+ *
+ * @return the invalid user list
+ */
public List getInvalidUserList() {
return this.content2List(this.invalidUser);
}
@@ -65,10 +76,20 @@ public class WxCpMessageSendResult implements Serializable {
return Splitter.on("|").splitToList(content);
}
+ /**
+ * Gets invalid party list.
+ *
+ * @return the invalid party list
+ */
public List getInvalidPartyList() {
return this.content2List(this.invalidParty);
}
+ /**
+ * Gets invalid tag list.
+ *
+ * @return the invalid tag list
+ */
public List getInvalidTagList() {
return this.content2List(this.invalidTag);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java
index df83a2320..5b223a2a8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessageSendStatistics.java
@@ -10,19 +10,27 @@ import java.util.List;
/**
* 应用消息发送统计信息.
*
- * @author Binary Wang
- * created on 2020-09-13
+ * @author Binary Wang 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 statistics;
+ /**
+ * The type Statistic item.
+ */
@Data
public static class StatisticItem implements Serializable {
private static final long serialVersionUID = 6031833682211475786L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
index 7990a246f..a13205cd6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
@@ -24,8 +24,7 @@ import static me.chanjar.weixin.common.api.WxConsts.SchoolContactMsgType.*;
* 发送「学校通知」
* https://developer.work.weixin.qq.com/document/path/92321
*
- * @author Wang_Wong
- * created on 2022-06-29
+ * @author Wang_Wong created on 2022-06-29
*/
@Data
@Builder
@@ -148,7 +147,8 @@ public class WxCpSchoolContactMessage implements Serializable {
/**
* 图文消息(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
+ * 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
*
* mpnews类型的图文消息,跟普通的图文消息一致,唯一的差异是图文内容存储在企业微信。
* 多次发送mpnews,会被认为是不同的图文,阅读、点赞的统计会被分开计算。
@@ -173,6 +173,11 @@ public class WxCpSchoolContactMessage implements Serializable {
this.msgType = msgType;
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
JsonObject messageJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java
index 584de8a40..a66f9baf7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageSendResult.java
@@ -9,8 +9,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
* 发送「学校通知」返回实体
* https://developer.work.weixin.qq.com/document/path/92321
*
- * @author Wang_Wong
- * created on 2022-06-29
+ * @author Wang_Wong created on 2022-06-29
*/
@Data
public class WxCpSchoolContactMessageSendResult extends WxCpBaseResp {
@@ -29,6 +28,12 @@ public class WxCpSchoolContactMessageSendResult extends WxCpBaseResp {
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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java
index c2aef9e13..a3b68c234 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpTpXmlMessage.java
@@ -33,218 +33,386 @@ public class WxCpTpXmlMessage implements Serializable {
*/
private Map 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;
- //ref: https://work.weixin.qq.com/api/doc/90001/90143/90585
+ /**
+ * 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 String 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;
@@ -334,92 +502,164 @@ public class WxCpTpXmlMessage implements Serializable {
@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.
+ */
@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 approvalNodes;
+ /**
+ * The Notify nodes.
+ */
@XStreamAlias("NotifyNodes")
protected List 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.自建/第三方应用调用审批流程引擎发起申请之后,在“审批中”状态,有任意审批人进行审批操作时
@@ -428,53 +668,104 @@ public class WxCpTpXmlMessage implements Serializable {
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- 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("
", "");
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java
index 33d1375b1..bcb24f8fe 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlApprovalInfo.java
@@ -11,10 +11,10 @@ import java.util.List;
/**
* 审批信息
- *
+ *
* 审批申请状态变化回调通知
* https://developer.work.weixin.qq.com/document/path/91815
- *
+ *
* 自建应用审批状态变化通知回调
* https://developer.work.weixin.qq.com/document/path/90269
*
@@ -447,7 +447,7 @@ public class WxCpXmlApprovalInfo implements Serializable {
/**
* 备注意见附件,值是附件media_id
*/
- @XStreamImplicit(itemFieldName="Attach")
+ @XStreamImplicit(itemFieldName = "Attach")
private List attach;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java
index 6a81a7b50..51e395ab1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java
@@ -287,6 +287,7 @@ public class WxCpXmlMessage implements Serializable {
/**
* 企业邮箱;代开发自建应用不返回该字段。
* ISSUE#2584
+ *
* @see Link
*/
@XStreamAlias("BizMail")
@@ -485,10 +486,10 @@ public class WxCpXmlMessage implements Serializable {
/**
* 审批消息
- *
+ *
* 审批申请状态变化回调通知
* https://developer.work.weixin.qq.com/document/path/91815
- *
+ *
* 自建应用审批状态变化通知回调
* https://developer.work.weixin.qq.com/document/path/90269
*/
@@ -496,6 +497,12 @@ public class WxCpXmlMessage implements Serializable {
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("
", "");
@@ -504,6 +511,13 @@ public class WxCpXmlMessage implements Serializable {
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(" ", "");
@@ -512,12 +526,25 @@ public class WxCpXmlMessage implements Serializable {
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) {
@@ -533,10 +560,21 @@ public class WxCpXmlMessage implements Serializable {
}
+ /**
+ * 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);
+ return fromEncryptedXml(IOUtils.toString(is, StandardCharsets.UTF_8), wxCpConfigStorage, timestamp, nonce,
+ msgSignature);
} catch (IOException e) {
throw new WxRuntimeException(e);
}
@@ -547,6 +585,9 @@ public class WxCpXmlMessage implements Serializable {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Scan code info.
+ */
@Data
@XStreamAlias("ScanCodeInfo")
public static class ScanCodeInfo implements Serializable {
@@ -567,13 +608,22 @@ public class WxCpXmlMessage implements Serializable {
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- items = new ArrayList<>();
+ /**
+ * The type Item.
+ */
@XStreamAlias("Item")
@Data
public static class Item implements Serializable {
@@ -589,17 +639,26 @@ public class WxCpXmlMessage implements Serializable {
}
}
+ /**
+ * 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
- picList = new ArrayList<>();
@XStreamAlias("Count")
private Long count;
+ /**
+ * The type Item.
+ */
@XStreamAlias("item")
@Data
public static class Item implements Serializable {
@@ -611,6 +670,9 @@ public class WxCpXmlMessage implements Serializable {
}
}
+ /**
+ * The type Send location info.
+ */
@Data
@XStreamAlias("SendLocationInfo")
public static class SendLocationInfo implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java
index 2dccf0b45..9a8352244 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutEventMessage.java
@@ -8,9 +8,10 @@ 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
- * @description:
- * created on create at 2021/12/3 16:36
+ * @description: created on create at 2021/12/3 16:36
*/
@XStreamAlias("xml")
@Data
@@ -77,6 +78,9 @@ public class WxCpXmlOutEventMessage extends WxCpXmlOutMessage {
@XStreamConverter(value = XStreamCDataConverter.class)
private String id;
+ /**
+ * Instantiates a new Wx cp xml out event message.
+ */
public WxCpXmlOutEventMessage() {
this.msgType = WxConsts.XmlMsgType.EVENT;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java
index 99792a2bf..c3f453200 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutImageMessage.java
@@ -7,6 +7,9 @@ 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)
@@ -17,6 +20,9 @@ public class WxCpXmlOutImageMessage extends WxCpXmlOutMessage {
@XStreamConverter(value = XStreamMediaIdConverter.class)
private String mediaId;
+ /**
+ * Instantiates a new Wx cp xml out image message.
+ */
public WxCpXmlOutImageMessage() {
this.msgType = WxConsts.XmlMsgType.IMAGE;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java
index 89c29e25c..b8b5a67b8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutMessage.java
@@ -22,23 +22,37 @@ import java.io.Serializable;
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();
@@ -46,6 +60,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得图片消息builder.
+ *
+ * @return the image builder
*/
public static ImageBuilder IMAGE() {
return new ImageBuilder();
@@ -53,6 +69,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得语音消息builder.
+ *
+ * @return the voice builder
*/
public static VoiceBuilder VOICE() {
return new VoiceBuilder();
@@ -60,6 +78,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得视频消息builder.
+ *
+ * @return the video builder
*/
public static VideoBuilder VIDEO() {
return new VideoBuilder();
@@ -67,6 +87,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得图文消息builder.
+ *
+ * @return the news builder
*/
public static NewsBuilder NEWS() {
return new NewsBuilder();
@@ -74,6 +96,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得任务卡片消息builder.
+ *
+ * @return the task card builder
*/
public static TaskCardBuilder TASK_CARD() {
return new TaskCardBuilder();
@@ -81,6 +105,8 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得任务卡片消息builder.
+ *
+ * @return the update button builder
*/
public static UpdateButtonBuilder UPDATE_BUTTON() {
return new UpdateButtonBuilder();
@@ -88,17 +114,27 @@ public abstract class WxCpXmlOutMessage implements Serializable {
/**
* 获得事件消息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();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java
index 7b13ccfca..f77e5d6d5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutNewsMessage.java
@@ -11,28 +11,48 @@ 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
- 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 {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java
index 63816f7e4..d5042780f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTaskCardMessage.java
@@ -7,6 +7,9 @@ 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)
@@ -17,6 +20,9 @@ public class WxCpXmlOutTaskCardMessage extends WxCpXmlOutMessage {
@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;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java
index dfae8fef4..0adda399f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutTextMessage.java
@@ -7,6 +7,9 @@ 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)
@@ -17,6 +20,9 @@ public class WxCpXmlOutTextMessage extends WxCpXmlOutMessage {
@XStreamConverter(value = XStreamCDataConverter.class)
private String content;
+ /**
+ * Instantiates a new Wx cp xml out text message.
+ */
public WxCpXmlOutTextMessage() {
this.msgType = WxConsts.XmlMsgType.TEXT;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java
index 3072c8900..6c5ef835d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutUpdateBtnMessage.java
@@ -8,8 +8,9 @@ import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.util.xml.XStreamReplaceNameConverter;
/**
- * @author nickname263
- * created on 2021-09-23
+ * The type Wx cp xml out update btn message.
+ *
+ * @author nickname263 created on 2021-09-23
*/
@XStreamAlias("xml")
@Data
@@ -20,6 +21,9 @@ public class WxCpXmlOutUpdateBtnMessage extends WxCpXmlOutMessage {
@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;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java
index add435a87..8c78528a6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVideoMessage.java
@@ -9,43 +9,85 @@ 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 {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java
index 7a2e0e49c..ebfd80ab6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlOutVoiceMessage.java
@@ -7,6 +7,9 @@ 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)
@@ -17,6 +20,9 @@ public class WxCpXmlOutVoiceMessage extends WxCpXmlOutMessage {
@XStreamConverter(value = XStreamMediaIdConverter.class)
private String mediaId;
+ /**
+ * Instantiates a new Wx cp xml out voice message.
+ */
public WxCpXmlOutVoiceMessage() {
this.msgType = WxConsts.XmlMsgType.VOICE;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
index ec312c6fb..fcbc578a5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
@@ -4,39 +4,97 @@ import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.cp.bean.message.WxCpMessage;
import org.apache.commons.lang3.StringUtils;
+/**
+ * The type Base builder.
+ *
+ * @param
the type parameter
+ */
public class BaseBuilder {
+ /**
+ * The Msg type.
+ */
protected String msgType;
+ /**
+ * The Agent id.
+ */
protected Integer agentId;
+ /**
+ * The To user.
+ */
protected String toUser;
+ /**
+ * The To party.
+ */
protected String toParty;
+ /**
+ * The To tag.
+ */
protected String toTag;
+ /**
+ * The Safe.
+ */
protected String safe;
+ /**
+ * Agent id t.
+ *
+ * @param agentId the agent id
+ * @return the t
+ */
public T agentId(Integer agentId) {
this.agentId = agentId;
return (T) this;
}
+ /**
+ * To user t.
+ *
+ * @param toUser the to user
+ * @return the t
+ */
public T toUser(String toUser) {
this.toUser = toUser;
return (T) this;
}
+ /**
+ * To party t.
+ *
+ * @param toParty the to party
+ * @return the t
+ */
public T toParty(String toParty) {
this.toParty = toParty;
return (T) this;
}
+ /**
+ * To tag t.
+ *
+ * @param toTag the to tag
+ * @return the t
+ */
public T toTag(String toTag) {
this.toTag = toTag;
return (T) this;
}
+ /**
+ * Safe t.
+ *
+ * @param safe the safe
+ * @return the t
+ */
public T safe(String safe) {
this.safe = safe;
return (T) this;
}
+ /**
+ * Build wx cp message.
+ *
+ * @return the wx cp message
+ */
public WxCpMessage build() {
WxCpMessage m = new WxCpMessage();
m.setAgentId(this.agentId);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/FileBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/FileBuilder.java
index 6b36cf6cf..2d9561486 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/FileBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/FileBuilder.java
@@ -14,10 +14,19 @@ import me.chanjar.weixin.cp.bean.message.WxCpMessage;
public final class FileBuilder extends BaseBuilder {
private String mediaId;
+ /**
+ * Instantiates a new File builder.
+ */
public FileBuilder() {
this.msgType = WxConsts.KefuMsgType.FILE;
}
+ /**
+ * Media id file builder.
+ *
+ * @param media_id the media id
+ * @return the file builder
+ */
public FileBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/ImageBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/ImageBuilder.java
index 6735385c9..5f88b5965 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/ImageBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/ImageBuilder.java
@@ -14,10 +14,19 @@ import me.chanjar.weixin.cp.bean.message.WxCpMessage;
public final class ImageBuilder extends BaseBuilder {
private String mediaId;
+ /**
+ * Instantiates a new Image builder.
+ */
public ImageBuilder() {
this.msgType = WxConsts.KefuMsgType.IMAGE;
}
+ /**
+ * Media id image builder.
+ *
+ * @param media_id the media id
+ * @return the image builder
+ */
public ImageBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MarkdownMsgBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MarkdownMsgBuilder.java
index 6b6af40ac..ce06eafd2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MarkdownMsgBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MarkdownMsgBuilder.java
@@ -14,10 +14,19 @@ import me.chanjar.weixin.cp.bean.message.WxCpMessage;
public class MarkdownMsgBuilder extends BaseBuilder {
private String content;
+ /**
+ * Instantiates a new Markdown msg builder.
+ */
public MarkdownMsgBuilder() {
this.msgType = WxConsts.KefuMsgType.MARKDOWN;
}
+ /**
+ * Content markdown msg builder.
+ *
+ * @param content the content
+ * @return the markdown msg builder
+ */
public MarkdownMsgBuilder content(String content) {
this.content = content;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MiniProgramNoticeMsgBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MiniProgramNoticeMsgBuilder.java
index 928ea3863..b21197245 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MiniProgramNoticeMsgBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MiniProgramNoticeMsgBuilder.java
@@ -21,35 +21,74 @@ public class MiniProgramNoticeMsgBuilder extends BaseBuilder contentItems;
+ /**
+ * Instantiates a new Mini program notice msg builder.
+ */
public MiniProgramNoticeMsgBuilder() {
this.msgType = WxConsts.KefuMsgType.MINIPROGRAM_NOTICE;
}
+ /**
+ * App id mini program notice msg builder.
+ *
+ * @param appId the app id
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder appId(String appId) {
this.appId = appId;
return this;
}
+ /**
+ * Page mini program notice msg builder.
+ *
+ * @param page the page
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder page(String page) {
this.page = page;
return this;
}
+ /**
+ * Title mini program notice msg builder.
+ *
+ * @param title the title
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder title(String title) {
this.title = title;
return this;
}
+ /**
+ * Description mini program notice msg builder.
+ *
+ * @param description the description
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder description(String description) {
this.description = description;
return this;
}
+ /**
+ * Content items mini program notice msg builder.
+ *
+ * @param contentItems the content items
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder contentItems(Map contentItems) {
this.contentItems = contentItems;
return this;
}
+ /**
+ * Emphasis first item mini program notice msg builder.
+ *
+ * @param emphasisFirstItem the emphasis first item
+ * @return the mini program notice msg builder
+ */
public MiniProgramNoticeMsgBuilder emphasisFirstItem(Boolean emphasisFirstItem) {
this.emphasisFirstItem = emphasisFirstItem;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MpnewsBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MpnewsBuilder.java
index 1d2108900..f9b31cdfc 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MpnewsBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/MpnewsBuilder.java
@@ -22,20 +22,41 @@ public final class MpnewsBuilder extends BaseBuilder {
private String mediaId;
+ /**
+ * Instantiates a new Mpnews builder.
+ */
public MpnewsBuilder() {
this.msgType = WxConsts.KefuMsgType.MPNEWS;
}
+ /**
+ * Media id mpnews builder.
+ *
+ * @param mediaId the media id
+ * @return the mpnews builder
+ */
public MpnewsBuilder mediaId(String mediaId) {
this.mediaId = mediaId;
return this;
}
+ /**
+ * Add article mpnews builder.
+ *
+ * @param articles the articles
+ * @return the mpnews builder
+ */
public MpnewsBuilder addArticle(MpnewsArticle... articles) {
Collections.addAll(this.articles, articles);
return this;
}
+ /**
+ * Articles mpnews builder.
+ *
+ * @param articles the articles
+ * @return the mpnews builder
+ */
public MpnewsBuilder articles(List articles) {
this.articles = articles;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/NewsBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/NewsBuilder.java
index 4d12a51ce..7d75f5f2b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/NewsBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/NewsBuilder.java
@@ -21,15 +21,30 @@ public final class NewsBuilder extends BaseBuilder {
private List articles = new ArrayList<>();
+ /**
+ * Instantiates a new News builder.
+ */
public NewsBuilder() {
this.msgType = WxConsts.KefuMsgType.NEWS;
}
+ /**
+ * Add article news builder.
+ *
+ * @param articles the articles
+ * @return the news builder
+ */
public NewsBuilder addArticle(NewArticle... articles) {
Collections.addAll(this.articles, articles);
return this;
}
+ /**
+ * Articles news builder.
+ *
+ * @param articles the articles
+ * @return the news builder
+ */
public NewsBuilder articles(List articles) {
this.articles = articles;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TaskCardBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TaskCardBuilder.java
index a63505eef..f23ada28d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TaskCardBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TaskCardBuilder.java
@@ -12,8 +12,7 @@ import java.util.List;
* 用法: WxCustomMessage m = WxCustomMessage.TASKCARD().title(...)....toUser(...).build();
*
*
- * @author Jeff
- * created on 2019-05-16
+ * @author Jeff created on 2019-05-16
*/
public class TaskCardBuilder extends BaseBuilder {
private String title;
@@ -25,30 +24,63 @@ public class TaskCardBuilder extends BaseBuilder {
*/
private List buttons;
+ /**
+ * Instantiates a new Task card builder.
+ */
public TaskCardBuilder() {
this.msgType = WxConsts.KefuMsgType.TASKCARD;
}
+ /**
+ * Title task card builder.
+ *
+ * @param title the title
+ * @return the task card builder
+ */
public TaskCardBuilder title(String title) {
this.title = title;
return this;
}
+ /**
+ * Description task card builder.
+ *
+ * @param description the description
+ * @return the task card builder
+ */
public TaskCardBuilder description(String description) {
this.description = description;
return this;
}
+ /**
+ * Url task card builder.
+ *
+ * @param url the url
+ * @return the task card builder
+ */
public TaskCardBuilder url(String url) {
this.url = url;
return this;
}
+ /**
+ * Task id task card builder.
+ *
+ * @param taskId the task id
+ * @return the task card builder
+ */
public TaskCardBuilder taskId(String taskId) {
this.taskId = taskId;
return this;
}
+ /**
+ * Buttons task card builder.
+ *
+ * @param buttons the buttons
+ * @return the task card builder
+ */
public TaskCardBuilder buttons(List buttons) {
this.buttons = buttons;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TemplateCardBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TemplateCardBuilder.java
index 174c23f29..674bdfa18 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TemplateCardBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TemplateCardBuilder.java
@@ -12,8 +12,7 @@ import java.util.List;
* 用法: WxCustomMessage m = WxCustomMessage.TEMPLATECARD().title(...)....toUser(...).build();
*
*
- * @author yzts a>
- * created on 2019-05-16
+ * @author yzts a> created on 2019-05-16
*/
public class TemplateCardBuilder extends BaseBuilder {
/**
@@ -168,150 +167,327 @@ public class TemplateCardBuilder extends BaseBuilder {
private QuoteArea quoteArea;
+ /**
+ * Instantiates a new Template card builder.
+ */
public TemplateCardBuilder() {
this.msgType = WxConsts.KefuMsgType.TEMPLATE_CARD;
}
+ /**
+ * Card type template card builder.
+ *
+ * @param cardType the card type
+ * @return the template card builder
+ */
public TemplateCardBuilder cardType(String cardType) {
this.cardType = cardType;
return this;
}
+ /**
+ * Card image url template card builder.
+ *
+ * @param cardImageUrl the card image url
+ * @return the template card builder
+ */
public TemplateCardBuilder cardImageUrl(String cardImageUrl) {
this.cardImageUrl = cardImageUrl;
return this;
}
+ /**
+ * Card image aspect ratio template card builder.
+ *
+ * @param cardImageAspectRatio the card image aspect ratio
+ * @return the template card builder
+ */
public TemplateCardBuilder cardImageAspectRatio(Float cardImageAspectRatio) {
this.cardImageAspectRatio = cardImageAspectRatio;
return this;
}
+ /**
+ * Action menu desc template card builder.
+ *
+ * @param actionMenuDesc the action menu desc
+ * @return the template card builder
+ */
public TemplateCardBuilder actionMenuDesc(String actionMenuDesc) {
this.actionMenuDesc = actionMenuDesc;
return this;
}
+ /**
+ * Action menu action list template card builder.
+ *
+ * @param actionMenuItemList the action menu item list
+ * @return the template card builder
+ */
public TemplateCardBuilder actionMenuActionList(List actionMenuItemList) {
this.actionMenuActionList = actionMenuItemList;
return this;
}
+ /**
+ * Source icon url template card builder.
+ *
+ * @param sourceIconUrl the source icon url
+ * @return the template card builder
+ */
public TemplateCardBuilder sourceIconUrl(String sourceIconUrl) {
this.sourceIconUrl = sourceIconUrl;
return this;
}
+ /**
+ * Source desc template card builder.
+ *
+ * @param sourceDesc the source desc
+ * @return the template card builder
+ */
public TemplateCardBuilder sourceDesc(String sourceDesc) {
this.sourceDesc = sourceDesc;
return this;
}
+ /**
+ * Source desc color template card builder.
+ *
+ * @param sourceDescColor the source desc color
+ * @return the template card builder
+ */
public TemplateCardBuilder sourceDescColor(Integer sourceDescColor) {
this.sourceDescColor = sourceDescColor;
return this;
}
+ /**
+ * Main title title template card builder.
+ *
+ * @param mainTitleTitle the main title title
+ * @return the template card builder
+ */
public TemplateCardBuilder mainTitleTitle(String mainTitleTitle) {
this.mainTitleTitle = mainTitleTitle;
return this;
}
+ /**
+ * Main title desc template card builder.
+ *
+ * @param mainTitleDesc the main title desc
+ * @return the template card builder
+ */
public TemplateCardBuilder mainTitleDesc(String mainTitleDesc) {
this.mainTitleDesc = mainTitleDesc;
return this;
}
+ /**
+ * Emphasis content title template card builder.
+ *
+ * @param emphasisContentTitle the emphasis content title
+ * @return the template card builder
+ */
public TemplateCardBuilder emphasisContentTitle(String emphasisContentTitle) {
this.emphasisContentTitle = emphasisContentTitle;
return this;
}
+ /**
+ * Emphasis content desc template card builder.
+ *
+ * @param emphasisContentDesc the emphasis content desc
+ * @return the template card builder
+ */
public TemplateCardBuilder emphasisContentDesc(String emphasisContentDesc) {
this.emphasisContentDesc = emphasisContentDesc;
return this;
}
+ /**
+ * Sub title text template card builder.
+ *
+ * @param subTitleText the sub title text
+ * @return the template card builder
+ */
public TemplateCardBuilder subTitleText(String subTitleText) {
this.subTitleText = subTitleText;
return this;
}
+ /**
+ * Vertical contents template card builder.
+ *
+ * @param verticalContents the vertical contents
+ * @return the template card builder
+ */
public TemplateCardBuilder verticalContents(List verticalContents) {
this.verticalContents = verticalContents;
return this;
}
+ /**
+ * Horizontal contents template card builder.
+ *
+ * @param horizontalContents the horizontal contents
+ * @return the template card builder
+ */
public TemplateCardBuilder horizontalContents(List horizontalContents) {
this.horizontalContents = horizontalContents;
return this;
}
+ /**
+ * Jumps template card builder.
+ *
+ * @param jumps the jumps
+ * @return the template card builder
+ */
public TemplateCardBuilder jumps(List jumps) {
this.jumps = jumps;
return this;
}
+ /**
+ * Card action type template card builder.
+ *
+ * @param cardActionType the card action type
+ * @return the template card builder
+ */
public TemplateCardBuilder cardActionType(Integer cardActionType) {
this.cardActionType = cardActionType;
return this;
}
+ /**
+ * Card action url template card builder.
+ *
+ * @param cardActionUrl the card action url
+ * @return the template card builder
+ */
public TemplateCardBuilder cardActionUrl(String cardActionUrl) {
this.cardActionUrl = cardActionUrl;
return this;
}
+ /**
+ * Card action appid template card builder.
+ *
+ * @param cardActionAppid the card action appid
+ * @return the template card builder
+ */
public TemplateCardBuilder cardActionAppid(String cardActionAppid) {
this.cardActionAppid = cardActionAppid;
return this;
}
+ /**
+ * Card action pagepath template card builder.
+ *
+ * @param cardActionPagepath the card action pagepath
+ * @return the template card builder
+ */
public TemplateCardBuilder cardActionPagepath(String cardActionPagepath) {
this.cardActionPagepath = cardActionPagepath;
return this;
}
+ /**
+ * Task id template card builder.
+ *
+ * @param taskId the task id
+ * @return the template card builder
+ */
public TemplateCardBuilder taskId(String taskId) {
this.taskId = taskId;
return this;
}
+ /**
+ * Buttons template card builder.
+ *
+ * @param buttons the buttons
+ * @return the template card builder
+ */
public TemplateCardBuilder buttons(List buttons) {
this.buttons = buttons;
return this;
}
+ /**
+ * Checkbox question key template card builder.
+ *
+ * @param checkboxQuestionKey the checkbox question key
+ * @return the template card builder
+ */
public TemplateCardBuilder checkboxQuestionKey(String checkboxQuestionKey) {
this.checkboxQuestionKey = checkboxQuestionKey;
return this;
}
+ /**
+ * Checkbox mode template card builder.
+ *
+ * @param checkboxMode the checkbox mode
+ * @return the template card builder
+ */
public TemplateCardBuilder checkboxMode(Integer checkboxMode) {
this.checkboxMode = checkboxMode;
return this;
}
+ /**
+ * Options template card builder.
+ *
+ * @param options the options
+ * @return the template card builder
+ */
public TemplateCardBuilder options(List options) {
this.options = options;
return this;
}
+ /**
+ * Submit button text template card builder.
+ *
+ * @param submitButtonText the submit button text
+ * @return the template card builder
+ */
public TemplateCardBuilder submitButtonText(String submitButtonText) {
this.submitButtonText = submitButtonText;
return this;
}
+ /**
+ * Submit button key template card builder.
+ *
+ * @param submitButtonKey the submit button key
+ * @return the template card builder
+ */
public TemplateCardBuilder submitButtonKey(String submitButtonKey) {
this.submitButtonKey = submitButtonKey;
return this;
}
+ /**
+ * Selects template card builder.
+ *
+ * @param selects the selects
+ * @return the template card builder
+ */
public TemplateCardBuilder selects(List selects) {
this.selects = selects;
return this;
}
+ /**
+ * Quote area template card builder.
+ *
+ * @param quoteArea the quote area
+ * @return the template card builder
+ */
public TemplateCardBuilder quoteArea(QuoteArea quoteArea) {
this.quoteArea = quoteArea;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextBuilder.java
index e072b9a79..40de567f5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextBuilder.java
@@ -14,10 +14,19 @@ import me.chanjar.weixin.cp.bean.message.WxCpMessage;
public final class TextBuilder extends BaseBuilder {
private String content;
+ /**
+ * Instantiates a new Text builder.
+ */
public TextBuilder() {
this.msgType = WxConsts.KefuMsgType.TEXT;
}
+ /**
+ * Content text builder.
+ *
+ * @param content the content
+ * @return the text builder
+ */
public TextBuilder content(String content) {
this.content = content;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextCardBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextCardBuilder.java
index 306187ee4..3f58c9954 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextCardBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/TextCardBuilder.java
@@ -18,25 +18,52 @@ public class TextCardBuilder extends BaseBuilder {
private String url;
private String btnTxt;
+ /**
+ * Instantiates a new Text card builder.
+ */
public TextCardBuilder() {
this.msgType = WxConsts.KefuMsgType.TEXTCARD;
}
+ /**
+ * Title text card builder.
+ *
+ * @param title the title
+ * @return the text card builder
+ */
public TextCardBuilder title(String title) {
this.title = title;
return this;
}
+ /**
+ * Description text card builder.
+ *
+ * @param description the description
+ * @return the text card builder
+ */
public TextCardBuilder description(String description) {
this.description = description;
return this;
}
+ /**
+ * Url text card builder.
+ *
+ * @param url the url
+ * @return the text card builder
+ */
public TextCardBuilder url(String url) {
this.url = url;
return this;
}
+ /**
+ * Btn txt text card builder.
+ *
+ * @param btnTxt the btn txt
+ * @return the text card builder
+ */
public TextCardBuilder btnTxt(String btnTxt) {
this.btnTxt = btnTxt;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VideoBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VideoBuilder.java
index 2c7fab5c8..226e9dbe7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VideoBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VideoBuilder.java
@@ -23,25 +23,52 @@ public final class VideoBuilder extends BaseBuilder {
private String description;
private String thumbMediaId;
+ /**
+ * Instantiates a new Video builder.
+ */
public VideoBuilder() {
this.msgType = WxConsts.KefuMsgType.VIDEO;
}
+ /**
+ * Media id video builder.
+ *
+ * @param mediaId the media id
+ * @return the video builder
+ */
public VideoBuilder mediaId(String mediaId) {
this.mediaId = mediaId;
return this;
}
+ /**
+ * Title video builder.
+ *
+ * @param title the title
+ * @return the video builder
+ */
public VideoBuilder title(String title) {
this.title = title;
return this;
}
+ /**
+ * Description video builder.
+ *
+ * @param description the description
+ * @return the video builder
+ */
public VideoBuilder description(String description) {
this.description = description;
return this;
}
+ /**
+ * Thumb media id video builder.
+ *
+ * @param thumb_media_id the thumb media id
+ * @return the video builder
+ */
public VideoBuilder thumbMediaId(String thumb_media_id) {
this.thumbMediaId = thumb_media_id;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VoiceBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VoiceBuilder.java
index 0e0b9f828..62308a6d4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VoiceBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/VoiceBuilder.java
@@ -14,10 +14,19 @@ import me.chanjar.weixin.cp.bean.message.WxCpMessage;
public final class VoiceBuilder extends BaseBuilder {
private String mediaId;
+ /**
+ * Instantiates a new Voice builder.
+ */
public VoiceBuilder() {
this.msgType = WxConsts.KefuMsgType.VOICE;
}
+ /**
+ * Media id voice builder.
+ *
+ * @param media_id the media id
+ * @return the voice builder
+ */
public VoiceBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java
index 43a36681e..647bebbad 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpAgreeInfo.java
@@ -27,6 +27,9 @@ public class WxCpAgreeInfo implements Serializable {
@SerializedName("agreeinfo")
private List agreeInfo;
+ /**
+ * The type Agree info.
+ */
@Getter
@Setter
public static class AgreeInfo implements Serializable {
@@ -44,20 +47,42 @@ public class WxCpAgreeInfo implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java
index aa40e9734..89f021939 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatDatas.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 聊天记录数据内容.
*
- * @author Wang_Wong
- * created on 2022-01-17
+ * @author Wang_Wong created on 2022-01-17
*/
@Data
public class WxCpChatDatas implements Serializable {
@@ -31,6 +30,9 @@ public class WxCpChatDatas implements Serializable {
@SerializedName("chatdata")
private List chatData;
+ /**
+ * The type Wx cp chat data.
+ */
@Getter
@Setter
public static class WxCpChatData implements Serializable {
@@ -51,20 +53,42 @@ public class WxCpChatDatas implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java
index 888f7f399..05098e5e0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java
@@ -204,15 +204,29 @@ public class WxCpChatModel implements Serializable {
@SerializedName("sphfeed")
private SphFeed sphFeed;
+ /**
+ * 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 {
@@ -221,10 +235,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -232,6 +257,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Image.
+ */
@Getter
@Setter
public static class Image implements Serializable {
@@ -246,10 +274,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -257,6 +296,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Revoke.
+ */
@Getter
@Setter
public static class Revoke implements Serializable {
@@ -265,10 +307,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -276,6 +329,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Agree.
+ */
@Getter
@Setter
public static class Agree implements Serializable {
@@ -290,10 +346,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -301,6 +368,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Voice.
+ */
@Getter
@Setter
public static class Voice implements Serializable {
@@ -318,10 +388,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -329,6 +410,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Video.
+ */
@Getter
@Setter
public static class Video implements Serializable {
@@ -346,10 +430,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -357,6 +452,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Card.
+ */
@Getter
@Setter
public static class Card implements Serializable {
@@ -368,10 +466,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -379,6 +488,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Location.
+ */
@Getter
@Setter
public static class Location implements Serializable {
@@ -399,10 +511,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -410,6 +533,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Emotion.
+ */
@Getter
@Setter
public static class Emotion implements Serializable {
@@ -436,10 +562,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -447,6 +584,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type File.
+ */
@Getter
@Setter
public static class File implements Serializable {
@@ -467,10 +607,21 @@ public class WxCpChatModel implements Serializable {
@SerializedName("filesize")
private Integer 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);
}
@@ -478,6 +629,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Link.
+ */
@Getter
@Setter
public static class Link implements Serializable {
@@ -495,10 +649,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -526,10 +691,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -551,10 +727,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -562,6 +749,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Chat record item.
+ */
@Getter
@Setter
public static class ChatRecordItem implements Serializable {
@@ -579,10 +769,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -613,10 +814,21 @@ public class WxCpChatModel implements Serializable {
@SerializedName("details")
private List 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);
}
@@ -624,6 +836,9 @@ public class WxCpChatModel implements Serializable {
}
+ /**
+ * The type Details.
+ */
@Getter
@Setter
public static class Details implements Serializable {
@@ -638,10 +853,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -669,10 +895,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -712,10 +949,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -740,10 +988,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -765,10 +1024,21 @@ public class WxCpChatModel implements Serializable {
@SerializedName("item")
private List 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);
}
@@ -796,10 +1066,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -836,10 +1117,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -858,6 +1150,9 @@ public class WxCpChatModel implements Serializable {
@SerializedName("item")
private List- item;
+ /**
+ * The type Item.
+ */
@Getter
@Setter
public static class Item implements Serializable {
@@ -894,14 +1189,28 @@ public class WxCpChatModel implements Serializable {
@SerializedName("sharescreendata")
private List
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 {
@@ -919,16 +1228,30 @@ public class WxCpChatModel implements Serializable {
@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 {
@@ -943,10 +1266,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
@@ -973,10 +1307,21 @@ public class WxCpChatModel implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java
index 65745cc18..7e53f0d08 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpCheckAgreeRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 获取会话同意情况请求参数.
*
- * @author Wang_Wong
- * created on 2022-01-21
+ * @author Wang_Wong created on 2022-01-21
*/
@Data
@Builder
@@ -25,14 +24,28 @@ public class WxCpCheckAgreeRequest implements Serializable {
@SerializedName("info")
private List 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 {
@@ -44,10 +57,21 @@ public class WxCpCheckAgreeRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java
index 7b7be15c5..384f29f75 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpFileItem.java
@@ -28,10 +28,21 @@ public class WxCpFileItem implements Serializable {
@SerializedName("filesize")
private Long 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java
index 3a2656bfb..f7b4ebdea 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpGroupChat.java
@@ -33,6 +33,9 @@ public class WxCpGroupChat implements Serializable {
private List members;
+ /**
+ * The type Member.
+ */
@Getter
@Setter
public class Member implements Serializable {
@@ -44,16 +47,33 @@ public class WxCpGroupChat implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/SummaryInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/SummaryInfo.java
index 0c498d566..fd7e2e77d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/SummaryInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/SummaryInfo.java
@@ -10,8 +10,7 @@ import java.util.List;
/**
* 摘要行信息,用于定义某一行摘要显示的内容.
*
- * @author Binary Wang
- * created on 2020-07-19
+ * @author Binary Wang created on 2020-07-19
*/
@Data
@Accessors(chain = true)
@@ -24,6 +23,9 @@ public class SummaryInfo implements Serializable {
@SerializedName("summary_info")
private List summaryInfoData;
+ /**
+ * The type Summary info data.
+ */
@Data
@Accessors(chain = true)
public static class SummaryInfoData implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDetailResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDetailResult.java
index 2714cc95f..7d55ff878 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDetailResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalDetailResult.java
@@ -24,6 +24,9 @@ public class WxCpApprovalDetailResult implements Serializable {
@SerializedName("info")
private WxCpApprovalDetail info;
+ /**
+ * The type Wx cp approval detail.
+ */
@Data
public static class WxCpApprovalDetail implements Serializable {
private static final long serialVersionUID = 1353393306564207170L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfo.java
index b9c1235f1..70c781df4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfo.java
@@ -7,6 +7,8 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Wx cp approval info.
+ *
* @author element
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfoQueryFilter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfoQueryFilter.java
index 73e6d81d2..888266c87 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfoQueryFilter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpApprovalInfoQueryFilter.java
@@ -25,10 +25,18 @@ public class WxCpApprovalInfoQueryFilter implements Serializable {
private Object value;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxGsonBuilder.create().toJson(this);
}
+ /**
+ * The enum Key.
+ */
public enum KEY {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinData.java
index 86c3df17f..6e88f70cb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinData.java
@@ -9,8 +9,7 @@ import java.util.List;
/**
* 企业微信打卡数据.
*
- * @author Element
- * created on 2019-04-06 11:01
+ * @author Element created on 2019-04-06 11:01
*/
@Data
public class WxCpCheckinData implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinDayData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinDayData.java
index ef3ae1c08..1a8d47c82 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinDayData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinDayData.java
@@ -20,6 +20,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("base_info")
private BaseInfo baseInfo;
+ /**
+ * The type Base info.
+ */
@Data
public class BaseInfo implements Serializable {
@@ -67,6 +70,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("rule_info")
private RuleInfo ruleInfo;
+ /**
+ * The type Rule info.
+ */
@Data
public class RuleInfo implements Serializable {
private static final long serialVersionUID = -5512479811648914189L;
@@ -100,6 +106,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("checkintime")
private List checkinTime;
+ /**
+ * The type Checkin time.
+ */
@Data
public class CheckinTime implements Serializable {
private static final long serialVersionUID = 1582835435812966332L;
@@ -130,6 +139,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("summary_info")
private SummaryInfo summaryInfo;
+ /**
+ * The type Summary info.
+ */
@Data
public class SummaryInfo implements Serializable {
private static final long serialVersionUID = 3428576099259666595L;
@@ -170,6 +182,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("holiday_infos")
private List holidayInfos;
+ /**
+ * The type Holiday infos.
+ */
@Data
public class HolidayInfos implements Serializable {
private static final long serialVersionUID = -6671577072585561527L;
@@ -185,6 +200,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("sp_title")
private SpTitle spTitle;
+ /**
+ * The type Sp title.
+ */
@Data
public class SpTitle implements Serializable {
private static final long serialVersionUID = 2148815417115384998L;
@@ -194,6 +212,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("data")
private List data;
+ /**
+ * The type Data.
+ */
@lombok.Data
public class Data implements Serializable {
private static final long serialVersionUID = -1672692024530543180L;
@@ -217,6 +238,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("sp_description")
private SpDescription spDescription;
+ /**
+ * The type Sp description.
+ */
@Data
public class SpDescription implements Serializable {
@@ -227,6 +251,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("data")
private List data;
+ /**
+ * The type Data.
+ */
@lombok.Data
public class Data implements Serializable {
private static final long serialVersionUID = 3555479101375365805L;
@@ -251,6 +278,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("exception_infos")
private List exceptionInfos;
+ /**
+ * The type Exception infos.
+ */
@Data
public class ExceptionInfos implements Serializable {
private static final long serialVersionUID = -5987438373762518299L;
@@ -279,6 +309,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("ot_info")
private OtInfo otInfo;
+ /**
+ * The type Ot info.
+ */
@Data
public class OtInfo implements Serializable {
private static final long serialVersionUID = -6557759801572150175L;
@@ -307,6 +340,9 @@ public class WxCpCheckinDayData implements Serializable {
@SerializedName("sp_items")
private List spItems;
+ /**
+ * The type Sp item.
+ */
@Data
public class SpItem implements Serializable {
private static final long serialVersionUID = 2423158264958352024L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinMonthData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinMonthData.java
index 559c8e46a..d0b98bf5d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinMonthData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinMonthData.java
@@ -11,7 +11,6 @@ import java.util.List;
*
* @author longliveh
*/
-
@Data
public class WxCpCheckinMonthData implements Serializable {
private static final long serialVersionUID = -3062328201807894236L;
@@ -22,6 +21,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("base_info")
private BaseInfo baseInfo;
+ /**
+ * The type Base info.
+ */
@Data
public static class BaseInfo implements Serializable {
private static final long serialVersionUID = -5368331890851903885L;
@@ -62,6 +64,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("rule_info")
private RuleInfo ruleInfo;
+ /**
+ * The type Rule info.
+ */
@Data
public static class RuleInfo implements Serializable {
private static final long serialVersionUID = 9152263355916880710L;
@@ -86,6 +91,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("summary_info")
private SummaryInfo summaryInfo;
+ /**
+ * The type Summary info.
+ */
@Data
public static class SummaryInfo implements Serializable {
private static final long serialVersionUID = -1956770107240513983L;
@@ -127,6 +135,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("exception_infos")
private List exceptionInfos;
+ /**
+ * The type Exception info.
+ */
@Data
public static class ExceptionInfo implements Serializable {
private static final long serialVersionUID = -4855850255704089359L;
@@ -155,6 +166,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("sp_items")
private List spItems;
+ /**
+ * The type Sp item.
+ */
@Data
public static class SpItem implements Serializable {
private static final long serialVersionUID = 224472626753597080L;
@@ -202,6 +216,9 @@ public class WxCpCheckinMonthData implements Serializable {
@SerializedName("overwork_info")
private OverWorkInfo overworkInfo;
+ /**
+ * The type Over work info.
+ */
@Data
public static class OverWorkInfo implements Serializable {
private static final long serialVersionUID = -9149524232645899305L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java
index 6f49ec9eb..db7a78c1b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java
@@ -9,8 +9,7 @@ import java.util.List;
/**
* 企业微信打卡规则.
*
- * @author Element
- * created on 2019-04-06 13:22
+ * @author Element created on 2019-04-06 13:22
*/
@Data
public class WxCpCheckinOption implements Serializable {
@@ -21,6 +20,9 @@ public class WxCpCheckinOption implements Serializable {
private Group group;
+ /**
+ * The type Checkin date.
+ */
@Data
public static class CheckinDate implements Serializable {
private static final long serialVersionUID = -5601722383347110974L;
@@ -40,6 +42,9 @@ public class WxCpCheckinOption implements Serializable {
private Long limitAheadTime;
}
+ /**
+ * The type Checkin time.
+ */
@Data
public static class CheckinTime implements Serializable {
private static final long serialVersionUID = -8579954143265336276L;
@@ -57,6 +62,9 @@ public class WxCpCheckinOption implements Serializable {
private Long remindOffWorkSec;
}
+ /**
+ * The type Group.
+ */
@Data
public static class Group implements Serializable {
@@ -103,6 +111,9 @@ public class WxCpCheckinOption implements Serializable {
}
+ /**
+ * The type Wifi mac info.
+ */
@Data
public static class WifiMacInfo implements Serializable {
private static final long serialVersionUID = -4657809185716627368L;
@@ -114,6 +125,9 @@ public class WxCpCheckinOption implements Serializable {
private String mac;
}
+ /**
+ * The type Loc info.
+ */
@Data
public static class LocInfo implements Serializable {
private static final long serialVersionUID = -618965280668099608L;
@@ -130,6 +144,9 @@ public class WxCpCheckinOption implements Serializable {
private Long distance;
}
+ /**
+ * The type Spe day.
+ */
@Data
public static class SpeDay implements Serializable {
private static final long serialVersionUID = -3538818921359212748L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinSchedule.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinSchedule.java
index 9517a64d4..af310439f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinSchedule.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinSchedule.java
@@ -45,6 +45,9 @@ public class WxCpCheckinSchedule implements Serializable {
@SerializedName("schedule")
private UserSchedule schedule;
+ /**
+ * The type User schedule.
+ */
@Data
public class UserSchedule implements Serializable {
private static final long serialVersionUID = 9138985222324576857L;
@@ -54,6 +57,9 @@ public class WxCpCheckinSchedule implements Serializable {
@SerializedName("scheduleList")
private List scheduleList;
+ /**
+ * The type Schedule.
+ */
@Data
public class Schedule implements Serializable {
@@ -71,6 +77,9 @@ public class WxCpCheckinSchedule implements Serializable {
@SerializedName("schedule_info")
private ScheduleInfo scheduleInfo;
+ /**
+ * The type Schedule info.
+ */
@Data
public class ScheduleInfo implements Serializable {
private static final long serialVersionUID = 1317096341116256963L;
@@ -93,6 +102,9 @@ public class WxCpCheckinSchedule implements Serializable {
private List timeSection;
+ /**
+ * The type Time section.
+ */
@Data
public class TimeSection implements Serializable {
private static final long serialVersionUID = -3447467962751285748L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCorpConfInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCorpConfInfo.java
index 514cb421f..5339cc0ba 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCorpConfInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCorpConfInfo.java
@@ -22,6 +22,9 @@ public class WxCpCorpConfInfo extends WxCpBaseResp implements Serializable {
@SerializedName("lists")
private List lists;
+ /**
+ * The type Corp conf.
+ */
@Getter
@Setter
public static class CorpConf implements Serializable {
@@ -47,6 +50,9 @@ public class WxCpCorpConfInfo extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Quota attr.
+ */
@Getter
@Setter
public static class QuotaAttr implements Serializable {
@@ -63,6 +69,12 @@ public class WxCpCorpConfInfo extends WxCpBaseResp implements Serializable {
}
+ /**
+ * From json wx cp corp conf info.
+ *
+ * @param json the json
+ * @return the wx cp corp conf info
+ */
public static WxCpCorpConfInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCorpConfInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java
index f9ab9dd15..98ac78d71 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java
@@ -179,6 +179,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer offWorkIntervalTime;
+ /**
+ * The type Checkin date.
+ */
@Data
public static class CheckinDate implements Serializable {
private static final long serialVersionUID = -8560643656775167406L;
@@ -219,6 +222,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer flexOffDutyTime;
}
+ /**
+ * The type Checkin time.
+ */
@Data
public static class CheckinTime implements Serializable {
@@ -248,6 +254,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer remindOffWorkSec;
}
+ /**
+ * The type Spe workday.
+ */
@Data
public static class SpeWorkday implements Serializable {
@@ -271,6 +280,9 @@ public class WxCpCropCheckinOption implements Serializable {
private List checkinTime;
}
+ /**
+ * The type Spe off day.
+ */
@Data
public static class SpeOffDay implements Serializable {
private static final long serialVersionUID = 9214798931489490993L;
@@ -287,6 +299,9 @@ public class WxCpCropCheckinOption implements Serializable {
private String notes;
}
+ /**
+ * The type Wifi mac info.
+ */
@Data
public static class WifiMacInfo implements Serializable {
@@ -305,6 +320,9 @@ public class WxCpCropCheckinOption implements Serializable {
private String wifimac;
}
+ /**
+ * The type Loc info.
+ */
@Data
public static class LocInfo implements Serializable {
@@ -340,6 +358,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer distance;
}
+ /**
+ * The type Range.
+ */
@Data
public static class Range implements Serializable {
@@ -366,6 +387,9 @@ public class WxCpCropCheckinOption implements Serializable {
}
+ /**
+ * The type Reporter info.
+ */
@Data
public static class ReporterInfo implements Serializable {
private static final long serialVersionUID = 1132450350458936772L;
@@ -382,6 +406,9 @@ public class WxCpCropCheckinOption implements Serializable {
private long updateTime;
}
+ /**
+ * The type Reporter.
+ */
@Data
public static class Reporter implements Serializable {
@@ -391,6 +418,9 @@ public class WxCpCropCheckinOption implements Serializable {
private String userid;
}
+ /**
+ * The type Ot info.
+ */
@Data
public static class OtInfo implements Serializable {
@@ -436,6 +466,9 @@ public class WxCpCropCheckinOption implements Serializable {
private OtApplyInfo otapplyinfo;
}
+ /**
+ * The type Ot check info.
+ */
@Data
public static class OtCheckInfo implements Serializable {
@@ -490,6 +523,9 @@ public class WxCpCropCheckinOption implements Serializable {
private OtNonworkingDayRestInfo otNonworkingdayRestinfo;
}
+ /**
+ * The type Ot working day rest info.
+ */
@Data
public static class OtWorkingDayRestInfo implements Serializable {
@@ -514,6 +550,9 @@ public class WxCpCropCheckinOption implements Serializable {
private CalOtTimeRule calOttimeRule;
}
+ /**
+ * The type Fix time rule.
+ */
@Data
public static class FixTimeRule implements Serializable {
@@ -532,6 +571,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer fixTimeEndSec;
}
+ /**
+ * The type Cal ot time rule.
+ */
@Data
public static class CalOtTimeRule implements Serializable {
@@ -545,6 +587,9 @@ public class WxCpCropCheckinOption implements Serializable {
}
+ /**
+ * The type Item.
+ */
@Data
public static class Item implements Serializable {
@@ -563,6 +608,9 @@ public class WxCpCropCheckinOption implements Serializable {
private Integer restTime;
}
+ /**
+ * The type Ot nonworking day rest info.
+ */
@Data
public static class OtNonworkingDayRestInfo implements Serializable {
@@ -587,6 +635,9 @@ public class WxCpCropCheckinOption implements Serializable {
private CalOtTimeRule calOttimeRule;
}
+ /**
+ * The type Ot apply info.
+ */
@Data
public static class OtApplyInfo implements Serializable {
@@ -630,6 +681,9 @@ public class WxCpCropCheckinOption implements Serializable {
}
+ /**
+ * The type Schedule.
+ */
@Data
public static class Schedule implements Serializable {
@@ -710,6 +764,9 @@ public class WxCpCropCheckinOption implements Serializable {
}
+ /**
+ * The type Time section.
+ */
@Data
public static class TimeSection implements Serializable {
private static final long serialVersionUID = 7497252128339062724L;
@@ -764,6 +821,9 @@ public class WxCpCropCheckinOption implements Serializable {
}
+ /**
+ * The type Late rule.
+ */
@Data
public static class LateRule implements Serializable {
@@ -783,6 +843,9 @@ public class WxCpCropCheckinOption implements Serializable {
private List timerules;
}
+ /**
+ * The type Time rule.
+ */
@Data
public static class TimeRule implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpDialRecord.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpDialRecord.java
index 5ce27e8fe..f8c0956e2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpDialRecord.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpDialRecord.java
@@ -9,8 +9,7 @@ import java.util.List;
/**
* 公费电话拨打记录.
*
- * @author Element
- * created on 2019-04-06 15:38
+ * @author Element created on 2019-04-06 15:38
*/
@Data
public class WxCpDialRecord implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpGetApprovalData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpGetApprovalData.java
index 8385ab037..99d24b75a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpGetApprovalData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpGetApprovalData.java
@@ -31,6 +31,9 @@ public class WxCpGetApprovalData extends WxCpBaseResp implements Serializable {
@SerializedName("data")
private List data;
+ /**
+ * The type Approval data.
+ */
@Getter
@Setter
public static class ApprovalData implements Serializable {
@@ -74,6 +77,9 @@ public class WxCpGetApprovalData extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Expense.
+ */
@Getter
@Setter
public static class Expense implements Serializable {
@@ -90,6 +96,9 @@ public class WxCpGetApprovalData extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Comm.
+ */
@Getter
@Setter
public static class Comm implements Serializable {
@@ -100,6 +109,9 @@ public class WxCpGetApprovalData extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Item.
+ */
@Getter
@Setter
public static class Item implements Serializable {
@@ -119,6 +131,12 @@ public class WxCpGetApprovalData extends WxCpBaseResp implements Serializable {
}
+ /**
+ * From json wx cp get approval data.
+ *
+ * @param json the json
+ * @return the wx cp get approval data
+ */
public static WxCpGetApprovalData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetApprovalData.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaApplyEventRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaApplyEventRequest.java
index d6f800cf9..503a873b3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaApplyEventRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaApplyEventRequest.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 提交审批申请 请求对象类.
*
- * @author Binary Wang
- * created on 2020-07-18
+ * @author Binary Wang created on 2020-07-18
*/
@Data
@Accessors(chain = true)
@@ -68,10 +67,18 @@ public class WxCpOaApplyEventRequest implements Serializable {
@SerializedName("summary_list")
private List summaryList;
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Approver.
+ */
@Data
@Accessors(chain = true)
public static class Approver implements Serializable {
@@ -89,6 +96,9 @@ public class WxCpOaApplyEventRequest implements Serializable {
private String[] userIds;
}
+ /**
+ * The type Apply data.
+ */
@Data
@Accessors(chain = true)
public static class ApplyData implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaSchedule.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaSchedule.java
index e61a8566b..53229cd81 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaSchedule.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaSchedule.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 日程信息bean.
*
- * @author Binary Wang
- * created on 2020-12-25
+ * @author Binary Wang created on 2020-12-25
*/
@Data
@Accessors(chain = true)
@@ -90,6 +89,9 @@ public class WxCpOaSchedule implements Serializable, ToJson {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Attendee.
+ */
@Data
@Accessors(chain = true)
public static class Attendee implements Serializable {
@@ -112,6 +114,9 @@ public class WxCpOaSchedule implements Serializable, ToJson {
private Integer responseStatus;
}
+ /**
+ * The type Reminder.
+ */
@Data
@Accessors(chain = true)
public static class Reminder implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpSetCheckinSchedule.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpSetCheckinSchedule.java
index d34d233a3..13329659e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpSetCheckinSchedule.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpSetCheckinSchedule.java
@@ -32,6 +32,9 @@ public class WxCpSetCheckinSchedule implements Serializable {
private Integer yearmonth;
+ /**
+ * The type Item.
+ */
@Data
public static class Item implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpTemplateResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpTemplateResult.java
index b8dd2dbe9..47c0448f8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpTemplateResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpTemplateResult.java
@@ -11,7 +11,7 @@ import java.util.List;
/**
* 审批模板详情
*
- * @author gyv12345@163.com
+ * @author gyv12345 @163.com
*/
@Data
public class WxCpTemplateResult implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpUserVacationQuota.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpUserVacationQuota.java
index 159fcd694..419504554 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpUserVacationQuota.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpUserVacationQuota.java
@@ -22,6 +22,9 @@ public class WxCpUserVacationQuota extends WxCpBaseResp implements Serializable
@SerializedName("lists")
private List lists;
+ /**
+ * The type Vacation quota.
+ */
@Getter
@Setter
public static class VacationQuota implements Serializable {
@@ -44,6 +47,12 @@ public class WxCpUserVacationQuota extends WxCpBaseResp implements Serializable
}
+ /**
+ * From json wx cp user vacation quota.
+ *
+ * @param json the json
+ * @return the wx cp user vacation quota
+ */
public static WxCpUserVacationQuota fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserVacationQuota.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ApplyDataContent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ApplyDataContent.java
index f86ab966e..3ce66ea36 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ApplyDataContent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ApplyDataContent.java
@@ -8,6 +8,8 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Apply data content.
+ *
* @author element
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentTitle.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentTitle.java
index 24d5fafc2..cfd0702a2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentTitle.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentTitle.java
@@ -5,6 +5,8 @@ import lombok.Data;
import java.io.Serializable;
/**
+ * The type Content title.
+ *
* @author element
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java
index 1c97ce90e..db1e4cedd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java
@@ -8,6 +8,8 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Content value.
+ *
* @author element
*/
@Data
@@ -48,6 +50,9 @@ public class ContentValue implements Serializable {
@SerializedName("punch_correction")
private PunchCorrection punchCorrection;
+ /**
+ * The type Date.
+ */
@Data
public static class Date implements Serializable {
private static final long serialVersionUID = -6181554080062231138L;
@@ -57,12 +62,18 @@ public class ContentValue implements Serializable {
private String timestamp;
}
+ /**
+ * The type Selector.
+ */
@Data
public static class Selector implements Serializable {
private static final long serialVersionUID = 7305458759126951773L;
private String type;
private List options;
+ /**
+ * The type Option.
+ */
@Data
public static class Option implements Serializable {
private static final long serialVersionUID = -3471071106328280252L;
@@ -74,6 +85,9 @@ public class ContentValue implements Serializable {
}
+ /**
+ * The type Member.
+ */
@Data
public static class Member implements Serializable {
private static final long serialVersionUID = 1316551341955496067L;
@@ -83,6 +97,9 @@ public class ContentValue implements Serializable {
private String name;
}
+ /**
+ * The type Department.
+ */
@Data
public static class Department implements Serializable {
private static final long serialVersionUID = -2513762192924826234L;
@@ -92,6 +109,9 @@ public class ContentValue implements Serializable {
private String name;
}
+ /**
+ * The type File.
+ */
@Data
public static class File implements Serializable {
private static final long serialVersionUID = 3890971381800855142L;
@@ -100,12 +120,18 @@ public class ContentValue implements Serializable {
private String fileId;
}
+ /**
+ * The type Child.
+ */
@Data
public static class Child implements Serializable {
private static final long serialVersionUID = -3500102073821161558L;
private List list;
}
+ /**
+ * The type Attendance.
+ */
@Data
public static class Attendance implements Serializable {
private static final long serialVersionUID = -6627566040706594166L;
@@ -113,6 +139,9 @@ public class ContentValue implements Serializable {
private DataRange dateRange;
private Integer type;
+ /**
+ * The type Data range.
+ */
@Data
public static class DataRange implements Serializable {
private static final long serialVersionUID = -3411836592583718255L;
@@ -126,6 +155,9 @@ public class ContentValue implements Serializable {
}
}
+ /**
+ * The type Vacation.
+ */
@Data
public static class Vacation implements Serializable {
private static final long serialVersionUID = 2120523160034749170L;
@@ -165,6 +197,9 @@ public class ContentValue implements Serializable {
private String spNo;
}
+ /**
+ * The type Template name.
+ */
@Data
public static class TemplateName implements Serializable {
private static final long serialVersionUID = 3152481506054355937L;
@@ -172,6 +207,9 @@ public class ContentValue implements Serializable {
private String lang;
}
+ /**
+ * The type Punch correction.
+ */
@Data
public static class PunchCorrection implements Serializable {
private static final long serialVersionUID = 2120523160034749170L;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/calendar/WxCpOaCalendar.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/calendar/WxCpOaCalendar.java
index 23beb680f..b26e5324b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/calendar/WxCpOaCalendar.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/calendar/WxCpOaCalendar.java
@@ -16,8 +16,7 @@ import java.util.List;
/**
* 日历.
*
- * @author Binary Wang
- * created on 2020-09-20
+ * @author Binary Wang created on 2020-09-20
*/
@Data
@Builder
@@ -91,6 +90,9 @@ public class WxCpOaCalendar implements Serializable, ToJson {
@SerializedName("shares")
private List shares;
+ /**
+ * The type Share info.
+ */
@Data
@AllArgsConstructor
public static class ShareInfo implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/meetingroom/WxCpOaMeetingRoom.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/meetingroom/WxCpOaMeetingRoom.java
index 6333a4eef..3e94cce0e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/meetingroom/WxCpOaMeetingRoom.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/meetingroom/WxCpOaMeetingRoom.java
@@ -14,9 +14,10 @@ import java.io.Serializable;
import java.util.List;
/**
+ * The type Wx cp oa meeting room.
+ *
* @author fcat
- * @version 1.0
- * Create by 2022/8/12 22:46
+ * @version 1.0 Create by 2022/8/12 22:46
*/
@Data
@Builder
@@ -76,6 +77,9 @@ public class WxCpOaMeetingRoom implements Serializable, ToJson {
return WxCpGsonBuilder.create().toJson(this);
}
+ /**
+ * The type Coordinate.
+ */
@Data
@AllArgsConstructor
public static class Coordinate implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/selfagent/WxCpOpenApprovalData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/selfagent/WxCpOpenApprovalData.java
index 261a0f8de..0e05a7539 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/selfagent/WxCpOpenApprovalData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/selfagent/WxCpOpenApprovalData.java
@@ -54,6 +54,9 @@ public class WxCpOpenApprovalData implements Serializable {
@SerializedName("ApproverStep")
private Integer approverStep;
+ /**
+ * The type Approval nodes.
+ */
@Getter
@Setter
public static class ApprovalNodes implements Serializable {
@@ -64,6 +67,9 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * The type Approval node.
+ */
@Getter
@Setter
public static class ApprovalNode implements Serializable {
@@ -83,6 +89,9 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * The type Notify nodes.
+ */
@Getter
@Setter
public static class NotifyNodes implements Serializable {
@@ -93,6 +102,9 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * The type Notify node.
+ */
@Getter
@Setter
public static class NotifyNode implements Serializable {
@@ -112,6 +124,9 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * The type Items.
+ */
@Getter
@Setter
public static class Items implements Serializable {
@@ -122,6 +137,9 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * The type Item.
+ */
@Getter
@Setter
public static class Item implements Serializable {
@@ -150,10 +168,21 @@ public class WxCpOpenApprovalData implements Serializable {
}
+ /**
+ * From json wx cp open approval data.
+ *
+ * @param json the json
+ * @return the wx cp open approval data
+ */
public static WxCpOpenApprovalData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpOpenApprovalData.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateConfig.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateConfig.java
index 3bbb4b2cb..2bb7a8aba 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateConfig.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateConfig.java
@@ -15,7 +15,7 @@ import java.io.Serializable;
* Table-明细;
* Attendance-假勤组件(请假、外出、出差、加班)
*
- * @author gyv12345@163.com
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateConfig implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateContent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateContent.java
index 72fc02cd1..859a288f2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateContent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateContent.java
@@ -6,7 +6,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv12345@163.com
+ * The type Template content.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateContent implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateControls.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateControls.java
index b9d463038..6c38be28b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateControls.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateControls.java
@@ -5,6 +5,8 @@ import lombok.Data;
import java.io.Serializable;
/**
+ * The type Template controls.
+ *
* @author Administrator
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateDateRange.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateDateRange.java
index 716f0859d..05b54650c 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateDateRange.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateDateRange.java
@@ -5,7 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author gyv12345@163.com
+ * The type Template date range.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateDateRange implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateOptions.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateOptions.java
index 42c7d811c..d0256fced 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateOptions.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateOptions.java
@@ -6,7 +6,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv123@163.com
+ * The type Template options.
+ *
+ * @author gyv123 @163.com
*/
@Data
public class TemplateOptions implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateProperty.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateProperty.java
index 143e4ce8f..b815308fa 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateProperty.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateProperty.java
@@ -7,7 +7,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv12345@163.com
+ * The type Template property.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateProperty implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateTitle.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateTitle.java
index cdfe30c9b..51a617643 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateTitle.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateTitle.java
@@ -5,7 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author gyv12345@163.com
+ * The type Template title.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateTitle implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateVacationItem.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateVacationItem.java
index 17aa33afc..48cf4cd49 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateVacationItem.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/TemplateVacationItem.java
@@ -5,7 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author gyv12345@163.com
+ * The type Template vacation item.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateVacationItem implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateAttendance.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateAttendance.java
index 7f641611a..eb4c554a1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateAttendance.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateAttendance.java
@@ -7,7 +7,9 @@ import me.chanjar.weixin.cp.bean.oa.templatedata.TemplateDateRange;
import java.io.Serializable;
/**
- * @author gyv12345@163.com
+ * The type Template attendance.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateAttendance implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateContact.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateContact.java
index 15fcaf3ac..d79f6f8e2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateContact.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateContact.java
@@ -5,7 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author gyv12345@163.com
+ * The type Template contact.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateContact implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateDate.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateDate.java
index 7d588ddc7..006874e9f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateDate.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateDate.java
@@ -5,6 +5,8 @@ import lombok.Data;
import java.io.Serializable;
/**
+ * The type Template date.
+ *
* @author Administrator
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateSelector.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateSelector.java
index c8076aaa1..3632062be 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateSelector.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateSelector.java
@@ -7,7 +7,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv12345@163.com
+ * The type Template selector.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateSelector implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateTable.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateTable.java
index 1022e1662..de1ea6641 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateTable.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateTable.java
@@ -7,7 +7,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv12345@163.com
+ * The type Template table.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateTable implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateVacation.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateVacation.java
index 74b741a08..b69436350 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateVacation.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/templatedata/control/TemplateVacation.java
@@ -7,7 +7,9 @@ import java.io.Serializable;
import java.util.List;
/**
- * @author gyv12345@163.com
+ * The type Template vacation.
+ *
+ * @author gyv12345 @163.com
*/
@Data
public class TemplateVacation implements Serializable {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclAddRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclAddRequest.java
index 9320cf3c2..3291e6353 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclAddRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclAddRequest.java
@@ -28,6 +28,9 @@ public class WxCpFileAclAddRequest implements Serializable {
@SerializedName("auth_info")
private List authInfo;
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -45,20 +48,42 @@ public class WxCpFileAclAddRequest implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp file acl add request.
+ *
+ * @param json the json
+ * @return the wx cp file acl add request
+ */
public static WxCpFileAclAddRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileAclAddRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclDelRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclDelRequest.java
index a86754a1d..dcad3be18 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclDelRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileAclDelRequest.java
@@ -28,6 +28,9 @@ public class WxCpFileAclDelRequest implements Serializable {
@SerializedName("auth_info")
private List authInfo;
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -42,20 +45,42 @@ public class WxCpFileAclDelRequest implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp file acl del request.
+ *
+ * @param json the json
+ * @return the wx cp file acl del request
+ */
public static WxCpFileAclDelRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileAclDelRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileCreate.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileCreate.java
index 6d7ba3e6f..eab4c45be 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileCreate.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileCreate.java
@@ -22,6 +22,12 @@ public class WxCpFileCreate extends WxCpBaseResp implements Serializable {
@SerializedName("url")
private String url;
+ /**
+ * From json wx cp file create.
+ *
+ * @param json the json
+ * @return the wx cp file create
+ */
public static WxCpFileCreate fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileCreate.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDeleteRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDeleteRequest.java
index 65e19c8a1..bb740f393 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDeleteRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDeleteRequest.java
@@ -28,10 +28,21 @@ public class WxCpFileDeleteRequest implements Serializable {
@SerializedName("fileid")
private List fileId;
+ /**
+ * From json wx cp file delete request.
+ *
+ * @param json the json
+ * @return the wx cp file delete request
+ */
public static WxCpFileDeleteRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileDeleteRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDownload.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDownload.java
index 638d26e48..9c2507c68 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDownload.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileDownload.java
@@ -25,6 +25,12 @@ public class WxCpFileDownload extends WxCpBaseResp implements Serializable {
@SerializedName("cookie_value")
private String cookieValue;
+ /**
+ * From json wx cp file download.
+ *
+ * @param json the json
+ * @return the wx cp file download
+ */
public static WxCpFileDownload fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileDownload.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileInfo.java
index 222105379..1145e376d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileInfo.java
@@ -21,6 +21,9 @@ public class WxCpFileInfo extends WxCpBaseResp implements Serializable {
@SerializedName("file_info")
private FileInfo fileInfo;
+ /**
+ * The type File info.
+ */
@Getter
@Setter
public static class FileInfo implements Serializable {
@@ -68,16 +71,33 @@ public class WxCpFileInfo extends WxCpBaseResp implements Serializable {
@SerializedName("url")
private String url;
+ /**
+ * From json file info.
+ *
+ * @param json the json
+ * @return the file info
+ */
public static FileInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, FileInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp file info.
+ *
+ * @param json the json
+ * @return the wx cp file info
+ */
public static WxCpFileInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileList.java
index b217afdb8..ba62a55e8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileList.java
@@ -28,6 +28,9 @@ public class WxCpFileList extends WxCpBaseResp implements Serializable {
@SerializedName("file_list")
private FileList fileList;
+ /**
+ * The type File list.
+ */
@Getter
@Setter
public static class FileList implements Serializable {
@@ -36,16 +39,30 @@ public class WxCpFileList extends WxCpBaseResp implements Serializable {
@SerializedName("item")
private List- item;
+ /**
+ * From json file list.
+ *
+ * @param json the json
+ * @return the file list
+ */
public static FileList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, FileList.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Item.
+ */
@Getter
@Setter
public static class Item implements Serializable {
@@ -93,16 +110,33 @@ public class WxCpFileList extends WxCpBaseResp implements Serializable {
@SerializedName("md5")
private String md5;
+ /**
+ * From json item.
+ *
+ * @param json the json
+ * @return the item
+ */
public static Item fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Item.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp file list.
+ *
+ * @param json the json
+ * @return the wx cp file list
+ */
public static WxCpFileList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileList.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileListRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileListRequest.java
index 361a2d4be..1855c1a0d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileListRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileListRequest.java
@@ -39,10 +39,21 @@ public class WxCpFileListRequest implements Serializable {
@SerializedName("limit")
private Integer limit;
+ /**
+ * From json wx cp file list request.
+ *
+ * @param json the json
+ * @return the wx cp file list request
+ */
public static WxCpFileListRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileListRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMove.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMove.java
index f9d232df2..baaf17f6d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMove.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMove.java
@@ -22,6 +22,9 @@ public class WxCpFileMove extends WxCpBaseResp implements Serializable {
@SerializedName("file_list")
private FileList fileList;
+ /**
+ * The type File list.
+ */
@Getter
@Setter
public static class FileList implements Serializable {
@@ -30,16 +33,30 @@ public class WxCpFileMove extends WxCpBaseResp implements Serializable {
@SerializedName("item")
private List
- item;
+ /**
+ * From json file list.
+ *
+ * @param json the json
+ * @return the file list
+ */
public static FileList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, FileList.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Item.
+ */
@Getter
@Setter
public static class Item implements Serializable {
@@ -84,16 +101,33 @@ public class WxCpFileMove extends WxCpBaseResp implements Serializable {
@SerializedName("md5")
private String md5;
+ /**
+ * From json item.
+ *
+ * @param json the json
+ * @return the item
+ */
public static Item fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Item.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp file move.
+ *
+ * @param json the json
+ * @return the wx cp file move
+ */
public static WxCpFileMove fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileMove.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMoveRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMoveRequest.java
index 8f8a178aa..5802e3c27 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMoveRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileMoveRequest.java
@@ -47,10 +47,21 @@ public class WxCpFileMoveRequest implements Serializable {
@SerializedName("fileid")
private String[] fileId;
+ /**
+ * From json wx cp file move request.
+ *
+ * @param json the json
+ * @return the wx cp file move request
+ */
public static WxCpFileMoveRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileMoveRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileRename.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileRename.java
index 26fe21b19..0992bdd32 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileRename.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileRename.java
@@ -21,6 +21,9 @@ public class WxCpFileRename extends WxCpBaseResp implements Serializable {
@SerializedName("file")
private File file;
+ /**
+ * The type File.
+ */
@Getter
@Setter
public static class File implements Serializable {
@@ -68,16 +71,33 @@ public class WxCpFileRename extends WxCpBaseResp implements Serializable {
@SerializedName("md5")
private String md5;
+ /**
+ * 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);
}
}
+ /**
+ * From json wx cp file rename.
+ *
+ * @param json the json
+ * @return the wx cp file rename
+ */
public static WxCpFileRename fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileRename.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileShare.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileShare.java
index e3159e0e3..1e6185866 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileShare.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileShare.java
@@ -19,6 +19,12 @@ public class WxCpFileShare extends WxCpBaseResp implements Serializable {
@SerializedName("share_url")
private String shareUrl;
+ /**
+ * From json wx cp file share.
+ *
+ * @param json the json
+ * @return the wx cp file share
+ */
public static WxCpFileShare fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileShare.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUpload.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUpload.java
index 96617dd34..89cff5ede 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUpload.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUpload.java
@@ -19,6 +19,12 @@ public class WxCpFileUpload extends WxCpBaseResp implements Serializable {
@SerializedName("fileid")
private String fileId;
+ /**
+ * From json wx cp file upload.
+ *
+ * @param json the json
+ * @return the wx cp file upload
+ */
public static WxCpFileUpload fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileUpload.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUploadRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUploadRequest.java
index 9d2aa7c3f..7a107562b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUploadRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpFileUploadRequest.java
@@ -36,10 +36,21 @@ public class WxCpFileUploadRequest implements Serializable {
@SerializedName("file_base64_content")
private String fileBase64Content;
+ /**
+ * From json wx cp file upload request.
+ *
+ * @param json the json
+ * @return the wx cp file upload request
+ */
public static WxCpFileUploadRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpFileUploadRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclAddRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclAddRequest.java
index 94d65b43f..c82dcf976 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclAddRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclAddRequest.java
@@ -28,6 +28,9 @@ public class WxCpSpaceAclAddRequest implements Serializable {
@SerializedName("auth_info")
private List
authInfo;
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -45,20 +48,42 @@ public class WxCpSpaceAclAddRequest implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp space acl add request.
+ *
+ * @param json the json
+ * @return the wx cp space acl add request
+ */
public static WxCpSpaceAclAddRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceAclAddRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclDelRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclDelRequest.java
index 272d9a57b..e56125c85 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclDelRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceAclDelRequest.java
@@ -28,6 +28,9 @@ public class WxCpSpaceAclDelRequest implements Serializable {
@SerializedName("auth_info")
private List authInfo;
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -42,20 +45,42 @@ public class WxCpSpaceAclDelRequest implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp space acl del request.
+ *
+ * @param json the json
+ * @return the wx cp space acl del request
+ */
public static WxCpSpaceAclDelRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceAclDelRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateData.java
index 121745204..c1e7d8805 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateData.java
@@ -19,6 +19,12 @@ public class WxCpSpaceCreateData extends WxCpBaseResp implements Serializable {
@SerializedName("spaceid")
private String spaceId;
+ /**
+ * From json wx cp space create data.
+ *
+ * @param json the json
+ * @return the wx cp space create data
+ */
public static WxCpSpaceCreateData fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceCreateData.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateRequest.java
index 3b9319e43..2c3c4c0dd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceCreateRequest.java
@@ -28,6 +28,9 @@ public class WxCpSpaceCreateRequest implements Serializable {
@SerializedName("auth_info")
private List authInfo;
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -45,20 +48,42 @@ public class WxCpSpaceCreateRequest implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp space create request.
+ *
+ * @param json the json
+ * @return the wx cp space create request
+ */
public static WxCpSpaceCreateRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceCreateRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceInfo.java
index 821b7ef5e..3de68b6eb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceInfo.java
@@ -22,6 +22,9 @@ public class WxCpSpaceInfo extends WxCpBaseResp implements Serializable {
@SerializedName("space_info")
private SpaceInfo spaceInfo;
+ /**
+ * The type Space info.
+ */
@Getter
@Setter
public static class SpaceInfo implements Serializable {
@@ -36,16 +39,30 @@ public class WxCpSpaceInfo extends WxCpBaseResp implements Serializable {
@SerializedName("auth_list")
private AuthList authList;
+ /**
+ * From json space info.
+ *
+ * @param json the json
+ * @return the space info
+ */
public static SpaceInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, SpaceInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Auth list.
+ */
@Getter
@Setter
public static class AuthList implements Serializable {
@@ -57,16 +74,30 @@ public class WxCpSpaceInfo extends WxCpBaseResp implements Serializable {
@SerializedName("quit_userid")
private List quitUserId;
+ /**
+ * From json auth list.
+ *
+ * @param json the json
+ * @return the auth list
+ */
public static AuthList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthList.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Auth info.
+ */
@Getter
@Setter
public static class AuthInfo implements Serializable {
@@ -84,16 +115,33 @@ public class WxCpSpaceInfo extends WxCpBaseResp implements Serializable {
@SerializedName("userid")
private String userId;
+ /**
+ * From json auth info.
+ *
+ * @param json the json
+ * @return the auth info
+ */
public static AuthInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp space info.
+ *
+ * @param json the json
+ * @return the wx cp space info
+ */
public static WxCpSpaceInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceRenameRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceRenameRequest.java
index f7f313326..cdc88d8e1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceRenameRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceRenameRequest.java
@@ -30,10 +30,21 @@ public class WxCpSpaceRenameRequest implements Serializable {
@SerializedName("space_name")
private String spaceName;
+ /**
+ * From json wx cp space rename request.
+ *
+ * @param json the json
+ * @return the wx cp space rename request
+ */
public static WxCpSpaceRenameRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceRenameRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceSettingRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceSettingRequest.java
index 9239fb73f..85006033d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceSettingRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceSettingRequest.java
@@ -42,10 +42,21 @@ public class WxCpSpaceSettingRequest implements Serializable {
@SerializedName("share_url_no_approve_default_auth")
private Integer shareUrlNoApproveDefaultAuth;
+ /**
+ * From json wx cp space setting request.
+ *
+ * @param json the json
+ * @return the wx cp space setting request
+ */
public static WxCpSpaceSettingRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceSettingRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceShare.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceShare.java
index 929073912..560bfcae2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceShare.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/wedrive/WxCpSpaceShare.java
@@ -19,6 +19,12 @@ public class WxCpSpaceShare extends WxCpBaseResp implements Serializable {
@SerializedName("space_share_url")
private String spaceShareUrl;
+ /**
+ * From json wx cp space share.
+ *
+ * @param json the json
+ * @return the wx cp space share
+ */
public static WxCpSpaceShare fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceShare.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java
index 4f408bc2c..2c4dad7a3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderDetails.java
@@ -9,8 +9,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* 应用版本付费订单详情
*
- * @author leiguoqing
- * created on 2022年4月24日
+ * @author leiguoqing created on 2022年4月24日
*/
@Getter
@Setter
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java
index 410a51d45..2c597ce94 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/order/WxCpTpOrderListGetResult.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 应用版本付费订单列表
*
- * @author leiguoqing
- * created on 2022年4月24日
+ * @author leiguoqing created on 2022年4月24日
*/
@Getter
@Setter
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/BaseBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/BaseBuilder.java
index 90495a463..7ae85d456 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/BaseBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/BaseBuilder.java
@@ -2,24 +2,58 @@ package me.chanjar.weixin.cp.bean.outxmlbuilder;
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
+/**
+ * The type Base builder.
+ *
+ * @param the type parameter
+ * @param the type parameter
+ */
public abstract class BaseBuilder {
+ /**
+ * The To user name.
+ */
protected String toUserName;
+ /**
+ * The From user name.
+ */
protected String fromUserName;
+ /**
+ * To user builder type.
+ *
+ * @param touser the touser
+ * @return the builder type
+ */
public BuilderType toUser(String touser) {
this.toUserName = touser;
return (BuilderType) this;
}
+ /**
+ * From user builder type.
+ *
+ * @param fromusername the fromusername
+ * @return the builder type
+ */
public BuilderType fromUser(String fromusername) {
this.fromUserName = fromusername;
return (BuilderType) this;
}
+ /**
+ * Build value type.
+ *
+ * @return the value type
+ */
public abstract ValueType build();
+ /**
+ * Sets common.
+ *
+ * @param m the m
+ */
public void setCommon(WxCpXmlOutMessage m) {
m.setToUserName(this.toUserName);
m.setFromUserName(this.fromUserName);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/EventBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/EventBuilder.java
index c0be079bb..a13826cc8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/EventBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/EventBuilder.java
@@ -3,9 +3,10 @@ package me.chanjar.weixin.cp.bean.outxmlbuilder;
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutEventMessage;
/**
+ * The type Event builder.
+ *
* @author eYoung
- * @description:
- * created on create at 2021/12/3 16:34
+ * @description: created on create at 2021/12/3 16:34
*/
public class EventBuilder extends BaseBuilder {
@@ -26,81 +27,177 @@ public class EventBuilder extends BaseBuilder {
private List- articles = new ArrayList<>();
+ /**
+ * Add article news builder.
+ *
+ * @param items the items
+ * @return the news builder
+ */
public NewsBuilder addArticle(Item... items) {
Collections.addAll(this.articles, items);
return this;
}
+ /**
+ * Articles news builder.
+ *
+ * @param articles the articles
+ * @return the news builder
+ */
public NewsBuilder articles(List
- articles) {
this.articles = articles;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/TaskCardBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/TaskCardBuilder.java
index e71c5bd71..dc269f0a1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/TaskCardBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/TaskCardBuilder.java
@@ -11,6 +11,12 @@ public final class TaskCardBuilder extends BaseBuilder
{
private String content;
+ /**
+ * Content text builder.
+ *
+ * @param content the content
+ * @return the text builder
+ */
public TextBuilder content(String content) {
this.content = content;
return this;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/UpdateButtonBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/UpdateButtonBuilder.java
index 352abeb04..939eddfa6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/UpdateButtonBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/outxmlbuilder/UpdateButtonBuilder.java
@@ -12,6 +12,12 @@ public class UpdateButtonBuilder extends BaseBuilder 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 {
@@ -75,16 +92,30 @@ public class WxCpCustomizeHealthInfo extends WxCpBaseResp implements Serializabl
@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 {
@@ -108,16 +139,30 @@ public class WxCpCustomizeHealthInfo extends WxCpBaseResp implements Serializabl
@SerializedName("option_list")
private List 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 {
@@ -129,16 +174,33 @@ public class WxCpCustomizeHealthInfo extends WxCpBaseResp implements Serializabl
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java
index e707ba918..cf9b45cfd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpPaymentResult.java
@@ -28,9 +28,12 @@ public class WxCpPaymentResult extends WxCpBaseResp implements Serializable {
@SerializedName("payment_result")
private List paymentResult;
+ /**
+ * The type Payment result.
+ */
@Setter
@Getter
- public static class PaymentResult{
+ public static class PaymentResult {
@SerializedName("student_userid")
private String studentUserId;
@@ -44,16 +47,33 @@ public class WxCpPaymentResult extends WxCpBaseResp implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java
index c4305264d..cd921dc8b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpResultList.java
@@ -22,9 +22,12 @@ public class WxCpResultList extends WxCpBaseResp implements Serializable {
@SerializedName("result_list")
private List qrCodeList;
+ /**
+ * The type Qr code list.
+ */
@Setter
@Getter
- public static class QrCodeList extends WxCpBaseResp{
+ public static class QrCodeList extends WxCpBaseResp {
@SerializedName("userid")
private String userId;
@@ -32,6 +35,12 @@ public class WxCpResultList extends WxCpBaseResp implements Serializable {
@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);
}
@@ -42,6 +51,12 @@ public class WxCpResultList extends WxCpBaseResp implements Serializable {
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java
index 2206cfcc2..681b71d1b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolLivingInfo.java
@@ -22,6 +22,9 @@ public class WxCpSchoolLivingInfo extends WxCpBaseResp implements Serializable {
@SerializedName("living_info")
private LivingInfo livingInfo;
+ /**
+ * The type Living info.
+ */
@Getter
@Setter
public static class LivingInfo implements Serializable {
@@ -53,16 +56,30 @@ public class WxCpSchoolLivingInfo extends WxCpBaseResp implements Serializable {
@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 {
@@ -73,16 +90,33 @@ public class WxCpSchoolLivingInfo extends WxCpBaseResp implements Serializable {
@SerializedName("group_names")
private List 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java
index 964fca869..6bbd2b1fa 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolUnwatchStat.java
@@ -28,6 +28,9 @@ public class WxCpSchoolUnwatchStat extends WxCpBaseResp {
@SerializedName("stat_info")
private StatInfo statInfo;
+ /**
+ * The type Stat info.
+ */
@Getter
@Setter
public static class StatInfo implements Serializable {
@@ -38,6 +41,9 @@ public class WxCpSchoolUnwatchStat extends WxCpBaseResp {
}
+ /**
+ * The type Student.
+ */
@Getter
@Setter
public static class Student implements Serializable {
@@ -54,6 +60,12 @@ public class WxCpSchoolUnwatchStat extends WxCpBaseResp {
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java
index 4dd1ebb39..0a65ded68 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpSchoolWatchStat.java
@@ -16,7 +16,7 @@ import java.util.List;
* @author Wang_Wong
*/
@Data
-public class WxCpSchoolWatchStat extends WxCpBaseResp{
+public class WxCpSchoolWatchStat extends WxCpBaseResp {
private static final long serialVersionUID = -5028321625140879571L;
@SerializedName("ending")
@@ -28,6 +28,9 @@ public class WxCpSchoolWatchStat extends WxCpBaseResp{
@SerializedName("stat_infoes")
private StatInfo statInfoes;
+ /**
+ * The type Stat info.
+ */
@Getter
@Setter
public static class StatInfo implements Serializable {
@@ -41,6 +44,9 @@ public class WxCpSchoolWatchStat extends WxCpBaseResp{
}
+ /**
+ * The type Student.
+ */
@Getter
@Setter
public static class Student implements Serializable {
@@ -69,6 +75,9 @@ public class WxCpSchoolWatchStat extends WxCpBaseResp{
}
+ /**
+ * The type Visitor.
+ */
@Getter
@Setter
public static class Visitor implements Serializable {
@@ -91,6 +100,12 @@ public class WxCpSchoolWatchStat extends WxCpBaseResp{
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java
index 8283174b2..2daf9cf3f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/WxCpTrade.java
@@ -28,6 +28,12 @@ public class WxCpTrade extends WxCpBaseResp implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetHealthReportStat.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetHealthReportStat.java
index 3bd444832..683b9cdb5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetHealthReportStat.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetHealthReportStat.java
@@ -22,6 +22,12 @@ public class WxCpGetHealthReportStat extends WxCpBaseResp implements Serializabl
@SerializedName("uv")
private Integer uv;
+ /**
+ * From json wx cp get health report stat.
+ *
+ * @param json the json
+ * @return the wx cp get health report stat
+ */
public static WxCpGetHealthReportStat fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetHealthReportStat.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportAnswer.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportAnswer.java
index 052f8b28d..22a592c15 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportAnswer.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportAnswer.java
@@ -23,6 +23,9 @@ public class WxCpGetReportAnswer extends WxCpBaseResp implements Serializable {
@SerializedName("answers")
private List answers;
+ /**
+ * The type Answer.
+ */
@Getter
@Setter
public static class Answer implements Serializable {
@@ -46,16 +49,30 @@ public class WxCpGetReportAnswer extends WxCpBaseResp implements Serializable {
@SerializedName("report_values")
private List reportValues;
+ /**
+ * From json answer.
+ *
+ * @param json the json
+ * @return the answer
+ */
public static Answer fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, Answer.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 {
@@ -76,16 +93,33 @@ public class WxCpGetReportAnswer extends WxCpBaseResp implements Serializable {
@SerializedName("fileid")
private List fileId;
+ /**
+ * 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);
}
}
+ /**
+ * From json wx cp get report answer.
+ *
+ * @param json the json
+ * @return the wx cp get report answer
+ */
public static WxCpGetReportAnswer fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetReportAnswer.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobIds.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobIds.java
index 768dcec21..d914c85dd 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobIds.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobIds.java
@@ -23,6 +23,12 @@ public class WxCpGetReportJobIds extends WxCpBaseResp implements Serializable {
@SerializedName("jobids")
private List jobIds;
+ /**
+ * From json wx cp get report job ids.
+ *
+ * @param json the json
+ * @return the wx cp get report job ids
+ */
public static WxCpGetReportJobIds fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetReportJobIds.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobInfo.java
index 5ca603101..6e79045e9 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/health/WxCpGetReportJobInfo.java
@@ -22,6 +22,9 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@SerializedName("job_info")
private JobInfo jobInfo;
+ /**
+ * The type Job info.
+ */
@Getter
@Setter
public static class JobInfo implements Serializable {
@@ -54,16 +57,30 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@SerializedName("question_templates")
private List questionTemplates;
+ /**
+ * From json job info.
+ *
+ * @param json the json
+ * @return the job info
+ */
public static JobInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, JobInfo.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Apply range.
+ */
@Getter
@Setter
public static class ApplyRange implements Serializable {
@@ -75,16 +92,30 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@SerializedName("partyids")
private List partyIds;
+ /**
+ * From json apply range.
+ *
+ * @param json the json
+ * @return the apply range
+ */
public static ApplyRange fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ApplyRange.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * The type Report to.
+ */
@Getter
@Setter
public static class ReportTo implements Serializable {
@@ -93,16 +124,30 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@SerializedName("userids")
private List userIds;
+ /**
+ * From json report to.
+ *
+ * @param json the json
+ * @return the report to
+ */
public static ReportTo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, ReportTo.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 {
@@ -123,16 +168,30 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@SerializedName("option_list")
private List 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 {
@@ -144,16 +203,33 @@ public class WxCpGetReportJobInfo extends WxCpBaseResp implements Serializable {
@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 get report job info.
+ *
+ * @param json the json
+ * @return the wx cp get report job info
+ */
public static WxCpGetReportJobInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpGetReportJobInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java
index 902cc4adc..0710aa8b3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpAllowScope.java
@@ -22,6 +22,9 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
@SerializedName("allow_scope")
private AllowScope allowScope;
+ /**
+ * The type Allow scope.
+ */
@Setter
@Getter
public static class AllowScope implements Serializable {
@@ -32,16 +35,30 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
@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 {
@@ -49,16 +66,30 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
@SerializedName("partyid")
private List 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 {
@@ -68,6 +99,12 @@ public class WxCpAllowScope extends WxCpBaseResp implements Serializable {
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java
index b4e0fded1..3092ed4b1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateParentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 批量创建家长.
*
- * @author Wang_Wong
- * created on 2022-07-11
+ * @author Wang_Wong created on 2022-07-11
*/
@Data
@Builder
@@ -25,6 +24,9 @@ public class WxCpBatchCreateParentRequest implements Serializable {
@SerializedName("parents")
private List parents;
+ /**
+ * The type Parent.
+ */
@Setter
@Getter
@Builder
@@ -44,16 +46,30 @@ public class WxCpBatchCreateParentRequest implements Serializable {
@SerializedName("children")
private List 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
@@ -67,20 +83,42 @@ public class WxCpBatchCreateParentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java
index 5d271fb25..b302a0808 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchCreateStudentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 批量创建学生请求.
*
- * @author Wang_Wong
- * created on 2022-07-01
+ * @author Wang_Wong created on 2022-07-01
*/
@Data
@Builder
@@ -25,6 +24,9 @@ public class WxCpBatchCreateStudentRequest implements Serializable {
@SerializedName("students")
private List students;
+ /**
+ * The type Student.
+ */
@Setter
@Getter
public static class Student implements Serializable {
@@ -38,20 +40,42 @@ public class WxCpBatchCreateStudentRequest implements Serializable {
@SerializedName("department")
private List 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java
index 03a2361f2..8558c6c05 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchDeleteStudentRequest.java
@@ -1,7 +1,10 @@
package me.chanjar.weixin.cp.bean.school.user;
import com.google.gson.annotations.SerializedName;
-import lombok.*;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
@@ -11,8 +14,7 @@ import java.util.List;
/**
* 批量删除学生请求.
*
- * @author Wang_Wong
- * created on 2022-07-01
+ * @author Wang_Wong created on 2022-07-01
*/
@Data
@Builder
@@ -25,10 +27,21 @@ public class WxCpBatchDeleteStudentRequest implements Serializable {
@SerializedName("useridlist")
private List 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java
index fa2374c04..54ed750f2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchResultList.java
@@ -13,8 +13,7 @@ import java.util.List;
/**
* 批量返回结果.
*
- * @author Wang_Wong
- * created on 2022-07-01
+ * @author Wang_Wong created on 2022-07-01
*/
@Data
public class WxCpBatchResultList extends WxCpBaseResp implements Serializable {
@@ -23,9 +22,12 @@ public class WxCpBatchResultList extends WxCpBaseResp implements Serializable {
@SerializedName("result_list")
private List resultList;
+ /**
+ * The type Result list.
+ */
@Setter
@Getter
- public static class ResultList extends WxCpBaseResp{
+ public static class ResultList extends WxCpBaseResp {
@SerializedName("parent_userid")
private String parentUserId;
@@ -33,6 +35,12 @@ public class WxCpBatchResultList extends WxCpBaseResp implements Serializable {
@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);
}
@@ -43,6 +51,12 @@ public class WxCpBatchResultList extends WxCpBaseResp implements Serializable {
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java
index 8a33e40c7..e015d6323 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateParentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 批量更新家长.
*
- * @author Wang_Wong
- * created on 2022-07-11
+ * @author Wang_Wong created on 2022-07-11
*/
@Data
@Builder
@@ -25,6 +24,9 @@ public class WxCpBatchUpdateParentRequest implements Serializable {
@SerializedName("parents")
private List parents;
+ /**
+ * The type Parent.
+ */
@Setter
@Getter
@Builder
@@ -44,16 +46,30 @@ public class WxCpBatchUpdateParentRequest implements Serializable {
@SerializedName("children")
private List 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
@@ -67,20 +83,42 @@ public class WxCpBatchUpdateParentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateStudentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateStudentRequest.java
index 255cc48b3..e4ecd5d55 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateStudentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpBatchUpdateStudentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 批量更新学生请求.
*
- * @author Wang_Wong
- * created on 2022-07-01
+ * @author Wang_Wong created on 2022-07-01
*/
@Data
@Builder
@@ -25,6 +24,9 @@ public class WxCpBatchUpdateStudentRequest implements Serializable {
@SerializedName("students")
private List students;
+ /**
+ * The type Student.
+ */
@Setter
@Getter
public static class Student implements Serializable {
@@ -41,20 +43,42 @@ public class WxCpBatchUpdateStudentRequest implements Serializable {
@SerializedName("department")
private List 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 update student request.
+ *
+ * @param json the json
+ * @return the wx cp batch update student request
+ */
public static WxCpBatchUpdateStudentRequest fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpBatchUpdateStudentRequest.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartment.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartment.java
index 75d34b2e8..45ff90243 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartment.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartment.java
@@ -19,6 +19,12 @@ public class WxCpCreateDepartment extends WxCpBaseResp implements Serializable {
@SerializedName("id")
private Integer id;
+ /**
+ * From json wx cp create department.
+ *
+ * @param json the json
+ * @return the wx cp create department
+ */
public static WxCpCreateDepartment fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCreateDepartment.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java
index ff2fac37e..6c56b18e1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateDepartmentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 创建部门请求.
*
- * @author Wang_Wong
- * created on 2022-06-22
+ * @author Wang_Wong created on 2022-06-22
*/
@Data
@Builder
@@ -46,6 +45,9 @@ public class WxCpCreateDepartmentRequest implements Serializable {
@SerializedName("department_admins")
private List departmentAdmins;
+ /**
+ * The type Department admin.
+ */
@Setter
@Getter
public static class DepartmentAdmin implements Serializable {
@@ -59,20 +61,42 @@ public class WxCpCreateDepartmentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java
index fad719f34..4293f2560 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpCreateParentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 创建家长请求.
*
- * @author Wang_Wong
- * created on 2022-06-20
+ * @author Wang_Wong created on 2022-06-20
*/
@Data
@Builder
@@ -34,6 +33,9 @@ public class WxCpCreateParentRequest implements Serializable {
@SerializedName("children")
private List children;
+ /**
+ * The type Children.
+ */
@Setter
@Getter
@Builder
@@ -47,20 +49,42 @@ public class WxCpCreateParentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java
index 5e1c03184..9858f5762 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpDepartmentList.java
@@ -22,9 +22,12 @@ public class WxCpDepartmentList extends WxCpBaseResp implements Serializable {
@SerializedName("departments")
private List departments;
+ /**
+ * The type Department.
+ */
@Setter
@Getter
- public static class Department implements Serializable{
+ public static class Department implements Serializable {
@SerializedName("parentid")
private Integer parentId;
@@ -58,16 +61,30 @@ public class WxCpDepartmentList extends WxCpBaseResp implements Serializable {
@SerializedName("department_admins")
private List 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 {
@@ -81,16 +98,33 @@ public class WxCpDepartmentList extends WxCpBaseResp implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java
index 676886975..4ea571610 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpExternalContact.java
@@ -14,8 +14,7 @@ import java.util.List;
* 获取外部联系人详情
* https://developer.work.weixin.qq.com/document/path/91670
*
- * @author Wang_Wong
- * created on : 2022/6/27 9:10
+ * @author Wang_Wong created on : 2022/6/27 9:10
*/
@Data
public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
@@ -27,6 +26,9 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
@SerializedName("follow_user")
private List followedUsers;
+ /**
+ * The type Wx cp follow user.
+ */
@Getter
@Setter
public static class WxCpFollowUser implements Serializable {
@@ -52,16 +54,30 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
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 {
@@ -84,16 +100,30 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
*/
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 {
@@ -135,16 +165,30 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
@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 {
@@ -159,16 +203,30 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
@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 {
@@ -179,6 +237,9 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type External attribute.
+ */
@Getter
@Setter
public static class ExternalAttribute implements Serializable {
@@ -195,16 +256,30 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
@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 {
@@ -214,6 +289,9 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Web.
+ */
@Getter
@Setter
public static class Web implements Serializable {
@@ -225,6 +303,9 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
}
+ /**
+ * The type Mini program.
+ */
@Getter
@Setter
public static class MiniProgram implements Serializable {
@@ -239,6 +320,12 @@ public class WxCpExternalContact extends WxCpBaseResp implements Serializable {
}
+ /**
+ * 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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java
index 13e4e355e..73cfd7070 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpListParentResult.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 获取部门家长详情返回结果.
*
- * @author Wang_Wong
- * created on 2022-07-13
+ * @author Wang_Wong created on 2022-07-13
*/
@Data
@Builder
@@ -26,6 +25,9 @@ public class WxCpListParentResult extends WxCpBaseResp implements Serializable {
@SerializedName("parents")
private List parents;
+ /**
+ * The type Parent.
+ */
@Setter
@Getter
@Builder
@@ -48,16 +50,30 @@ public class WxCpListParentResult extends WxCpBaseResp implements Serializable {
@SerializedName("children")
private List 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
@@ -74,16 +90,33 @@ public class WxCpListParentResult extends WxCpBaseResp implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSetUpgradeInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSetUpgradeInfo.java
index 7a1b3ee27..08caba09e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSetUpgradeInfo.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSetUpgradeInfo.java
@@ -19,6 +19,12 @@ public class WxCpSetUpgradeInfo extends WxCpBaseResp implements Serializable {
@SerializedName("next_upgrade_time")
private Long nextUpgradeTime;
+ /**
+ * From json wx cp set upgrade info.
+ *
+ * @param json the json
+ * @return the wx cp set upgrade info
+ */
public static WxCpSetUpgradeInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSetUpgradeInfo.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSubscribeQrCode.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSubscribeQrCode.java
index 26879266b..7d706fb54 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSubscribeQrCode.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpSubscribeQrCode.java
@@ -25,6 +25,12 @@ public class WxCpSubscribeQrCode extends WxCpBaseResp implements Serializable {
@SerializedName("qrcode_thumb")
private String qrCodeThumb;
+ /**
+ * From json wx cp subscribe qr code.
+ *
+ * @param json the json
+ * @return the wx cp subscribe qr code
+ */
public static WxCpSubscribeQrCode fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpSubscribeQrCode.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java
index 52348446a..651736171 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateDepartmentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 更新部门请求.
*
- * @author Wang_Wong
- * created on 2022-06-22
+ * @author Wang_Wong created on 2022-06-22
*/
@Data
@Builder
@@ -49,6 +48,9 @@ public class WxCpUpdateDepartmentRequest implements Serializable {
@SerializedName("department_admins")
private List departmentAdmins;
+ /**
+ * The type Department admin.
+ */
@Setter
@Getter
public static class DepartmentAdmin implements Serializable {
@@ -65,20 +67,42 @@ public class WxCpUpdateDepartmentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java
index dde2fa446..6cbe3b918 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUpdateParentRequest.java
@@ -11,8 +11,7 @@ import java.util.List;
/**
* 更新家长请求.
*
- * @author Wang_Wong
- * created on 2022-06-20
+ * @author Wang_Wong created on 2022-06-20
*/
@Data
@Builder
@@ -34,6 +33,9 @@ public class WxCpUpdateParentRequest implements Serializable {
@SerializedName("children")
private List children;
+ /**
+ * The type Children.
+ */
@Setter
@Getter
public static class Children implements Serializable {
@@ -44,20 +46,42 @@ public class WxCpUpdateParentRequest implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserListResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserListResult.java
index db7266d20..584fdbb88 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserListResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserListResult.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 获取部门成员详情返回结果.
*
- * @author Wang_Wong
- * created on 2022-07-13
+ * @author Wang_Wong created on 2022-07-13
*/
@Data
@Builder
@@ -26,6 +25,9 @@ public class WxCpUserListResult extends WxCpBaseResp implements Serializable {
@SerializedName("students")
private List students;
+ /**
+ * The type Parent.
+ */
@Setter
@Getter
@Builder
@@ -48,16 +50,30 @@ public class WxCpUserListResult extends WxCpBaseResp implements Serializable {
@SerializedName("is_subscribe")
private Integer isSubscribe;
+ /**
+ * 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
@@ -77,16 +93,33 @@ public class WxCpUserListResult extends WxCpBaseResp implements Serializable {
@SerializedName("parents")
private List parents;
+ /**
+ * 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 user list result.
+ *
+ * @param json the json
+ * @return the wx cp user list result
+ */
public static WxCpUserListResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserListResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java
index b3063ef15..5b92b3f48 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/school/user/WxCpUserResult.java
@@ -12,8 +12,7 @@ import java.util.List;
/**
* 读取学生或家长返回结果.
*
- * @author Wang_Wong
- * created on 2022-07-13
+ * @author Wang_Wong created on 2022-07-13
*/
@Data
@Builder
@@ -32,6 +31,9 @@ public class WxCpUserResult extends WxCpBaseResp implements Serializable {
@SerializedName("user_type")
private Integer userType;
+ /**
+ * The type Parent.
+ */
@Setter
@Getter
@Builder
@@ -57,16 +59,30 @@ public class WxCpUserResult extends WxCpBaseResp implements Serializable {
@SerializedName("children")
private List 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
@@ -86,16 +102,30 @@ public class WxCpUserResult extends WxCpBaseResp implements Serializable {
@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
@@ -109,16 +139,33 @@ public class WxCpUserResult extends WxCpBaseResp implements Serializable {
@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);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/taskcard/TaskCardButton.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/taskcard/TaskCardButton.java
index 8215553a1..3bcc19697 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/taskcard/TaskCardButton.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/taskcard/TaskCardButton.java
@@ -13,8 +13,7 @@ import java.io.Serializable;
* Created by Jeff on 2019-05-16.
*
*
- * @author Jeff
- * created on 2019-05-16
+ * @author Jeff created on 2019-05-16
*/
@Data
@Builder
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java
index 59b5f3395..2b14ae7a6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/ActionMenuItem.java
@@ -10,8 +10,8 @@ import java.io.Serializable;
/**
* 卡片右上角更多操作按钮点击后出现的操作列表,列表长度取值范围为 [1, 3]
- * @author xiaohe
- * created on 2022-03-06
+ *
+ * @author xiaohe created on 2022-03-06
*/
@Data
@Builder
@@ -30,6 +30,11 @@ public class ActionMenuItem implements Serializable {
*/
private String key;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
btnObject.addProperty("text", this.getText());
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java
index a00270125..c950ab09e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/CheckboxOption.java
@@ -11,8 +11,7 @@ import java.io.Serializable;
/**
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -37,6 +36,11 @@ public class CheckboxOption implements Serializable {
*/
private Boolean is_checked;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject optionJson = new JsonObject();
optionJson.addProperty("id", this.getId());
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java
index f26ee04dd..60a7c475d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/HorizontalContent.java
@@ -12,8 +12,7 @@ import java.io.Serializable;
/**
* 二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -49,6 +48,11 @@ public class HorizontalContent implements Serializable {
*/
private String userid;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject hContentJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java
index 21bf621a5..c9f15e6d7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/MultipleSelect.java
@@ -14,8 +14,7 @@ import java.util.List;
/**
* 下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -42,6 +41,11 @@ public class MultipleSelect implements Serializable {
*/
private List options;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject selectJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java
index db309b6f6..7caba68e3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/QuoteArea.java
@@ -12,8 +12,7 @@ import java.io.Serializable;
/**
* 引用文献样式
*
- * @author zp
- * created on 2022/1/2
+ * @author zp created on 2022/1/2
*/
@Data
@Builder
@@ -48,6 +47,11 @@ public class QuoteArea implements Serializable {
*/
private String quoteText;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject quoteAreaJson = new JsonObject();
if (null != this.getType()) {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java
index 18fad6670..bbb6b7390 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardButton.java
@@ -11,8 +11,7 @@ import java.io.Serializable;
/**
* 按钮列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -45,7 +44,11 @@ public class TemplateCardButton implements Serializable {
private String url;
-
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject btnObject = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java
index de62f4298..6b20fba69 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/TemplateCardJump.java
@@ -12,8 +12,7 @@ import java.io.Serializable;
/**
* 跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -43,6 +42,11 @@ public class TemplateCardJump implements Serializable {
*/
private String pagepath;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject hContentJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java
index 9f2273104..1b192edcb 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/templatecard/VerticalContent.java
@@ -12,8 +12,7 @@ import java.io.Serializable;
/**
* 卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4
*
- * @author yzts
- * created on 2021/9/22
+ * @author yzts created on 2021/9/22
*/
@Data
@Builder
@@ -31,6 +30,11 @@ public class VerticalContent implements Serializable {
*/
private String desc;
+ /**
+ * To json json object.
+ *
+ * @return the json object
+ */
public JsonObject toJson() {
JsonObject vContentJson = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/user/WxCpDeptUserResult.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/user/WxCpDeptUserResult.java
index ac7d1f419..f5904424b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/user/WxCpDeptUserResult.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/user/WxCpDeptUserResult.java
@@ -13,8 +13,7 @@ import java.util.List;
/**
* 获取成员ID列表返回参数
*
- * @author Wang_Wong
- * created on 2022/08/09
+ * @author Wang_Wong created on 2022/08/09
*/
@Data
public class WxCpDeptUserResult extends WxCpBaseResp {
@@ -26,6 +25,9 @@ public class WxCpDeptUserResult extends WxCpBaseResp {
@SerializedName("dept_user")
private List deptUser;
+ /**
+ * The type Dept user list.
+ */
@Getter
@Setter
public static class DeptUserList implements Serializable {
@@ -37,16 +39,33 @@ public class WxCpDeptUserResult extends WxCpBaseResp {
@SerializedName("department")
private Long department;
+ /**
+ * From json dept user list.
+ *
+ * @param json the json
+ * @return the dept user list
+ */
public static DeptUserList fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, DeptUserList.class);
}
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}
+ /**
+ * From json wx cp dept user result.
+ *
+ * @param json the json
+ * @return the wx cp dept user result
+ */
public static WxCpDeptUserResult fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpDeptUserResult.class);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchKeyData.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchKeyData.java
index e4022d60c..dbafee980 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchKeyData.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchKeyData.java
@@ -5,8 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author songshiyu
- * created on : create in 10:21 2020/9/28
+ * The type Work bench key data.
+ *
+ * @author songshiyu created on : create in 10:21 2020/9/28
* @description: 关键数据型模板类型
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchList.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchList.java
index 1249d9a8d..490623749 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchList.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/workbench/WorkBenchList.java
@@ -5,8 +5,9 @@ import lombok.Data;
import java.io.Serializable;
/**
- * @author songshiyu
- * created on : create in 10:21 2020/9/28
+ * The type Work bench list.
+ *
+ * @author songshiyu created on : create in 10:21 2020/9/28
* @description: 列表模板类型
*/
@Data
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
index 10ae05ead..16608f9d2 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
@@ -177,14 +177,14 @@ public interface WxCpConfigStorage {
/**
* 企微会话存档私钥
*
- * @return
+ * @return msg audit pri key
*/
String getMsgAuditPriKey();
/**
* 获取企微会话存档系统库 绝对路径
*
- * @return
+ * @return msg audit lib path
*/
String getMsgAuditLibPath();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpTpConfigStorage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpTpConfigStorage.java
index 606c8997e..72f143fc3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpTpConfigStorage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpTpConfigStorage.java
@@ -257,8 +257,6 @@ public interface WxCpTpConfigStorage {
*/
void updateAuthSuiteJsApiTicket(String authCorpId, String jsApiTicket, int expiredInSeconds);
- ;
-
/**
* Is provider token expired boolean.
*
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
index 662cf226b..53cc475ef 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
@@ -104,7 +104,8 @@ public class WxCpRedisConfigImpl implements WxCpConfigStorage {
* @param password the password
* @param database the database
*/
- public WxCpRedisConfigImpl(JedisPoolConfig poolConfig, String host, int port, int timeout, String password, int database) {
+ public WxCpRedisConfigImpl(JedisPoolConfig poolConfig, String host, int port, int timeout, String password,
+ int database) {
jedisPool = new JedisPool(poolConfig, host, port, timeout, password, database);
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedissonConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedissonConfigImpl.java
index 159ba78ad..62099f031 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedissonConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedissonConfigImpl.java
@@ -13,8 +13,7 @@ import java.util.concurrent.locks.Lock;
/**
* 基于Redisson的实现
*
- * @author yuanqixun
- * created on 2020 /5/13
+ * @author yuanqixun created on 2020 /5/13
*/
public class WxCpRedissonConfigImpl extends WxCpDefaultConfigImpl {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpDefaultConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpDefaultConfigImpl.java
index c177250ba..a4b8af467 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpDefaultConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpDefaultConfigImpl.java
@@ -45,12 +45,12 @@ public class WxCpTpDefaultConfigImpl implements WxCpTpConfigStorage, Serializabl
private volatile String suiteTicket;
private volatile long suiteTicketExpiresTime;
private volatile String oauth2redirectUri;
- private volatile Map authCorpAccessTokenMap = new HashMap<>();
- private volatile Map authCorpAccessTokenExpireTimeMap = new HashMap<>();
- private volatile Map authCorpJsApiTicketMap = new HashMap<>();
- private volatile Map authCorpJsApiTicketExpireTimeMap = new HashMap<>();
- private volatile Map authSuiteJsApiTicketMap = new HashMap<>();
- private volatile Map authSuiteJsApiTicketExpireTimeMap = new HashMap<>();
+ private final Map authCorpAccessTokenMap = new HashMap<>();
+ private final Map authCorpAccessTokenExpireTimeMap = new HashMap<>();
+ private final Map authCorpJsApiTicketMap = new HashMap<>();
+ private final Map authCorpJsApiTicketExpireTimeMap = new HashMap<>();
+ private final Map authSuiteJsApiTicketMap = new HashMap<>();
+ private final Map authSuiteJsApiTicketExpireTimeMap = new HashMap<>();
private volatile String httpProxyHost;
private volatile int httpProxyPort;
private volatile String httpProxyUsername;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpRedissonConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpRedissonConfigImpl.java
index 039337fc4..02193cfd3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpRedissonConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpTpRedissonConfigImpl.java
@@ -429,7 +429,6 @@ public class WxCpTpRedissonConfigImpl implements WxCpTpConfigStorage, Serializab
/**
* 一个provider 会有多个suite,需要唯一标识作为前缀
- *
*/
private String keyWithPrefix(String key) {
return keyPrefix + ":" + suiteId + ":" + key;
@@ -438,7 +437,6 @@ public class WxCpTpRedissonConfigImpl implements WxCpTpConfigStorage, Serializab
/**
* provider 应该独享一个key,且不和任何suite关联
* 一个provider 会有多个suite,不同的suite 都应该指向同一个provider 的数据
- *
*/
private String providerKeyWithPrefix(String key) {
return keyPrefix + ":" + corpId + ":" + key;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java
index fc5868df6..90beb6108 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java
@@ -10,17 +10,50 @@ package me.chanjar.weixin.cp.constant;
* @author Binary Wang
*/
public interface WxCpApiPathConsts {
+ /**
+ * The constant DEFAULT_CP_BASE_URL.
+ */
String DEFAULT_CP_BASE_URL = "https://qyapi.weixin.qq.com";
+ /**
+ * The constant GET_JSAPI_TICKET.
+ */
String GET_JSAPI_TICKET = "/cgi-bin/get_jsapi_ticket";
+ /**
+ * The constant GET_AGENT_CONFIG_TICKET.
+ */
String GET_AGENT_CONFIG_TICKET = "/cgi-bin/ticket/get?&type=agent_config";
+ /**
+ * The constant GET_CALLBACK_IP.
+ */
String GET_CALLBACK_IP = "/cgi-bin/getcallbackip";
+ /**
+ * The constant BATCH_REPLACE_PARTY.
+ */
String BATCH_REPLACE_PARTY = "/cgi-bin/batch/replaceparty";
+ /**
+ * The constant BATCH_SYNC_USER.
+ */
String BATCH_SYNC_USER = "/cgi-bin/batch/syncuser";
+ /**
+ * The constant BATCH_REPLACE_USER.
+ */
String BATCH_REPLACE_USER = "/cgi-bin/batch/replaceuser";
+ /**
+ * The constant BATCH_GET_RESULT.
+ */
String BATCH_GET_RESULT = "/cgi-bin/batch/getresult?jobid=";
+ /**
+ * The constant JSCODE_TO_SESSION.
+ */
String JSCODE_TO_SESSION = "/cgi-bin/miniprogram/jscode2session";
+ /**
+ * The constant GET_TOKEN.
+ */
String GET_TOKEN = "/cgi-bin/gettoken?corpid=%s&corpsecret=%s";
+ /**
+ * The constant WEBHOOK_SEND.
+ */
String WEBHOOK_SEND = "/cgi-bin/webhook/send?key=";
/**
@@ -53,66 +86,192 @@ public interface WxCpApiPathConsts {
}
+ /**
+ * The interface Agent.
+ */
interface Agent {
+ /**
+ * The constant AGENT_GET.
+ */
String AGENT_GET = "/cgi-bin/agent/get?agentid=%d";
+ /**
+ * The constant AGENT_SET.
+ */
String AGENT_SET = "/cgi-bin/agent/set";
+ /**
+ * The constant AGENT_LIST.
+ */
String AGENT_LIST = "/cgi-bin/agent/list";
}
+ /**
+ * The interface Work bench.
+ */
interface WorkBench {
+ /**
+ * The constant WORKBENCH_TEMPLATE_SET.
+ */
String WORKBENCH_TEMPLATE_SET = "/cgi-bin/agent/set_workbench_template";
+ /**
+ * The constant WORKBENCH_TEMPLATE_GET.
+ */
String WORKBENCH_TEMPLATE_GET = "/cgi-bin/agent/get_workbench_template";
+ /**
+ * The constant WORKBENCH_DATA_SET.
+ */
String WORKBENCH_DATA_SET = "/cgi-bin/agent/set_workbench_data";
}
+ /**
+ * The interface O auth 2.
+ */
interface OAuth2 {
+ /**
+ * The constant GET_USER_INFO.
+ */
String GET_USER_INFO = "/cgi-bin/user/getuserinfo?code=%s&agentid=%d";
+ /**
+ * The constant GET_SCHOOL_USER_INFO.
+ */
String GET_SCHOOL_USER_INFO = "/cgi-bin/school/getuserinfo?code=%s";
+ /**
+ * The constant GET_USER_DETAIL.
+ */
String GET_USER_DETAIL = "/cgi-bin/user/getuserdetail";
+ /**
+ * The constant URL_OAUTH2_AUTHORIZE.
+ */
String URL_OAUTH2_AUTHORIZE = "https://open.weixin.qq.com/connect/oauth2/authorize";
}
+ /**
+ * The interface Chat.
+ */
interface Chat {
+ /**
+ * The constant APPCHAT_CREATE.
+ */
String APPCHAT_CREATE = "/cgi-bin/appchat/create";
+ /**
+ * The constant APPCHAT_UPDATE.
+ */
String APPCHAT_UPDATE = "/cgi-bin/appchat/update";
+ /**
+ * The constant APPCHAT_GET_CHATID.
+ */
String APPCHAT_GET_CHATID = "/cgi-bin/appchat/get?chatid=";
+ /**
+ * The constant APPCHAT_SEND.
+ */
String APPCHAT_SEND = "/cgi-bin/appchat/send";
}
+ /**
+ * The interface Department.
+ */
interface Department {
+ /**
+ * The constant DEPARTMENT_CREATE.
+ */
String DEPARTMENT_CREATE = "/cgi-bin/department/create";
+ /**
+ * The constant DEPARTMENT_UPDATE.
+ */
String DEPARTMENT_UPDATE = "/cgi-bin/department/update";
+ /**
+ * The constant DEPARTMENT_GET.
+ */
String DEPARTMENT_GET = "/cgi-bin/department/get?id=%d";
+ /**
+ * The constant DEPARTMENT_DELETE.
+ */
String DEPARTMENT_DELETE = "/cgi-bin/department/delete?id=%d";
+ /**
+ * The constant DEPARTMENT_LIST.
+ */
String DEPARTMENT_LIST = "/cgi-bin/department/list";
+ /**
+ * The constant DEPARTMENT_SIMPLE_LIST.
+ */
String DEPARTMENT_SIMPLE_LIST = "/cgi-bin/department/simplelist";
}
+ /**
+ * The interface Media.
+ */
interface Media {
+ /**
+ * The constant MEDIA_GET.
+ */
String MEDIA_GET = "/cgi-bin/media/get";
+ /**
+ * The constant MEDIA_UPLOAD.
+ */
String MEDIA_UPLOAD = "/cgi-bin/media/upload?type=";
+ /**
+ * The constant IMG_UPLOAD.
+ */
String IMG_UPLOAD = "/cgi-bin/media/uploadimg";
+ /**
+ * The constant JSSDK_MEDIA_GET.
+ */
String JSSDK_MEDIA_GET = "/cgi-bin/media/get/jssdk";
}
+ /**
+ * The interface Menu.
+ */
interface Menu {
+ /**
+ * The constant MENU_CREATE.
+ */
String MENU_CREATE = "/cgi-bin/menu/create?agentid=%d";
+ /**
+ * The constant MENU_DELETE.
+ */
String MENU_DELETE = "/cgi-bin/menu/delete?agentid=%d";
+ /**
+ * The constant MENU_GET.
+ */
String MENU_GET = "/cgi-bin/menu/get?agentid=%d";
}
+ /**
+ * The interface Oa.
+ */
interface Oa {
/**
* 打卡
* https://developer.work.weixin.qq.com/document/path/94204
*/
String GET_CORP_CHECKIN_OPTION = "/cgi-bin/checkin/getcorpcheckinoption";
+ /**
+ * The constant GET_CHECKIN_DATA.
+ */
String GET_CHECKIN_DATA = "/cgi-bin/checkin/getcheckindata";
+ /**
+ * The constant GET_CHECKIN_OPTION.
+ */
String GET_CHECKIN_OPTION = "/cgi-bin/checkin/getcheckinoption";
+ /**
+ * The constant GET_CHECKIN_DAY_DATA.
+ */
String GET_CHECKIN_DAY_DATA = "/cgi-bin/checkin/getcheckin_daydata";
+ /**
+ * The constant GET_CHECKIN_MONTH_DATA.
+ */
String GET_CHECKIN_MONTH_DATA = "/cgi-bin/checkin/getcheckin_monthdata";
+ /**
+ * The constant GET_CHECKIN_SCHEDULE_DATA.
+ */
String GET_CHECKIN_SCHEDULE_DATA = "/cgi-bin/checkin/getcheckinschedulist";
+ /**
+ * The constant SET_CHECKIN_SCHEDULE_DATA.
+ */
String SET_CHECKIN_SCHEDULE_DATA = "/cgi-bin/checkin/setcheckinschedulist";
+ /**
+ * The constant ADD_CHECK_IN_USER_FACE.
+ */
String ADD_CHECK_IN_USER_FACE = "/cgi-bin/checkin/addcheckinuserface";
/**
@@ -120,14 +279,38 @@ public interface WxCpApiPathConsts {
* https://developer.work.weixin.qq.com/document/path/91956
*/
String COPY_TEMPLATE = "/cgi-bin/oa/approval/copytemplate";
+ /**
+ * The constant GET_TEMPLATE_DETAIL.
+ */
String GET_TEMPLATE_DETAIL = "/cgi-bin/oa/gettemplatedetail";
+ /**
+ * The constant APPLY_EVENT.
+ */
String APPLY_EVENT = "/cgi-bin/oa/applyevent";
+ /**
+ * The constant GET_APPROVAL_INFO.
+ */
String GET_APPROVAL_INFO = "/cgi-bin/oa/getapprovalinfo";
+ /**
+ * The constant GET_APPROVAL_DETAIL.
+ */
String GET_APPROVAL_DETAIL = "/cgi-bin/oa/getapprovaldetail";
+ /**
+ * The constant GET_APPROVAL_DATA.
+ */
String GET_APPROVAL_DATA = "/cgi-bin/oa/getapprovaldata";
+ /**
+ * The constant GET_CORP_CONF.
+ */
String GET_CORP_CONF = "/cgi-bin/oa/vacation/getcorpconf";
+ /**
+ * The constant GET_USER_VACATION_QUOTA.
+ */
String GET_USER_VACATION_QUOTA = "/cgi-bin/oa/vacation/getuservacationquota";
+ /**
+ * The constant SET_ONE_USER_QUOTA.
+ */
String SET_ONE_USER_QUOTA = "/cgi-bin/oa/vacation/setoneuserquota";
/**
@@ -141,14 +324,38 @@ public interface WxCpApiPathConsts {
* https://developer.work.weixin.qq.com/document/path/93624
*/
String CALENDAR_ADD = "/cgi-bin/oa/calendar/add";
+ /**
+ * The constant CALENDAR_UPDATE.
+ */
String CALENDAR_UPDATE = "/cgi-bin/oa/calendar/update";
+ /**
+ * The constant CALENDAR_GET.
+ */
String CALENDAR_GET = "/cgi-bin/oa/calendar/get";
+ /**
+ * The constant CALENDAR_DEL.
+ */
String CALENDAR_DEL = "/cgi-bin/oa/calendar/del";
+ /**
+ * The constant SCHEDULE_ADD.
+ */
String SCHEDULE_ADD = "/cgi-bin/oa/schedule/add";
+ /**
+ * The constant SCHEDULE_UPDATE.
+ */
String SCHEDULE_UPDATE = "/cgi-bin/oa/schedule/update";
+ /**
+ * The constant SCHEDULE_GET.
+ */
String SCHEDULE_GET = "/cgi-bin/oa/schedule/get";
+ /**
+ * The constant SCHEDULE_DEL.
+ */
String SCHEDULE_DEL = "/cgi-bin/oa/schedule/del";
+ /**
+ * The constant SCHEDULE_LIST.
+ */
String SCHEDULE_LIST = "/cgi-bin/oa/schedule/get_by_calendar";
/**
@@ -156,8 +363,17 @@ public interface WxCpApiPathConsts {
* https://developer.work.weixin.qq.com/document/path/93624
*/
String MEETINGROOM_ADD = "/cgi-bin/oa/meetingroom/add";
+ /**
+ * The constant MEETINGROOM_LIST.
+ */
String MEETINGROOM_LIST = "/cgi-bin/oa/meetingroom/list";
+ /**
+ * The constant MEETINGROOM_EDIT.
+ */
String MEETINGROOM_EDIT = "/cgi-bin/oa/meetingroom/edit";
+ /**
+ * The constant MEETINGROOM_DEL.
+ */
String MEETINGROOM_DEL = "/cgi-bin/oa/meetingroom/del";
/**
@@ -165,24 +381,81 @@ public interface WxCpApiPathConsts {
* https://developer.work.weixin.qq.com/document/path/93654
*/
String SPACE_CREATE = "/cgi-bin/wedrive/space_create";
+ /**
+ * The constant SPACE_RENAME.
+ */
String SPACE_RENAME = "/cgi-bin/wedrive/space_rename";
+ /**
+ * The constant SPACE_DISMISS.
+ */
String SPACE_DISMISS = "/cgi-bin/wedrive/space_dismiss";
+ /**
+ * The constant SPACE_INFO.
+ */
String SPACE_INFO = "/cgi-bin/wedrive/space_info";
+ /**
+ * The constant SPACE_ACL_ADD.
+ */
String SPACE_ACL_ADD = "/cgi-bin/wedrive/space_acl_add";
+ /**
+ * The constant SPACE_ACL_DEL.
+ */
String SPACE_ACL_DEL = "/cgi-bin/wedrive/space_acl_del";
+ /**
+ * The constant SPACE_SETTING.
+ */
String SPACE_SETTING = "/cgi-bin/wedrive/space_setting";
+ /**
+ * The constant SPACE_SHARE.
+ */
String SPACE_SHARE = "/cgi-bin/wedrive/space_share";
+ /**
+ * The constant FILE_LIST.
+ */
String FILE_LIST = "/cgi-bin/wedrive/file_list";
+ /**
+ * The constant FILE_UPLOAD.
+ */
String FILE_UPLOAD = "/cgi-bin/wedrive/file_upload";
+ /**
+ * The constant FILE_DOWNLOAD.
+ */
String FILE_DOWNLOAD = "/cgi-bin/wedrive/file_download";
+ /**
+ * The constant FILE_RENAME.
+ */
String FILE_RENAME = "/cgi-bin/wedrive/file_rename";
+ /**
+ * The constant FILE_CREATE.
+ */
String FILE_CREATE = "/cgi-bin/wedrive/file_create";
+ /**
+ * The constant FILE_MOVE.
+ */
String FILE_MOVE = "/cgi-bin/wedrive/file_move";
+ /**
+ * The constant FILE_DELETE.
+ */
String FILE_DELETE = "/cgi-bin/wedrive/file_delete";
+ /**
+ * The constant FILE_INFO.
+ */
String FILE_INFO = "/cgi-bin/wedrive/file_info";
+ /**
+ * The constant FILE_ACL_ADD.
+ */
String FILE_ACL_ADD = "/cgi-bin/wedrive/file_acl_add";
+ /**
+ * The constant FILE_ACL_DEL.
+ */
String FILE_ACL_DEL = "/cgi-bin/wedrive/file_acl_del";
+ /**
+ * The constant FILE_SETTING.
+ */
String FILE_SETTING = "/cgi-bin/wedrive/file_setting";
+ /**
+ * The constant FILE_SHARE.
+ */
String FILE_SHARE = "/cgi-bin/wedrive/file_share";
/**
@@ -192,268 +465,877 @@ public interface WxCpApiPathConsts {
String GET_OPEN_APPROVAL_DATA = "/cgi-bin/corp/getopenapprovaldata";
}
+ /**
+ * The interface School.
+ */
interface School {
+ /**
+ * The constant GET_HEALTH_REPORT_STAT.
+ */
String GET_HEALTH_REPORT_STAT = "/cgi-bin/health/get_health_report_stat";
+ /**
+ * The constant GET_REPORT_JOBIDS.
+ */
String GET_REPORT_JOBIDS = "/cgi-bin/health/get_report_jobids";
+ /**
+ * The constant GET_REPORT_JOB_INFO.
+ */
String GET_REPORT_JOB_INFO = "/cgi-bin/health/get_report_job_info";
+ /**
+ * The constant GET_REPORT_ANSWER.
+ */
String GET_REPORT_ANSWER = "/cgi-bin/health/get_report_answer";
+ /**
+ * The constant GET_TEACHER_CUSTOMIZE_HEALTH_INFO.
+ */
String GET_TEACHER_CUSTOMIZE_HEALTH_INFO = "/cgi-bin/school/user/get_teacher_customize_health_info";
+ /**
+ * The constant GET_STUDENT_CUSTOMIZE_HEALTH_INFO.
+ */
String GET_STUDENT_CUSTOMIZE_HEALTH_INFO = "/cgi-bin/school/user/get_student_customize_health_info";
+ /**
+ * The constant GET_HEALTH_QRCODE.
+ */
String GET_HEALTH_QRCODE = "/cgi-bin/school/user/get_health_qrcode";
+ /**
+ * The constant BATCH_CREATE_STUDENT.
+ */
String BATCH_CREATE_STUDENT = "/cgi-bin/school/user/batch_create_student";
+ /**
+ * The constant BATCH_DELETE_STUDENT.
+ */
String BATCH_DELETE_STUDENT = "/cgi-bin/school/user/batch_delete_student";
+ /**
+ * The constant BATCH_UPDATE_STUDENT.
+ */
String BATCH_UPDATE_STUDENT = "/cgi-bin/school/user/batch_update_student";
+ /**
+ * The constant BATCH_CREATE_PARENT.
+ */
String BATCH_CREATE_PARENT = "/cgi-bin/school/user/batch_create_parent";
+ /**
+ * The constant BATCH_DELETE_PARENT.
+ */
String BATCH_DELETE_PARENT = "/cgi-bin/school/user/batch_delete_parent";
+ /**
+ * The constant BATCH_UPDATE_PARENT.
+ */
String BATCH_UPDATE_PARENT = "/cgi-bin/school/user/batch_update_parent";
+ /**
+ * The constant CREATE_STUDENT.
+ */
String CREATE_STUDENT = "/cgi-bin/school/user/create_student";
+ /**
+ * The constant DELETE_STUDENT.
+ */
String DELETE_STUDENT = "/cgi-bin/school/user/delete_student?userid=";
+ /**
+ * The constant UPDATE_STUDENT.
+ */
String UPDATE_STUDENT = "/cgi-bin/school/user/update_student";
+ /**
+ * The constant CREATE_PARENT.
+ */
String CREATE_PARENT = "/cgi-bin/school/user/create_parent";
+ /**
+ * The constant UPDATE_PARENT.
+ */
String UPDATE_PARENT = "/cgi-bin/school/user/update_parent";
+ /**
+ * The constant DELETE_PARENT.
+ */
String DELETE_PARENT = "/cgi-bin/school/user/delete_parent?userid=";
+ /**
+ * The constant GET_USER.
+ */
String GET_USER = "/cgi-bin/school/user/get?userid=";
+ /**
+ * The constant GET_USER_LIST.
+ */
String GET_USER_LIST = "/cgi-bin/school/user/list?department_id=%s&fetch_child=%d";
+ /**
+ * The constant GET_USER_LIST_PARENT.
+ */
String GET_USER_LIST_PARENT = "/cgi-bin/school/user/list_parent?department_id=";
+ /**
+ * The constant SET_ARCH_SYNC_MODE.
+ */
String SET_ARCH_SYNC_MODE = "/cgi-bin/school/set_arch_sync_mode";
+ /**
+ * The constant SET_UPGRADE_INFO.
+ */
String SET_UPGRADE_INFO = "/cgi-bin/school/set_upgrade_info";
+ /**
+ * The constant DEPARTMENT_CREATE.
+ */
String DEPARTMENT_CREATE = "/cgi-bin/school/department/create";
+ /**
+ * The constant DEPARTMENT_UPDATE.
+ */
String DEPARTMENT_UPDATE = "/cgi-bin/school/department/update";
+ /**
+ * The constant DEPARTMENT_DELETE.
+ */
String DEPARTMENT_DELETE = "/cgi-bin/school/department/delete?id=";
+ /**
+ * The constant DEPARTMENT_LIST.
+ */
String DEPARTMENT_LIST = "/cgi-bin/school/department/list?id=";
+ /**
+ * The constant GET_PAYMENT_RESULT.
+ */
String GET_PAYMENT_RESULT = "/cgi-bin/school/get_payment_result";
+ /**
+ * The constant GET_TRADE.
+ */
String GET_TRADE = "/cgi-bin/school/get_trade";
+ /**
+ * The constant GET_ALLOW_SCOPE.
+ */
String GET_ALLOW_SCOPE = "/cgi-bin/school/agent/get_allow_scope?agentid=";
/**
* 上课直播
*/
String GET_LIVING_INFO = "/cgi-bin/school/living/get_living_info?livingid=";
+ /**
+ * The constant GET_WATCH_STAT.
+ */
String GET_WATCH_STAT = "/cgi-bin/school/living/get_watch_stat";
+ /**
+ * The constant GET_UNWATCH_STAT.
+ */
String GET_UNWATCH_STAT = "/cgi-bin/school/living/get_unwatch_stat";
}
+ /**
+ * The interface Living.
+ */
interface Living {
+ /**
+ * The constant GET_LIVING_CODE.
+ */
String GET_LIVING_CODE = "/cgi-bin/living/get_living_code";
+ /**
+ * The constant GET_LIVING_INFO.
+ */
String GET_LIVING_INFO = "/cgi-bin/living/get_living_info?livingid=";
+ /**
+ * The constant GET_WATCH_STAT.
+ */
String GET_WATCH_STAT = "/cgi-bin/living/get_watch_stat";
+ /**
+ * The constant GET_LIVING_SHARE_INFO.
+ */
String GET_LIVING_SHARE_INFO = "/cgi-bin/living/get_living_share_info";
+ /**
+ * The constant GET_USER_ALL_LIVINGID.
+ */
String GET_USER_ALL_LIVINGID = "/cgi-bin/living/get_user_all_livingid";
+ /**
+ * The constant CREATE.
+ */
String CREATE = "/cgi-bin/living/create";
+ /**
+ * The constant MODIFY.
+ */
String MODIFY = "/cgi-bin/living/modify";
+ /**
+ * The constant CANCEL.
+ */
String CANCEL = "/cgi-bin/living/cancel";
+ /**
+ * The constant DELETE_REPLAY_DATA.
+ */
String DELETE_REPLAY_DATA = "/cgi-bin/living/delete_replay_data";
}
+ /**
+ * The interface Msg audit.
+ */
interface MsgAudit {
+ /**
+ * The constant GET_PERMIT_USER_LIST.
+ */
String GET_PERMIT_USER_LIST = "/cgi-bin/msgaudit/get_permit_user_list";
+ /**
+ * The constant GET_GROUP_CHAT.
+ */
String GET_GROUP_CHAT = "/cgi-bin/msgaudit/groupchat/get";
+ /**
+ * The constant CHECK_SINGLE_AGREE.
+ */
String CHECK_SINGLE_AGREE = "/cgi-bin/msgaudit/check_single_agree";
}
+ /**
+ * The interface Tag.
+ */
interface Tag {
+ /**
+ * The constant TAG_CREATE.
+ */
String TAG_CREATE = "/cgi-bin/tag/create";
+ /**
+ * The constant TAG_UPDATE.
+ */
String TAG_UPDATE = "/cgi-bin/tag/update";
+ /**
+ * The constant TAG_DELETE.
+ */
String TAG_DELETE = "/cgi-bin/tag/delete?tagid=%s";
+ /**
+ * The constant TAG_LIST.
+ */
String TAG_LIST = "/cgi-bin/tag/list";
+ /**
+ * The constant TAG_GET.
+ */
String TAG_GET = "/cgi-bin/tag/get?tagid=%s";
+ /**
+ * The constant TAG_ADD_TAG_USERS.
+ */
String TAG_ADD_TAG_USERS = "/cgi-bin/tag/addtagusers";
+ /**
+ * The constant TAG_DEL_TAG_USERS.
+ */
String TAG_DEL_TAG_USERS = "/cgi-bin/tag/deltagusers";
}
+ /**
+ * The interface Task card.
+ */
interface TaskCard {
+ /**
+ * The constant UPDATE_TASK_CARD.
+ */
String UPDATE_TASK_CARD = "/cgi-bin/message/update_taskcard";
+ /**
+ * The constant UPDATE_TEMPLATE_CARD.
+ */
String UPDATE_TEMPLATE_CARD = "/cgi-bin/message/update_template_card";
}
+ /**
+ * The interface Tp.
+ */
interface Tp {
+ /**
+ * The constant JSCODE_TO_SESSION.
+ */
String JSCODE_TO_SESSION = "/cgi-bin/service/miniprogram/jscode2session";
+ /**
+ * The constant GET_CORP_TOKEN.
+ */
String GET_CORP_TOKEN = "/cgi-bin/service/get_corp_token";
+ /**
+ * The constant GET_PERMANENT_CODE.
+ */
String GET_PERMANENT_CODE = "/cgi-bin/service/get_permanent_code";
+ /**
+ * The constant GET_SUITE_TOKEN.
+ */
String GET_SUITE_TOKEN = "/cgi-bin/service/get_suite_token";
+ /**
+ * The constant GET_PROVIDER_TOKEN.
+ */
String GET_PROVIDER_TOKEN = "/cgi-bin/service/get_provider_token";
+ /**
+ * The constant GET_PREAUTH_CODE.
+ */
String GET_PREAUTH_CODE = "/cgi-bin/service/get_pre_auth_code";
+ /**
+ * The constant GET_AUTH_INFO.
+ */
String GET_AUTH_INFO = "/cgi-bin/service/get_auth_info";
+ /**
+ * The constant GET_AUTH_CORP_JSAPI_TICKET.
+ */
String GET_AUTH_CORP_JSAPI_TICKET = "/cgi-bin/get_jsapi_ticket";
+ /**
+ * The constant GET_SUITE_JSAPI_TICKET.
+ */
String GET_SUITE_JSAPI_TICKET = "/cgi-bin/ticket/get";
+ /**
+ * The constant GET_USERINFO3RD.
+ */
String GET_USERINFO3RD = "/cgi-bin/service/getuserinfo3rd";
+ /**
+ * The constant GET_USERDETAIL3RD.
+ */
String GET_USERDETAIL3RD = "/cgi-bin/service/getuserdetail3rd";
+ /**
+ * The constant GET_LOGIN_INFO.
+ */
String GET_LOGIN_INFO = "/cgi-bin/service/get_login_info";
+ /**
+ * The constant CONTACT_SEARCH.
+ */
String CONTACT_SEARCH = "/cgi-bin/service/contact/search";
+ /**
+ * The constant GET_ADMIN_LIST.
+ */
String GET_ADMIN_LIST = "/cgi-bin/service/get_admin_list";
- // 获取订单详情
+ /**
+ * The constant GET_ORDER.
+ */
+// 获取订单详情
String GET_ORDER = "/cgi-bin/service/get_order";
- // 获取订单列表
+ /**
+ * The constant GET_ORDER_LIST.
+ */
+// 获取订单列表
String GET_ORDER_LIST = "/cgi-bin/service/get_order_list";
- // 延长试用期
+ /**
+ * The constant PROLONG_TRY.
+ */
+// 延长试用期
String PROLONG_TRY = "/cgi-bin/service/prolong_try";
}
+ /**
+ * The interface License.
+ */
interface License {
+ /**
+ * The constant CREATE_NEW_ORDER.
+ */
String CREATE_NEW_ORDER = "/cgi-bin/license/create_new_order";
+ /**
+ * The constant CREATE_RENEW_ORDER_JOB.
+ */
String CREATE_RENEW_ORDER_JOB = "/cgi-bin/license/create_renew_order_job";
+ /**
+ * The constant SUBMIT_ORDER_JOB.
+ */
String SUBMIT_ORDER_JOB = "/cgi-bin/license/submit_order_job";
+ /**
+ * The constant LIST_ORDER.
+ */
String LIST_ORDER = "/cgi-bin/license/list_order";
+ /**
+ * The constant GET_ORDER.
+ */
String GET_ORDER = "/cgi-bin/license/get_order";
+ /**
+ * The constant LIST_ORDER_ACCOUNT.
+ */
String LIST_ORDER_ACCOUNT = "/cgi-bin/license/list_order_account";
+ /**
+ * The constant ACTIVE_ACCOUNT.
+ */
String ACTIVE_ACCOUNT = "/cgi-bin/license/active_account";
+ /**
+ * The constant BATCH_ACTIVE_ACCOUNT.
+ */
String BATCH_ACTIVE_ACCOUNT = "/cgi-bin/license/batch_active_account";
+ /**
+ * The constant GET_ACTIVE_INFO_BY_CODE.
+ */
String GET_ACTIVE_INFO_BY_CODE = "/cgi-bin/license/get_active_info_by_code";
+ /**
+ * The constant BATCH_GET_ACTIVE_INFO_BY_CODE.
+ */
String BATCH_GET_ACTIVE_INFO_BY_CODE = "/cgi-bin/license/batch_get_active_info_by_code";
+ /**
+ * The constant LIST_ACTIVED_ACCOUNT.
+ */
String LIST_ACTIVED_ACCOUNT = "/cgi-bin/license/list_actived_account";
+ /**
+ * The constant GET_ACTIVE_INFO_BY_USER.
+ */
String GET_ACTIVE_INFO_BY_USER = "/cgi-bin/license/get_active_info_by_user";
+ /**
+ * The constant BATCH_TRANSFER_LICENSE.
+ */
String BATCH_TRANSFER_LICENSE = "/cgi-bin/license/batch_transfer_license";
}
+ /**
+ * The interface User.
+ */
interface User {
+ /**
+ * The constant USER_AUTHENTICATE.
+ */
String USER_AUTHENTICATE = "/cgi-bin/user/authsucc?userid=";
+ /**
+ * The constant USER_CREATE.
+ */
String USER_CREATE = "/cgi-bin/user/create";
+ /**
+ * The constant USER_UPDATE.
+ */
String USER_UPDATE = "/cgi-bin/user/update";
+ /**
+ * The constant USER_DELETE.
+ */
String USER_DELETE = "/cgi-bin/user/delete?userid=";
+ /**
+ * The constant USER_BATCH_DELETE.
+ */
String USER_BATCH_DELETE = "/cgi-bin/user/batchdelete";
+ /**
+ * The constant USER_GET.
+ */
String USER_GET = "/cgi-bin/user/get?userid=";
+ /**
+ * The constant USER_LIST.
+ */
String USER_LIST = "/cgi-bin/user/list?department_id=";
+ /**
+ * The constant USER_SIMPLE_LIST.
+ */
String USER_SIMPLE_LIST = "/cgi-bin/user/simplelist?department_id=";
+ /**
+ * The constant BATCH_INVITE.
+ */
String BATCH_INVITE = "/cgi-bin/batch/invite";
+ /**
+ * The constant USER_CONVERT_TO_OPENID.
+ */
String USER_CONVERT_TO_OPENID = "/cgi-bin/user/convert_to_openid";
+ /**
+ * The constant USER_CONVERT_TO_USERID.
+ */
String USER_CONVERT_TO_USERID = "/cgi-bin/user/convert_to_userid";
+ /**
+ * The constant GET_USER_ID.
+ */
String GET_USER_ID = "/cgi-bin/user/getuserid";
+ /**
+ * The constant GET_EXTERNAL_CONTACT.
+ */
String GET_EXTERNAL_CONTACT = "/cgi-bin/crm/get_external_contact?external_userid=";
+ /**
+ * The constant GET_JOIN_QR_CODE.
+ */
String GET_JOIN_QR_CODE = "/cgi-bin/corp/get_join_qrcode?size_type=";
+ /**
+ * The constant GET_ACTIVE_STAT.
+ */
String GET_ACTIVE_STAT = "/cgi-bin/user/get_active_stat";
+ /**
+ * The constant USERID_TO_OPEN_USERID.
+ */
String USERID_TO_OPEN_USERID = "/cgi-bin/batch/userid_to_openuserid";
+ /**
+ * The constant USER_LIST_ID.
+ */
String USER_LIST_ID = "/cgi-bin/user/list_id";
}
+ /**
+ * The interface External contact.
+ */
interface ExternalContact {
+ /**
+ * The constant GET_EXTERNAL_CONTACT.
+ */
@Deprecated
String GET_EXTERNAL_CONTACT = "/cgi-bin/crm/get_external_contact?external_userid=";
+ /**
+ * The constant ADD_CONTACT_WAY.
+ */
String ADD_CONTACT_WAY = "/cgi-bin/externalcontact/add_contact_way";
+ /**
+ * The constant GET_CONTACT_WAY.
+ */
String GET_CONTACT_WAY = "/cgi-bin/externalcontact/get_contact_way";
+ /**
+ * The constant UPDATE_CONTACT_WAY.
+ */
String UPDATE_CONTACT_WAY = "/cgi-bin/externalcontact/update_contact_way";
+ /**
+ * The constant DEL_CONTACT_WAY.
+ */
String DEL_CONTACT_WAY = "/cgi-bin/externalcontact/del_contact_way";
+ /**
+ * The constant CLOSE_TEMP_CHAT.
+ */
String CLOSE_TEMP_CHAT = "/cgi-bin/externalcontact/close_temp_chat";
+ /**
+ * The constant GET_FOLLOW_USER_LIST.
+ */
String GET_FOLLOW_USER_LIST = "/cgi-bin/externalcontact/get_follow_user_list";
+ /**
+ * The constant GET_CONTACT_DETAIL.
+ */
String GET_CONTACT_DETAIL = "/cgi-bin/externalcontact/get?external_userid=";
+ /**
+ * The constant CONVERT_TO_OPENID.
+ */
String CONVERT_TO_OPENID = "/cgi-bin/externalcontact/convert_to_openid";
+ /**
+ * The constant UNIONID_TO_EXTERNAL_USERID.
+ */
String UNIONID_TO_EXTERNAL_USERID = "/cgi-bin/externalcontact/unionid_to_external_userid";
+ /**
+ * The constant UNIONID_TO_EXTERNAL_USERID_3RD.
+ */
String UNIONID_TO_EXTERNAL_USERID_3RD = "/cgi-bin/service/externalcontact/unionid_to_external_userid_3rd";
+ /**
+ * The constant GET_NEW_EXTERNAL_USERID.
+ */
String GET_NEW_EXTERNAL_USERID = "/cgi-bin/service/externalcontact/get_new_external_userid";
+ /**
+ * The constant TO_SERVICE_EXTERNAL_USERID.
+ */
String TO_SERVICE_EXTERNAL_USERID = "/cgi-bin/externalcontact/to_service_external_userid";
+ /**
+ * The constant FINISH_EXTERNAL_USERID_MIGRATION.
+ */
String FINISH_EXTERNAL_USERID_MIGRATION = "/cgi-bin/externalcontact/finish_external_userid_migration";
+ /**
+ * The constant GET_CONTACT_DETAIL_BATCH.
+ */
String GET_CONTACT_DETAIL_BATCH = "/cgi-bin/externalcontact/batch/get_by_user?";
+ /**
+ * The constant UPDATE_REMARK.
+ */
String UPDATE_REMARK = "/cgi-bin/externalcontact/remark";
+ /**
+ * The constant LIST_EXTERNAL_CONTACT.
+ */
String LIST_EXTERNAL_CONTACT = "/cgi-bin/externalcontact/list?userid=";
+ /**
+ * The constant LIST_UNASSIGNED_CONTACT.
+ */
String LIST_UNASSIGNED_CONTACT = "/cgi-bin/externalcontact/get_unassigned_list";
+ /**
+ * The constant TRANSFER_UNASSIGNED_CONTACT.
+ */
@Deprecated
String TRANSFER_UNASSIGNED_CONTACT = "/cgi-bin/externalcontact/transfer";
+ /**
+ * The constant TRANSFER_CUSTOMER.
+ */
String TRANSFER_CUSTOMER = "/cgi-bin/externalcontact/transfer_customer";
+ /**
+ * The constant TRANSFER_RESULT.
+ */
String TRANSFER_RESULT = "/cgi-bin/externalcontact/transfer_result";
+ /**
+ * The constant RESIGNED_TRANSFER_CUSTOMER.
+ */
String RESIGNED_TRANSFER_CUSTOMER = "/cgi-bin/externalcontact/resigned/transfer_customer";
+ /**
+ * The constant RESIGNED_TRANSFER_RESULT.
+ */
String RESIGNED_TRANSFER_RESULT = "/cgi-bin/externalcontact/resigned/transfer_result";
+ /**
+ * The constant GROUP_CHAT_LIST.
+ */
String GROUP_CHAT_LIST = "/cgi-bin/externalcontact/groupchat/list";
+ /**
+ * The constant GROUP_CHAT_INFO.
+ */
String GROUP_CHAT_INFO = "/cgi-bin/externalcontact/groupchat/get";
- String OPENID_TO_CHATID= "/cgi-bin/externalcontact/opengid_to_chatid";
+ /**
+ * The constant OPENID_TO_CHATID.
+ */
+ String OPENID_TO_CHATID = "/cgi-bin/externalcontact/opengid_to_chatid";
+ /**
+ * The constant GROUP_CHAT_TRANSFER.
+ */
String GROUP_CHAT_TRANSFER = "/cgi-bin/externalcontact/groupchat/transfer";
+ /**
+ * The constant LIST_USER_BEHAVIOR_DATA.
+ */
String LIST_USER_BEHAVIOR_DATA = "/cgi-bin/externalcontact/get_user_behavior_data";
+ /**
+ * The constant LIST_GROUP_CHAT_DATA.
+ */
String LIST_GROUP_CHAT_DATA = "/cgi-bin/externalcontact/groupchat/statistic";
+ /**
+ * The constant ADD_JOIN_WAY.
+ */
String ADD_JOIN_WAY = "/cgi-bin/externalcontact/groupchat/add_join_way";
+ /**
+ * The constant GET_JOIN_WAY.
+ */
String GET_JOIN_WAY = "/cgi-bin/externalcontact/groupchat/get_join_way";
+ /**
+ * The constant UPDATE_JOIN_WAY.
+ */
String UPDATE_JOIN_WAY = "/cgi-bin/externalcontact/groupchat/update_join_way";
+ /**
+ * The constant DEL_JOIN_WAY.
+ */
String DEL_JOIN_WAY = "/cgi-bin/externalcontact/groupchat/del_join_way";
+ /**
+ * The constant ADD_MSG_TEMPLATE.
+ */
String ADD_MSG_TEMPLATE = "/cgi-bin/externalcontact/add_msg_template";
+ /**
+ * The constant SEND_WELCOME_MSG.
+ */
String SEND_WELCOME_MSG = "/cgi-bin/externalcontact/send_welcome_msg";
+ /**
+ * The constant GET_CORP_TAG_LIST.
+ */
String GET_CORP_TAG_LIST = "/cgi-bin/externalcontact/get_corp_tag_list";
+ /**
+ * The constant ADD_CORP_TAG.
+ */
String ADD_CORP_TAG = "/cgi-bin/externalcontact/add_corp_tag";
+ /**
+ * The constant EDIT_CORP_TAG.
+ */
String EDIT_CORP_TAG = "/cgi-bin/externalcontact/edit_corp_tag";
+ /**
+ * The constant DEL_CORP_TAG.
+ */
String DEL_CORP_TAG = "/cgi-bin/externalcontact/del_corp_tag";
+ /**
+ * The constant MARK_TAG.
+ */
String MARK_TAG = "/cgi-bin/externalcontact/mark_tag";
+ /**
+ * The constant ADD_MOMENT_TASK.
+ */
String ADD_MOMENT_TASK = "/cgi-bin/externalcontact/add_moment_task";
+ /**
+ * The constant GET_MOMENT_TASK_RESULT.
+ */
String GET_MOMENT_TASK_RESULT = "/cgi-bin/externalcontact/get_moment_task_result";
+ /**
+ * The constant GET_MOMENT_LIST.
+ */
String GET_MOMENT_LIST = "/cgi-bin/externalcontact/get_moment_list";
+ /**
+ * The constant GET_MOMENT_TASK.
+ */
String GET_MOMENT_TASK = "/cgi-bin/externalcontact/get_moment_task";
+ /**
+ * The constant GET_MOMENT_CUSTOMER_LIST.
+ */
String GET_MOMENT_CUSTOMER_LIST = "/cgi-bin/externalcontact/get_moment_customer_list";
+ /**
+ * The constant GET_MOMENT_SEND_RESULT.
+ */
String GET_MOMENT_SEND_RESULT = "/cgi-bin/externalcontact/get_moment_send_result";
+ /**
+ * The constant GET_MOMENT_COMMENTS.
+ */
String GET_MOMENT_COMMENTS = "/cgi-bin/externalcontact/get_moment_comments";
+ /**
+ * The constant GET_GROUP_MSG_SEND_RESULT.
+ */
String GET_GROUP_MSG_SEND_RESULT = "/cgi-bin/externalcontact/get_groupmsg_send_result";
+ /**
+ * The constant GET_GROUP_MSG_TASK.
+ */
String GET_GROUP_MSG_TASK = "/cgi-bin/externalcontact/get_groupmsg_task";
+ /**
+ * The constant GET_GROUP_MSG_LIST_V2.
+ */
String GET_GROUP_MSG_LIST_V2 = "/cgi-bin/externalcontact/get_groupmsg_list_v2";
+ /**
+ * The constant GET_GROUP_MSG_RESULT.
+ */
String GET_GROUP_MSG_RESULT = "/cgi-bin/externalcontact/get_group_msg_result";
+ /**
+ * The constant GET_PRODUCT_ALBUM.
+ */
String GET_PRODUCT_ALBUM = "/cgi-bin/externalcontact/get_product_album";
+ /**
+ * The constant GET_PRODUCT_ALBUM_LIST.
+ */
String GET_PRODUCT_ALBUM_LIST = "/cgi-bin/externalcontact/get_product_album_list";
+ /**
+ * The constant ADD_PRODUCT_ALBUM.
+ */
String ADD_PRODUCT_ALBUM = "/cgi-bin/externalcontact/add_product_album";
+ /**
+ * The constant UPDATE_PRODUCT_ALBUM.
+ */
String UPDATE_PRODUCT_ALBUM = "/cgi-bin/externalcontact/update_product_album";
+ /**
+ * The constant DELETE_PRODUCT_ALBUM.
+ */
String DELETE_PRODUCT_ALBUM = "/cgi-bin/externalcontact/delete_product_album";
+ /**
+ * The constant GROUP_WELCOME_TEMPLATE_ADD.
+ */
String GROUP_WELCOME_TEMPLATE_ADD = "/cgi-bin/externalcontact/group_welcome_template/add";
+ /**
+ * The constant GROUP_WELCOME_TEMPLATE_EDIT.
+ */
String GROUP_WELCOME_TEMPLATE_EDIT = "/cgi-bin/externalcontact/group_welcome_template/edit";
+ /**
+ * The constant GROUP_WELCOME_TEMPLATE_GET.
+ */
String GROUP_WELCOME_TEMPLATE_GET = "/cgi-bin/externalcontact/group_welcome_template/get";
+ /**
+ * The constant GROUP_WELCOME_TEMPLATE_DEL.
+ */
String GROUP_WELCOME_TEMPLATE_DEL = "/cgi-bin/externalcontact/group_welcome_template/del";
+ /**
+ * The constant UPLOAD_ATTACHMENT.
+ */
String UPLOAD_ATTACHMENT = "/cgi-bin/media/upload_attachment";
+ /**
+ * The constant GET_SUBSCRIBE_QR_CODE.
+ */
String GET_SUBSCRIBE_QR_CODE = "/cgi-bin/externalcontact/get_subscribe_qr_code";
+ /**
+ * The constant SET_SUBSCRIBE_MODE.
+ */
String SET_SUBSCRIBE_MODE = "/cgi-bin/externalcontact/set_subscribe_mode";
+ /**
+ * The constant GET_SUBSCRIBE_MODE.
+ */
String GET_SUBSCRIBE_MODE = "/cgi-bin/externalcontact/get_subscribe_mode";
+ /**
+ * The constant EXTERNAL_CONTACT_GET.
+ */
String EXTERNAL_CONTACT_GET = "/cgi-bin/externalcontact/get?external_userid=";
+ /**
+ * The constant ADD_INTERCEPT_RULE.
+ */
String ADD_INTERCEPT_RULE = "/cgi-bin/externalcontact/add_intercept_rule";
+ /**
+ * The constant UPDATE_INTERCEPT_RULE.
+ */
String UPDATE_INTERCEPT_RULE = "/cgi-bin/externalcontact/update_intercept_rule";
+ /**
+ * The constant DEL_INTERCEPT_RULE.
+ */
String DEL_INTERCEPT_RULE = "/cgi-bin/externalcontact/del_intercept_rule";
}
+ /**
+ * The interface Kf.
+ */
interface Kf {
+ /**
+ * The constant ACCOUNT_ADD.
+ */
String ACCOUNT_ADD = "/cgi-bin/kf/account/add";
+ /**
+ * The constant ACCOUNT_UPD.
+ */
String ACCOUNT_UPD = "/cgi-bin/kf/account/update";
+ /**
+ * The constant ACCOUNT_DEL.
+ */
String ACCOUNT_DEL = "/cgi-bin/kf/account/del";
+ /**
+ * The constant ACCOUNT_LIST.
+ */
String ACCOUNT_LIST = "/cgi-bin/kf/account/list";
+ /**
+ * The constant ADD_CONTACT_WAY.
+ */
String ADD_CONTACT_WAY = "/cgi-bin/kf/add_contact_way";
+ /**
+ * The constant SERVICER_ADD.
+ */
String SERVICER_ADD = "/cgi-bin/kf/servicer/add";
+ /**
+ * The constant SERVICER_DEL.
+ */
String SERVICER_DEL = "/cgi-bin/kf/servicer/del";
+ /**
+ * The constant SERVICER_LIST.
+ */
String SERVICER_LIST = "/cgi-bin/kf/servicer/list?open_kfid=";
+ /**
+ * The constant SERVICE_STATE_GET.
+ */
String SERVICE_STATE_GET = "/cgi-bin/kf/service_state/get";
+ /**
+ * The constant SERVICE_STATE_TRANS.
+ */
String SERVICE_STATE_TRANS = "/cgi-bin/kf/service_state/trans";
+ /**
+ * The constant SYNC_MSG.
+ */
String SYNC_MSG = "/cgi-bin/kf/sync_msg";
+ /**
+ * The constant SEND_MSG.
+ */
String SEND_MSG = "/cgi-bin/kf/send_msg";
+ /**
+ * The constant SEND_MSG_ON_EVENT.
+ */
String SEND_MSG_ON_EVENT = "/cgi-bin/kf/send_msg_on_event";
+ /**
+ * The constant CUSTOMER_BATCH_GET.
+ */
String CUSTOMER_BATCH_GET = "/cgi-bin/kf/customer/batchget";
+ /**
+ * The constant GET_CORP_STATISTIC.
+ */
String GET_CORP_STATISTIC = "/cgi-bin/kf/get_corp_statistic";
+ /**
+ * The constant CUSTOMER_GET_UPGRADE_SERVICE_CONFIG.
+ */
String CUSTOMER_GET_UPGRADE_SERVICE_CONFIG = "/cgi-bin/kf/customer/get_upgrade_service_config";
+ /**
+ * The constant CUSTOMER_UPGRADE_SERVICE.
+ */
String CUSTOMER_UPGRADE_SERVICE = "/cgi-bin/kf/customer/upgrade_service";
+ /**
+ * The constant CUSTOMER_CANCEL_UPGRADE_SERVICE.
+ */
String CUSTOMER_CANCEL_UPGRADE_SERVICE = "/cgi-bin/kf/customer/cancel_upgrade_service";
}
+ /**
+ * The interface Export.
+ */
interface Export {
+ /**
+ * The constant SIMPLE_USER.
+ */
String SIMPLE_USER = "/cgi-bin/export/simple_user";
+ /**
+ * The constant USER.
+ */
String USER = "/cgi-bin/export/user";
+ /**
+ * The constant DEPARTMENT.
+ */
String DEPARTMENT = "/cgi-bin/export/department";
+ /**
+ * The constant TAG_USER.
+ */
String TAG_USER = "/cgi-bin/export/taguser";
+ /**
+ * The constant GET_RESULT.
+ */
String GET_RESULT = "/cgi-bin/export/get_result?jobid=%s";
}
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
index 8d8f09271..b3feb7e4f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
@@ -168,6 +168,9 @@ public class WxCpConsts {
@UtilityClass
public static class MsgAuditChangeType {
+ /**
+ * The constant MSG_AUDIT_APPROVED.
+ */
public static final String MSG_AUDIT_APPROVED = "msg_audit_approved";
}
@@ -183,7 +186,13 @@ public class WxCpConsts {
* https://developer.work.weixin.qq.com/document/path/92052
*/
public static final String CREATE_DEPARTMENT = "create_department";
+ /**
+ * The constant UPDATE_DEPARTMENT.
+ */
public static final String UPDATE_DEPARTMENT = "update_department";
+ /**
+ * The constant DELETE_DEPARTMENT.
+ */
public static final String DELETE_DEPARTMENT = "delete_department";
/**
@@ -191,12 +200,33 @@ public class WxCpConsts {
* https://developer.work.weixin.qq.com/document/path/92032
*/
public static final String CREATE_STUDENT = "create_student";
+ /**
+ * The constant UPDATE_STUDENT.
+ */
public static final String UPDATE_STUDENT = "update_student";
+ /**
+ * The constant DELETE_STUDENT.
+ */
public static final String DELETE_STUDENT = "delete_student";
+ /**
+ * The constant CREATE_PARENT.
+ */
public static final String CREATE_PARENT = "create_parent";
+ /**
+ * The constant UPDATE_PARENT.
+ */
public static final String UPDATE_PARENT = "update_parent";
+ /**
+ * The constant DELETE_PARENT.
+ */
public static final String DELETE_PARENT = "delete_parent";
+ /**
+ * The constant SUBSCRIBE.
+ */
public static final String SUBSCRIBE = "subscribe";
+ /**
+ * The constant UNSUBSCRIBE.
+ */
public static final String UNSUBSCRIBE = "unsubscribe";
}
@@ -232,6 +262,9 @@ public class WxCpConsts {
*/
public static final String TRANSFER_FAIL = "transfer_fail";
+ /**
+ * The type External contact transfer fail reason.
+ */
@UtilityClass
public static class ExternalContactTransferFailReason {
/**
@@ -245,6 +278,9 @@ public class WxCpConsts {
}
}
+ /**
+ * The type External chat change type.
+ */
@UtilityClass
public static class ExternalChatChangeType {
/**
@@ -260,6 +296,9 @@ public class WxCpConsts {
*/
public static final String DISMISS = "dismiss";
+ /**
+ * The type External chat update detail.
+ */
@UtilityClass
public static class ExternalChatUpdateDetail {
/**
@@ -285,6 +324,9 @@ public class WxCpConsts {
}
}
+ /**
+ * The type External tag change type.
+ */
@UtilityClass
public static class ExternalTagChangeType {
@@ -306,6 +348,9 @@ public class WxCpConsts {
public static final String SHUFFLE = "shuffle";
}
+ /**
+ * The type Tage type.
+ */
@UtilityClass
public static class TageType {
/**
@@ -481,26 +526,44 @@ public class WxCpConsts {
public static final String MARKDOWN = "markdown";
}
+ /**
+ * The type Work bench type.
+ */
@UtilityClass
public static class WorkBenchType {
+ /**
+ * The constant KEYDATA.
+ */
/*
* 关键数据型
* */
public static final String KEYDATA = "keydata";
+ /**
+ * The constant IMAGE.
+ */
/*
* 图片型
* */
public static final String IMAGE = "image";
+ /**
+ * The constant LIST.
+ */
/*
* 列表型
* */
public static final String LIST = "list";
+ /**
+ * The constant WEBVIEW.
+ */
/*
* webview型
* */
public static final String WEBVIEW = "webview";
}
+ /**
+ * The type Welcome msg type.
+ */
@UtilityClass
public static class WelcomeMsgType {
/**
@@ -526,6 +589,9 @@ public class WxCpConsts {
public static final String FILE = "file";
}
+ /**
+ * The type Product attachment type.
+ */
@UtilityClass
public static class ProductAttachmentType {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpTpConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpTpConsts.java
index e050c2115..77e9d31b6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpTpConsts.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpTpConsts.java
@@ -2,9 +2,15 @@ package me.chanjar.weixin.cp.constant;
import lombok.experimental.UtilityClass;
+/**
+ * The type Wx cp tp consts.
+ */
public class WxCpTpConsts {
+ /**
+ * The type Info type.
+ */
@UtilityClass
public static class InfoType {
/**
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouter.java
index c027159bc..8728c7c90 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouter.java
@@ -4,7 +4,6 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxErrorExceptionHandler;
import me.chanjar.weixin.common.api.WxMessageDuplicateChecker;
-import me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateChecker;
import me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateCheckerSingleton;
import me.chanjar.weixin.common.session.InternalSession;
import me.chanjar.weixin.common.session.InternalSessionManager;
@@ -66,6 +65,8 @@ public class WxCpMessageRouter {
/**
* 构造方法.
+ *
+ * @param wxCpService the wx cp service
*/
public WxCpMessageRouter(WxCpService wxCpService) {
this.wxCpService = wxCpService;
@@ -79,6 +80,9 @@ public class WxCpMessageRouter {
/**
* 使用自定义的 {@link ExecutorService}.
+ *
+ * @param wxMpService the wx mp service
+ * @param executorService the executor service
*/
public WxCpMessageRouter(WxCpService wxMpService, ExecutorService executorService) {
this.wxCpService = wxMpService;
@@ -97,6 +101,8 @@ public class WxCpMessageRouter {
/**
* 系统退出前,应该调用该方法,增加了超时时间检测
+ *
+ * @param second the second
*/
public void shutDownExecutorService(Integer second) {
this.executorService.shutdown();
@@ -117,6 +123,8 @@ public class WxCpMessageRouter {
* 设置自定义的 {@link ExecutorService}
* 如果不调用该方法,默认使用 Executors.newFixedThreadPool(100)
*
+ *
+ * @param executorService the executor service
*/
public void setExecutorService(ExecutorService executorService) {
this.executorService = executorService;
@@ -127,6 +135,8 @@ public class WxCpMessageRouter {
* 设置自定义的 {@link me.chanjar.weixin.common.api.WxMessageDuplicateChecker}
* 如果不调用该方法,默认使用 {@link me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateChecker}
*
+ *
+ * @param messageDuplicateChecker the message duplicate checker
*/
public void setMessageDuplicateChecker(WxMessageDuplicateChecker messageDuplicateChecker) {
this.messageDuplicateChecker = messageDuplicateChecker;
@@ -137,6 +147,8 @@ public class WxCpMessageRouter {
* 设置自定义的{@link me.chanjar.weixin.common.session.WxSessionManager}
* 如果不调用该方法,默认使用 {@link me.chanjar.weixin.common.session.StandardSessionManager}
*
+ *
+ * @param sessionManager the session manager
*/
public void setSessionManager(WxSessionManager sessionManager) {
this.sessionManager = sessionManager;
@@ -147,17 +159,26 @@ public class WxCpMessageRouter {
* 设置自定义的{@link me.chanjar.weixin.common.api.WxErrorExceptionHandler}
* 如果不调用该方法,默认使用 {@link me.chanjar.weixin.common.util.LogExceptionHandler}
*
+ *
+ * @param exceptionHandler the exception handler
*/
public void setExceptionHandler(WxErrorExceptionHandler exceptionHandler) {
this.exceptionHandler = exceptionHandler;
}
+ /**
+ * Gets rules.
+ *
+ * @return the rules
+ */
List getRules() {
return this.rules;
}
/**
* 开始一个新的Route规则.
+ *
+ * @return the wx cp message router rule
*/
public WxCpMessageRouterRule rule() {
return new WxCpMessageRouterRule(this);
@@ -165,6 +186,10 @@ public class WxCpMessageRouter {
/**
* 处理微信消息.
+ *
+ * @param wxMessage the wx message
+ * @param context the context
+ * @return the wx cp xml out message
*/
public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage, final Map context) {
if (isMsgDuplicated(wxMessage)) {
@@ -194,7 +219,8 @@ public class WxCpMessageRouter {
if (rule.isAsync()) {
futures.add(
this.executorService.submit(() -> {
- rule.service(wxMessage, context, WxCpMessageRouter.this.wxCpService, WxCpMessageRouter.this.sessionManager, WxCpMessageRouter.this.exceptionHandler);
+ rule.service(wxMessage, context, WxCpMessageRouter.this.wxCpService,
+ WxCpMessageRouter.this.sessionManager, WxCpMessageRouter.this.exceptionHandler);
})
);
} else {
@@ -227,6 +253,9 @@ public class WxCpMessageRouter {
/**
* 处理微信消息.
+ *
+ * @param wxMessage the wx message
+ * @return the wx cp xml out message
*/
public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {
return this.route(wxMessage, new HashMap<>(2));
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouterRule.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouterRule.java
index bbae22693..ba33392e6 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouterRule.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message/WxCpMessageRouterRule.java
@@ -183,7 +183,8 @@ public class WxCpMessageRouterRule {
* @param otherInterceptors the other interceptors
* @return the wx cp message router rule
*/
- public WxCpMessageRouterRule interceptor(WxCpMessageInterceptor interceptor, WxCpMessageInterceptor... otherInterceptors) {
+ public WxCpMessageRouterRule interceptor(WxCpMessageInterceptor interceptor,
+ WxCpMessageInterceptor... otherInterceptors) {
this.interceptors.add(interceptor);
if (otherInterceptors != null && otherInterceptors.length > 0) {
Collections.addAll(this.interceptors, otherInterceptors);
@@ -254,7 +255,8 @@ public class WxCpMessageRouterRule {
&&
(this.eventKey == null || this.eventKey.equalsIgnoreCase(wxMessage.getEventKey()))
&&
- (this.eventKeyRegex == null || Pattern.matches(this.eventKeyRegex, StringUtils.trimToEmpty(wxMessage.getEventKey())))
+ (this.eventKeyRegex == null || Pattern.matches(this.eventKeyRegex,
+ StringUtils.trimToEmpty(wxMessage.getEventKey())))
&&
(this.content == null || this.content.equals(StringUtils.trimToNull(wxMessage.getContent())))
&&
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageMatcher.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageMatcher.java
index 57e35f194..882e330b8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageMatcher.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageMatcher.java
@@ -1,7 +1,6 @@
package me.chanjar.weixin.cp.tp.message;
import me.chanjar.weixin.cp.bean.message.WxCpTpXmlMessage;
-import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
/**
* 消息匹配器,用在消息路由的时候
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouter.java
index 848f089c6..10422a760 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouter.java
@@ -68,6 +68,8 @@ public class WxCpTpMessageRouter {
/**
* 构造方法.
+ *
+ * @param wxCpTpService the wx cp tp service
*/
public WxCpTpMessageRouter(WxCpTpService wxCpTpService) {
this.wxCpTpService = wxCpTpService;
@@ -81,6 +83,9 @@ public class WxCpTpMessageRouter {
/**
* 使用自定义的 {@link ExecutorService}.
+ *
+ * @param wxCpTpService the wx cp tp service
+ * @param executorService the executor service
*/
public WxCpTpMessageRouter(WxCpTpService wxCpTpService, ExecutorService executorService) {
this.wxCpTpService = wxCpTpService;
@@ -99,6 +104,8 @@ public class WxCpTpMessageRouter {
/**
* 系统退出前,应该调用该方法,增加了超时时间检测
+ *
+ * @param second the second
*/
public void shutDownExecutorService(Integer second) {
this.executorService.shutdown();
@@ -119,6 +126,8 @@ public class WxCpTpMessageRouter {
* 设置自定义的 {@link ExecutorService}
* 如果不调用该方法,默认使用 Executors.newFixedThreadPool(100)
*
+ *
+ * @param executorService the executor service
*/
public void setExecutorService(ExecutorService executorService) {
this.executorService = executorService;
@@ -129,6 +138,8 @@ public class WxCpTpMessageRouter {
* 设置自定义的 {@link WxMessageDuplicateChecker}
* 如果不调用该方法,默认使用 {@link WxMessageInMemoryDuplicateChecker}
*
+ *
+ * @param messageDuplicateChecker the message duplicate checker
*/
public void setMessageDuplicateChecker(WxMessageDuplicateChecker messageDuplicateChecker) {
this.messageDuplicateChecker = messageDuplicateChecker;
@@ -139,6 +150,8 @@ public class WxCpTpMessageRouter {
* 设置自定义的{@link WxSessionManager}
* 如果不调用该方法,默认使用 {@link me.chanjar.weixin.common.session.StandardSessionManager}
*
+ *
+ * @param sessionManager the session manager
*/
public void setSessionManager(WxSessionManager sessionManager) {
this.sessionManager = sessionManager;
@@ -149,17 +162,26 @@ public class WxCpTpMessageRouter {
* 设置自定义的{@link WxErrorExceptionHandler}
* 如果不调用该方法,默认使用 {@link LogExceptionHandler}
*
+ *
+ * @param exceptionHandler the exception handler
*/
public void setExceptionHandler(WxErrorExceptionHandler exceptionHandler) {
this.exceptionHandler = exceptionHandler;
}
+ /**
+ * Gets rules.
+ *
+ * @return the rules
+ */
List getRules() {
return this.rules;
}
/**
* 开始一个新的Route规则.
+ *
+ * @return the wx cp tp message router rule
*/
public WxCpTpMessageRouterRule rule() {
return new WxCpTpMessageRouterRule(this);
@@ -167,6 +189,10 @@ public class WxCpTpMessageRouter {
/**
* 处理微信消息.
+ *
+ * @param wxMessage the wx message
+ * @param context the context
+ * @return the wx cp xml out message
*/
public WxCpXmlOutMessage route(final WxCpTpXmlMessage wxMessage, final Map context) {
if (isMsgDuplicated(wxMessage)) {
@@ -196,7 +222,8 @@ public class WxCpTpMessageRouter {
if (rule.isAsync()) {
futures.add(
this.executorService.submit(() -> {
- rule.service(wxMessage, context, WxCpTpMessageRouter.this.wxCpTpService, WxCpTpMessageRouter.this.sessionManager, WxCpTpMessageRouter.this.exceptionHandler);
+ rule.service(wxMessage, context, WxCpTpMessageRouter.this.wxCpTpService,
+ WxCpTpMessageRouter.this.sessionManager, WxCpTpMessageRouter.this.exceptionHandler);
})
);
} else {
@@ -229,6 +256,9 @@ public class WxCpTpMessageRouter {
/**
* 处理微信消息.
+ *
+ * @param wxMessage the wx message
+ * @return the wx cp xml out message
*/
public WxCpXmlOutMessage route(final WxCpTpXmlMessage wxMessage) {
return this.route(wxMessage, new HashMap<>(2));
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouterRule.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouterRule.java
index 243a17d1b..434094aa8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouterRule.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/message/WxCpTpMessageRouterRule.java
@@ -100,6 +100,7 @@ public class WxCpTpMessageRouterRule {
* 匹配 Message infoType
*
* @param infoType info
+ * @return the wx cp tp message router rule
*/
public WxCpTpMessageRouterRule infoType(String infoType) {
this.infoType = infoType;
@@ -108,8 +109,9 @@ public class WxCpTpMessageRouterRule {
/**
* 如果changeType等于这个type,符合rule的条件之一
- * @param changeType
- * @return
+ *
+ * @param changeType the change type
+ * @return wx cp tp message router rule
*/
public WxCpTpMessageRouterRule changeType(String changeType) {
this.changeType = changeType;
@@ -145,7 +147,8 @@ public class WxCpTpMessageRouterRule {
* @param otherInterceptors the other interceptors
* @return the wx cp message router rule
*/
- public WxCpTpMessageRouterRule interceptor(WxCpTpMessageInterceptor interceptor, WxCpTpMessageInterceptor... otherInterceptors) {
+ public WxCpTpMessageRouterRule interceptor(WxCpTpMessageInterceptor interceptor,
+ WxCpTpMessageInterceptor... otherInterceptors) {
this.interceptors.add(interceptor);
if (otherInterceptors != null && otherInterceptors.length > 0) {
Collections.addAll(this.interceptors, otherInterceptors);
@@ -220,7 +223,8 @@ public class WxCpTpMessageRouterRule {
&&
(this.suiteTicket == null || this.suiteTicket.equalsIgnoreCase(wxMessage.getSuiteTicket()))
&&
- (this.eventKeyRegex == null || Pattern.matches(this.eventKeyRegex, StringUtils.trimToEmpty(wxMessage.getEventKey())))
+ (this.eventKeyRegex == null || Pattern.matches(this.eventKeyRegex,
+ StringUtils.trimToEmpty(wxMessage.getEventKey())))
&&
(this.content == null || this.content.equals(StringUtils.trimToNull(wxMessage.getContent())))
&&
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpContactService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpContactService.java
index d25987c9d..7f4040085 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpContactService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpContactService.java
@@ -5,18 +5,21 @@ import me.chanjar.weixin.cp.bean.WxCpTpContactSearch;
import me.chanjar.weixin.cp.bean.WxCpTpContactSearchResp;
/**
+ * The interface Wx cp tp contact service.
+ *
* @author uianz
* @description
- * @since 2020/12/23 下午 02:39
+ * @since 2020 /12/23 下午 02:39
*/
public interface WxCpTpContactService {
- /**
- * https://work.weixin.qq.com/api/doc/90001/90143/91844
- * 通讯录单个搜索
- * @param wxCpTpContactSearch
- * @return
- * @throws WxErrorException
- */
- WxCpTpContactSearchResp contactSearch(WxCpTpContactSearch wxCpTpContactSearch) throws WxErrorException;
+ /**
+ * https://work.weixin.qq.com/api/doc/90001/90143/91844
+ * 通讯录单个搜索
+ *
+ * @param wxCpTpContactSearch the wx cp tp contact search
+ * @return wx cp tp contact search resp
+ * @throws WxErrorException the wx error exception
+ */
+ WxCpTpContactSearchResp contactSearch(WxCpTpContactSearch wxCpTpContactSearch) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpDepartmentService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpDepartmentService.java
index b7ede9ae2..8cbd17d6d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpDepartmentService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpDepartmentService.java
@@ -13,63 +13,65 @@ import java.util.List;
*/
public interface WxCpTpDepartmentService {
- /**
- *
- * 部门管理接口 - 创建部门.
- * 最多支持创建500个部门
- * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90205
- *
- *
- * @param depart 部门
- * @return 部门id
- * @throws WxErrorException 异常
- */
- Long create(WxCpTpDepart depart) throws WxErrorException;
+ /**
+ *
+ * 部门管理接口 - 创建部门.
+ * 最多支持创建500个部门
+ * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90205
+ *
+ *
+ * @param depart 部门
+ * @return 部门id long
+ * @throws WxErrorException 异常
+ */
+ Long create(WxCpTpDepart depart) throws WxErrorException;
- /**
- *
- * 部门管理接口 - 获取部门列表.
- * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
- *
- *
- * @param id 部门id。获取指定部门及其下的子部门。非必需,可为null
- * @return 获取的部门列表
- * @throws WxErrorException 异常
- */
- List list(Long id, String corpId) throws WxErrorException;
+ /**
+ *
+ * 部门管理接口 - 获取部门列表.
+ * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
+ *
+ *
+ * @param id 部门id。获取指定部门及其下的子部门。非必需,可为null
+ * @param corpId the corp id
+ * @return 获取的部门列表 list
+ * @throws WxErrorException 异常
+ */
+ List list(Long id, String corpId) throws WxErrorException;
- /**
- *
- * 部门管理接口 - 更新部门.
- * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90206
- * 如果id为0(未部门),1(黑名单),2(星标组),或者不存在的id,微信会返回系统繁忙的错误
- *
- *
- * @param group 要更新的group,group的id,name必须设置
- * @throws WxErrorException 异常
- */
- void update(WxCpTpDepart group) throws WxErrorException;
+ /**
+ *
+ * 部门管理接口 - 更新部门.
+ * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90206
+ * 如果id为0(未部门),1(黑名单),2(星标组),或者不存在的id,微信会返回系统繁忙的错误
+ *
+ *
+ * @param group 要更新的group,group的id,name必须设置
+ * @throws WxErrorException 异常
+ */
+ void update(WxCpTpDepart group) throws WxErrorException;
- /**
- *
- * 部门管理接口 - 删除部门.
- * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90207
- * 应用须拥有指定部门的管理权限
- *
- *
- * @param departId 部门id
- * @throws WxErrorException 异常
- */
- void delete(Long departId) throws WxErrorException;
+ /**
+ *
+ * 部门管理接口 - 删除部门.
+ * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90207
+ * 应用须拥有指定部门的管理权限
+ *
+ *
+ * @param departId 部门id
+ * @throws WxErrorException 异常
+ */
+ void delete(Long departId) throws WxErrorException;
- /**
- *
- * 部门管理接口 - 获取部门列表.
- * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
- *
- *
- * @return 获取所有的部门列表
- * @throws WxErrorException 异常
- */
- List list(String corpId) throws WxErrorException;
+ /**
+ *
+ * 部门管理接口 - 获取部门列表.
+ * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
+ *
+ *
+ * @param corpId the corp id
+ * @return 获取所有的部门列表 list
+ * @throws WxErrorException 异常
+ */
+ List list(String corpId) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpEditionService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpEditionService.java
index 8e6e9954f..2c2f11628 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpEditionService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpEditionService.java
@@ -7,8 +7,7 @@ import me.chanjar.weixin.cp.bean.WxCpTpProlongTryResult;
/**
* 应用版本付费版本相关接口
*
- * @author leiguoqing
- * created on 2022年4月24日
+ * @author leiguoqing created on 2022年4月24日
*/
public interface WxCpTpEditionService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpLicenseService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpLicenseService.java
index febe8e42e..66c5166d4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpLicenseService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpLicenseService.java
@@ -16,8 +16,8 @@ import java.util.List;
* 服务商接口调用许可相关接口
* 文档地址:https://developer.work.weixin.qq.com/document/path/95652
*
- * @author Totoro
- * created on 2022/6/27 10:57
+ *
+ * @author Totoro created on 2022/6/27 10:57
*/
public interface WxCpTpLicenseService {
@@ -27,9 +27,10 @@ public interface WxCpTpLicenseService {
* 服务商下单为企业购买新的帐号,可以同时购买基础帐号与互通帐号。
* 下单之后,需要到服务商管理端发起支付,支付完成之后,订单才能生效。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95644
+ *
* @param licenseNewOrderRequest 订单信息
- * @return 订单ID
- * @throws WxErrorException;
+ * @return 订单ID wx cp tp license create order resp
+ * @throws WxErrorException ;
*/
WxCpTpLicenseCreateOrderResp createNewOrder(WxCpTpLicenseNewOrderRequest licenseNewOrderRequest) throws WxErrorException;
@@ -41,22 +42,23 @@ public interface WxCpTpLicenseService {
* 传入userid列表创建一个任务,创建之后,可以往同一个任务继续追加待续期的userid列表;
* 根据步骤1得到的jobid提交订单。
*
+ *
* @param licenseRenewOrderJobRequest 续费订单信息
- * @return 返回JobId
- * @throws WxErrorException;
+ * @return 返回JobId wx cp tp license renew order job resp
+ * @throws WxErrorException ;
*/
WxCpTpLicenseRenewOrderJobResp createRenewOrderJob(WxCpTpLicenseRenewOrderJobRequest licenseRenewOrderJobRequest) throws WxErrorException;
-
/**
* 提交续期订单
* 创建续期任务之后,需要调用该接口,以提交订单任务。
* 注意,提交之后,需要到服务商管理端发起支付,支付完成之后,订单才能生效。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95646
+ *
* @param licenseRenewOrderRequest 订单信息
- * @return 订单ID
- * @throws WxErrorException;
+ * @return 订单ID wx cp tp license create order resp
+ * @throws WxErrorException ;
*/
WxCpTpLicenseCreateOrderResp submitRenewOrder(WxCpTpLicenseRenewOrderRequest licenseRenewOrderRequest) throws WxErrorException;
@@ -65,13 +67,14 @@ public interface WxCpTpLicenseService {
* 获取订单列表
* 服务商查询自己某段时间内的平台能力服务订单列表
* 文档地址:https://developer.work.weixin.qq.com/document/path/95647
- * @param corpId 企业ID
+ *
+ * @param corpId 企业ID
* @param startTime 开始时间,下单时间。可不填。但是不能单独指定该字段,start_time跟end_time必须同时指定。
- * @param endTime 结束时间,下单时间。起始时间跟结束时间不能超过31天。可不填。但是不能单独指定该字段,start_time跟end_time必须同时指定。
- * @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
- * @param limit 返回的最大记录数,整型,最大值1000,默认值500
- * @return 订单列表
- * @throws WxErrorException;
+ * @param endTime 结束时间,下单时间。起始时间跟结束时间不能超过31天。可不填。但是不能单独指定该字段,start_time跟end_time必须同时指定。
+ * @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
+ * @param limit 返回的最大记录数,整型,最大值1000,默认值500
+ * @return 订单列表 order list
+ * @throws WxErrorException ;
*/
WxCpTpLicenseOrderListResp getOrderList(String corpId, Date startTime, Date endTime, String cursor, int limit) throws WxErrorException;
@@ -80,9 +83,10 @@ public interface WxCpTpLicenseService {
* 获取订单详情
* 查询某个订单的详情,包括订单的状态、基础帐号个数、互通帐号个数、帐号购买时长等。
* 注意,该接口不返回订单中的帐号激活码列表或者续期的帐号成员列表,请调用获取订单中的帐号列表接口以获取帐号列表。
+ *
* @param orderId 订单ID
- * @return 单条订单信息
- * @throws WxErrorException;
+ * @return 单条订单信息 order info
+ * @throws WxErrorException ;
*/
WxCpTpLicenseOrderInfoResp getOrderInfo(String orderId) throws WxErrorException;
@@ -93,11 +97,12 @@ public interface WxCpTpLicenseService {
* 若为续期帐号的订单,则返回续期帐号的成员列表。注意,若是购买帐号的订单,
* 则仅订单支付完成时,系统才会生成帐号,故支付完成之前,该接口不会返回帐号激活码。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95649
+ *
* @param orderId 订单ID
- * @param limit 大小
- * @param cursor 分页游标
- * @return 订单账号列表
- * @throws WxErrorException;
+ * @param limit 大小
+ * @param cursor 分页游标
+ * @return 订单账号列表 order account list
+ * @throws WxErrorException ;
*/
WxCpTpLicenseOrderAccountListResp getOrderAccountList(String orderId, int limit, String cursor) throws WxErrorException;
@@ -107,11 +112,12 @@ public interface WxCpTpLicenseService {
* 下单购买帐号并支付完成之后,先调用获取订单中的帐号列表接口获取到帐号激活码,
* 然后可以调用该接口将激活码绑定到某个企业员工,以对其激活相应的平台服务能力。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95553
- * @param code 激活码
+ *
+ * @param code 激活码
* @param corpId 企业ID
* @param userId 用户ID
- * @return 激活结果
- * @throws WxErrorException;
+ * @return 激活结果 wx cp base resp
+ * @throws WxErrorException ;
*/
WxCpBaseResp activeCode(String code, String corpId, String userId) throws WxErrorException;
@@ -121,22 +127,25 @@ public interface WxCpTpLicenseService {
* 可在一次请求里为一个企业的多个成员激活许可帐号,便于服务商批量化处理。
* 一个userid允许激活一个基础帐号以及一个互通帐号。
* 单次激活的员工数量不超过1000
- * @param corpId 企业ID
+ *
+ * @param corpId 企业ID
* @param activeAccountList 激活列表
- * @return 激活结果
- * @throws WxErrorException;
+ * @return 激活结果 wx cp tp license batch active result resp
+ * @throws WxErrorException ;
*/
- WxCpTpLicenseBatchActiveResultResp batchActiveCode(String corpId, List activeAccountList) throws WxErrorException;
+ WxCpTpLicenseBatchActiveResultResp batchActiveCode(String corpId,
+ List activeAccountList) throws WxErrorException;
/**
* 获取激活码详情
* 查询某个帐号激活码的状态以及激活绑定情况。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95552
- * @param code 激活码
+ *
+ * @param code 激活码
* @param corpId 企业ID
- * @return 激活码信息
- * @throws WxErrorException;
+ * @return 激活码信息 active info by code
+ * @throws WxErrorException ;
*/
WxCpTpLicenseCodeInfoResp getActiveInfoByCode(String code, String corpId) throws WxErrorException;
@@ -145,10 +154,11 @@ public interface WxCpTpLicenseService {
* 获取激活码详情
* 查询某个帐号激活码的状态以及激活绑定情况。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95552
- * @param codes 激活码
+ *
+ * @param codes 激活码
* @param corpId 企业ID
- * @return 激活码信息
- * @throws WxErrorException;
+ * @return 激活码信息 wx cp tp license batch code info resp
+ * @throws WxErrorException ;
*/
WxCpTpLicenseBatchCodeInfoResp batchGetActiveInfoByCode(Collection codes, String corpId) throws WxErrorException;
@@ -157,11 +167,12 @@ public interface WxCpTpLicenseService {
* 获取企业的帐号列表
* 查询指定企业下的平台能力服务帐号列表。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95544
+ *
* @param corpId 企业ID
- * @param limit 大小
+ * @param limit 大小
* @param cursor 游标
- * @return 已激活列表
- * @throws WxErrorException
+ * @return 已激活列表 corp account list
+ * @throws WxErrorException the wx error exception
*/
WxCpTpLicenseCorpAccountListResp getCorpAccountList(String corpId, int limit, String cursor) throws WxErrorException;
@@ -170,10 +181,11 @@ public interface WxCpTpLicenseService {
* 获取成员的激活详情
* 查询某个企业成员的激活情况。
* 文档地址:https://developer.work.weixin.qq.com/document/path/95555
+ *
* @param corpId 企业ID
* @param userId 用户ID
- * @return 激活情况
- * @throws WxErrorException;
+ * @return 激活情况 active info by user
+ * @throws WxErrorException ;
*/
WxCpTpLicenseActiveInfoByUserResp getActiveInfoByUser(String corpId, String userId) throws WxErrorException;
@@ -181,32 +193,13 @@ public interface WxCpTpLicenseService {
/**
* 帐号继承
* 在企业员工离职或者工作范围的有变更时,允许将其许可帐号继承给其他员工。
- * @param corpId 企业ID
+ *
+ * @param corpId 企业ID
* @param transferList 转移列表
- * @return 转移结果
- * @throws WxErrorException;
+ * @return 转移结果 wx cp tp license batch transfer resp
+ * @throws WxErrorException ;
*/
WxCpTpLicenseBatchTransferResp batchTransferLicense(String corpId, List transferList) throws WxErrorException;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpMediaService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpMediaService.java
index f3a611e84..8aa58d3dc 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpMediaService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpMediaService.java
@@ -17,48 +17,54 @@ import java.io.InputStream;
*/
public interface WxCpTpMediaService {
- /**
- *
- * 上传多媒体文件.
- * 上传的多媒体文件有格式和大小限制,如下:
- * 图片(image): 1M,支持JPG格式
- * 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式
- * 视频(video):10MB,支持MP4格式
- * 缩略图(thumb):64KB,支持JPG格式
- * 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=上传下载多媒体文件
- *
- *
- * @param mediaType 媒体类型, 请看{@link me.chanjar.weixin.common.api.WxConsts}
- * @param fileType 文件类型,请看{@link me.chanjar.weixin.common.api.WxConsts}
- * @param inputStream 输入流,需要调用方控制关闭该输入流
- */
- WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream, String corpId)
- throws WxErrorException, IOException;
+ /**
+ *
+ * 上传多媒体文件.
+ * 上传的多媒体文件有格式和大小限制,如下:
+ * 图片(image): 1M,支持JPG格式
+ * 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式
+ * 视频(video):10MB,支持MP4格式
+ * 缩略图(thumb):64KB,支持JPG格式
+ * 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=上传下载多媒体文件
+ *
+ *
+ * @param mediaType 媒体类型, 请看{@link me.chanjar.weixin.common.api.WxConsts}
+ * @param fileType 文件类型,请看{@link me.chanjar.weixin.common.api.WxConsts}
+ * @param inputStream 输入流,需要调用方控制关闭该输入流
+ * @param corpId the corp id
+ * @return the wx media upload result
+ * @throws WxErrorException the wx error exception
+ * @throws IOException the io exception
+ */
+ WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream, String corpId)
+ throws WxErrorException, IOException;
- /**
- * 上传多媒体文件.
- *
- * @param mediaType 媒体类型
- * @param file 文件对象
- * @param corpId 授权企业的corpid
- * @see #upload(String, String, InputStream, String)
- * @throws WxErrorException 异常信息
- */
- WxMediaUploadResult upload(String mediaType, File file, String corpId) throws WxErrorException;
+ /**
+ * 上传多媒体文件.
+ *
+ * @param mediaType 媒体类型
+ * @param file 文件对象
+ * @param corpId 授权企业的corpid
+ * @return the wx media upload result
+ * @throws WxErrorException 异常信息
+ * @see #upload(String, String, InputStream, String) #upload(String, String, InputStream, String)
+ */
+ WxMediaUploadResult upload(String mediaType, File file, String corpId) throws WxErrorException;
- /**
- *
- * 上传图片.
- * 上传图片得到图片URL,该URL永久有效
- * 返回的图片URL,仅能用于图文消息(mpnews)正文中的图片展示;若用于非企业微信域名下的页面,图片将被屏蔽。
- * 每个企业每天最多可上传100张图片
- * 接口url格式:https://qyapi.weixin.qq.com/cgi-bin/media/uploadimg?access_token=ACCESS_TOKEN
- *
- * @param file 上传的文件对象
- * @param corpId 授权企业的corpid
- * @return 返回图片url
- * @throws WxErrorException 异常信息
- */
- String uploadImg(File file, String corpId) throws WxErrorException;
+ /**
+ *
+ * 上传图片.
+ * 上传图片得到图片URL,该URL永久有效
+ * 返回的图片URL,仅能用于图文消息(mpnews)正文中的图片展示;若用于非企业微信域名下的页面,图片将被屏蔽。
+ * 每个企业每天最多可上传100张图片
+ * 接口url格式:https://qyapi.weixin.qq.com/cgi-bin/media/uploadimg?access_token=ACCESS_TOKEN
+ *
+ *
+ * @param file 上传的文件对象
+ * @param corpId 授权企业的corpid
+ * @return 返回图片url string
+ * @throws WxErrorException 异常信息
+ */
+ String uploadImg(File file, String corpId) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOAService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOAService.java
index c18fe4c13..3ca9a6cdc 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOAService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOAService.java
@@ -9,52 +9,55 @@ import me.chanjar.weixin.cp.bean.oa.WxCpTemplateResult;
/**
* 企业微信OA相关接口.
*
- * @author Element
- * created on 2019-04-06 10:52
+ * @author Element created on 2019-04-06 10:52
*/
public interface WxCpTpOAService {
- /**
- * 提交审批申请
- * 调试工具
- * 企业可通过审批应用或自建应用Secret调用本接口,代应用可见范围内员工在企业微信“审批应用”内提交指定类型的审批申请。
- *
- * 请求方式:POST(HTTPS)
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/oa/applyevent?access_token=ACCESS_TOKEN
- * 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/91853
- *
- *
- * @param request 请求
- * @return 表单提交成功后,返回的表单编号
- * @throws WxErrorException .
- */
- String apply(WxCpOaApplyEventRequest request, String corpId) throws WxErrorException;
+ /**
+ * 提交审批申请
+ * 调试工具
+ * 企业可通过审批应用或自建应用Secret调用本接口,代应用可见范围内员工在企业微信“审批应用”内提交指定类型的审批申请。
+ *
+ * 请求方式:POST(HTTPS)
+ * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/oa/applyevent?access_token=ACCESS_TOKEN
+ * 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/91853
+ *
+ *
+ * @param request 请求
+ * @param corpId the corp id
+ * @return 表单提交成功后 ,返回的表单编号
+ * @throws WxErrorException .
+ */
+ String apply(WxCpOaApplyEventRequest request, String corpId) throws WxErrorException;
- /**
- * 获取审批模板详情
- *
- * @param templateId 模板ID
- * @return .
- * @throws WxErrorException .
- */
- WxCpTemplateResult getTemplateDetail(@NonNull String templateId, String corpId) throws WxErrorException;
+ /**
+ * 获取审批模板详情
+ *
+ * @param templateId 模板ID
+ * @param corpId the corp id
+ * @return . template detail
+ * @throws WxErrorException .
+ */
+ WxCpTemplateResult getTemplateDetail(@NonNull String templateId, String corpId) throws WxErrorException;
- /**
- * 复制/更新模板到企业
- *
- * @param openTemplateId 模板ID
- * @return .
- * @throws WxErrorException .
- */
- String copyTemplate(@NonNull String openTemplateId, String corpId) throws WxErrorException;
+ /**
+ * 复制/更新模板到企业
+ *
+ * @param openTemplateId 模板ID
+ * @param corpId the corp id
+ * @return . string
+ * @throws WxErrorException .
+ */
+ String copyTemplate(@NonNull String openTemplateId, String corpId) throws WxErrorException;
- /**
- *
- * 获取审批申请详情
- *
- * @param spNo 审批单编号。
- * @return WxCpApprovaldetail
- * @throws WxErrorException .
- */
- WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo, String corpId) throws WxErrorException;
+ /**
+ *
+ * 获取审批申请详情
+ *
+ * @param spNo 审批单编号。
+ * @param corpId the corp id
+ * @return WxCpApprovaldetail approval detail
+ * @throws WxErrorException .
+ */
+ WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo, String corpId) throws WxErrorException;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOrderService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOrderService.java
index b3700b3a1..3aff90bb5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOrderService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpOrderService.java
@@ -10,8 +10,7 @@ import java.util.Date;
/**
* 应用版本付费订单相关接口
*
- * @author leiguoqing
- * created on 2022年4月24日
+ * @author leiguoqing created on 2022年4月24日
*/
public interface WxCpTpOrderService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpService.java
index 8c7615d8d..838e5e43d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpService.java
@@ -36,6 +36,7 @@ public interface WxCpTpService {
* @return the suite access token
* @throws WxErrorException the wx error exception
* @see #getSuiteAccessToken(boolean) #getSuiteAccessToken(boolean)#getSuiteAccessToken(boolean)
+ * #getSuiteAccessToken(boolean)
*/
String getSuiteAccessToken() throws WxErrorException;
@@ -56,15 +57,18 @@ public interface WxCpTpService {
/**
* 获取suite_access_token和剩余过期时间, 不强制刷新suite_access_token
+ *
* @return suite access token and the remaining expiration time
+ * @throws WxErrorException the wx error exception
*/
WxAccessToken getSuiteAccessTokenEntity() throws WxErrorException;
/**
* 获取suite_access_token和剩余过期时间, 支持强制刷新suite_access_token
+ *
* @param forceRefresh 是否调用微信服务器强制刷新token
* @return suite access token and the remaining expiration time
- * @throws WxErrorException
+ * @throws WxErrorException the wx error exception
*/
WxAccessToken getSuiteAccessTokenEntity(boolean forceRefresh) throws WxErrorException;
@@ -73,7 +77,7 @@ public interface WxCpTpService {
*
* @return the suite ticket
* @throws WxErrorException the wx error exception
- * @see #getSuiteTicket(boolean) #getSuiteTicket(boolean)#getSuiteTicket(boolean)
+ * @see #getSuiteTicket(boolean) #getSuiteTicket(boolean)#getSuiteTicket(boolean)#getSuiteTicket(boolean)
*/
String getSuiteTicket() throws WxErrorException;
@@ -101,7 +105,7 @@ public interface WxCpTpService {
* @param forceRefresh 强制刷新
* @return the suite ticket
* @throws WxErrorException the wx error exception
- * @see #setSuiteTicket(String) #setSuiteTicket(String)
+ * @see #setSuiteTicket(String) #setSuiteTicket(String)#setSuiteTicket(String)
* @deprecated 由于无法主动刷新 ,所以这个接口实际已经没有意义,需要在接收企业微信的主动推送后,保存这个ticket
*/
@Deprecated
@@ -132,10 +136,11 @@ public interface WxCpTpService {
/**
* 获取应用的 jsapi ticket, 支持强制刷新
- * @param authCorpId
- * @param forceRefresh
- * @return
- * @throws WxErrorException
+ *
+ * @param authCorpId the auth corp id
+ * @param forceRefresh the force refresh
+ * @return suite js api ticket
+ * @throws WxErrorException the wx error exception
*/
String getSuiteJsApiTicket(String authCorpId, boolean forceRefresh) throws WxErrorException;
@@ -160,11 +165,12 @@ public interface WxCpTpService {
/**
* 获取企业凭证, 支持强制刷新
- * @param authCorpId
- * @param permanentCode
- * @param forceRefresh
- * @return
- * @throws WxErrorException
+ *
+ * @param authCorpId the auth corp id
+ * @param permanentCode the permanent code
+ * @param forceRefresh the force refresh
+ * @return corp token
+ * @throws WxErrorException the wx error exception
*/
WxAccessToken getCorpToken(String authCorpId, String permanentCode, boolean forceRefresh) throws WxErrorException;
@@ -208,9 +214,10 @@ public interface WxCpTpService {
*
* 获取预授权链接,测试环境下使用
*
+ *
* @param redirectUri 授权完成后的回调网址
- * @param state a-zA-Z0-9的参数值(不超过128个字节),用于第三方自行校验session,防止跨域攻击
- * @param authType 授权类型:0 正式授权, 1 测试授权。
+ * @param state a-zA-Z0-9的参数值(不超过128个字节),用于第三方自行校验session,防止跨域攻击
+ * @param authType 授权类型:0 正式授权, 1 测试授权。
* @return pre auth url
* @throws WxErrorException the wx error exception
* @link https ://work.weixin.qq.com/api/doc/90001/90143/90602
@@ -238,10 +245,11 @@ public interface WxCpTpService {
/**
* 获取授权企业的 jsapi ticket, 支持强制刷新
- * @param authCorpId
- * @param forceRefresh
- * @return
- * @throws WxErrorException
+ *
+ * @param authCorpId the auth corp id
+ * @param forceRefresh the force refresh
+ * @return auth corp js api ticket
+ * @throws WxErrorException the wx error exception
*/
String getAuthCorpJsApiTicket(String authCorpId, boolean forceRefresh) throws WxErrorException;
@@ -258,8 +266,8 @@ public interface WxCpTpService {
/**
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
*
- * @param url 接口地址
- * @param queryParam 请求参数
+ * @param url 接口地址
+ * @param queryParam 请求参数
* @param withoutSuiteAccessToken 请求是否忽略SuiteAccessToken 默认不忽略-false
* @return the string
* @throws WxErrorException the wx error exception
@@ -391,16 +399,18 @@ public interface WxCpTpService {
/**
* 获取服务商providerToken和剩余过期时间
- * @return
- * @throws WxErrorException
+ *
+ * @return wx cp provider token entity
+ * @throws WxErrorException the wx error exception
*/
WxCpProviderToken getWxCpProviderTokenEntity() throws WxErrorException;
/**
* 获取服务商providerToken和剩余过期时间,支持强制刷新
- * @param forceRefresh
- * @return
- * @throws WxErrorException
+ *
+ * @param forceRefresh the force refresh
+ * @return wx cp provider token entity
+ * @throws WxErrorException the wx error exception
*/
WxCpProviderToken getWxCpProviderTokenEntity(boolean forceRefresh) throws WxErrorException;
@@ -502,18 +512,22 @@ public interface WxCpTpService {
/**
* 创建机构级jsApiTicket签名
* 详情参见企业微信第三方应用开发文档:https://work.weixin.qq.com/api/doc/90001/90144/90539
- * @param url 调用JS接口页面的完整URL
- * @param authCorpId
- * @return
+ *
+ * @param url 调用JS接口页面的完整URL
+ * @param authCorpId the auth corp id
+ * @return wx jsapi signature
+ * @throws WxErrorException the wx error exception
*/
WxJsapiSignature createAuthCorpJsApiTicketSignature(String url, String authCorpId) throws WxErrorException;
/**
* 创建应用级jsapiTicket签名
* 详情参见企业微信第三方应用开发文档:https://work.weixin.qq.com/api/doc/90001/90144/90539
- * @param url 调用JS接口页面的完整URL
- * @param authCorpId
- * @return
+ *
+ * @param url 调用JS接口页面的完整URL
+ * @param authCorpId the auth corp id
+ * @return wx jsapi signature
+ * @throws WxErrorException the wx error exception
*/
WxJsapiSignature createSuiteJsApiTicketSignature(String url, String authCorpId) throws WxErrorException;
@@ -524,18 +538,21 @@ public interface WxCpTpService {
/**
* 使机构accessToken缓存失效
+ *
* @param authCorpId 机构id
*/
void expireAccessToken(String authCorpId);
/**
* 使机构jsapiticket缓存失效
+ *
* @param authCorpId 机构id
*/
void expireAuthCorpJsApiTicket(String authCorpId);
/**
* 使应用jsapiticket失效
+ *
* @param authCorpId 机构id
*/
void expireAuthSuiteJsApiTicket(String authCorpId);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpTagService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpTagService.java
index 25c5cf88b..b508df59a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpTagService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpTagService.java
@@ -13,7 +13,7 @@ import java.util.List;
*
*
* @author zhangq
- * @since 2021-02-14 16:02
+ * @since 2021 -02-14 16:02
*/
public interface WxCpTpTagService {
/**
@@ -25,8 +25,8 @@ public interface WxCpTpTagService {
*
* @param name 标签名称,长度限制为32个字以内(汉字或英文字母),标签名不可与其他标签重名。
* @param id 标签id,非负整型,指定此参数时新增的标签会生成对应的标签id,不指定时则以目前最大的id自增。
- * @return 标签id
- * @throws WxErrorException
+ * @return 标签id string
+ * @throws WxErrorException the wx error exception
*/
String create(String name, Integer id) throws WxErrorException;
@@ -49,9 +49,10 @@ public interface WxCpTpTagService {
/**
* 获取标签成员
- * @param tagId
- * @return
- * @throws WxErrorException
+ *
+ * @param tagId the tag id
+ * @return wx cp tp tag get result
+ * @throws WxErrorException the wx error exception
*/
WxCpTpTagGetResult get(String tagId) throws WxErrorException;
@@ -61,7 +62,7 @@ public interface WxCpTpTagService {
* @param tagId 标签id
* @param userIds 用户ID 列表
* @param partyIds 企业部门ID列表
- * @return .
+ * @return . wx cp tp tag add or remove users result
* @throws WxErrorException .
*/
WxCpTpTagAddOrRemoveUsersResult addUsers2Tag(String tagId, List userIds, List partyIds)
@@ -73,7 +74,7 @@ public interface WxCpTpTagService {
* @param tagId 标签id
* @param userIds 用户id列表
* @param partyIds 企业部门ID列表
- * @return .
+ * @return . wx cp tp tag add or remove users result
* @throws WxErrorException .
*/
WxCpTpTagAddOrRemoveUsersResult removeUsersFromTag(String tagId, List userIds, List partyIds)
@@ -82,7 +83,7 @@ public interface WxCpTpTagService {
/**
* 获得标签列表.
*
- * @return 标签列表
+ * @return 标签列表 list
* @throws WxErrorException .
*/
List listAll() throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpUserService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpUserService.java
index 55c04e3cf..dcda4bae4 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpUserService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpUserService.java
@@ -13,7 +13,6 @@ import java.util.Map;
* 用户管理接口
* Created by jamie on 2020/7/22.
*
- *
*/
public interface WxCpTpUserService {
@@ -24,6 +23,7 @@ public interface WxCpTpUserService {
*
*
* @param userId 用户id
+ * @throws WxErrorException the wx error exception
*/
void authenticate(String userId) throws WxErrorException;
@@ -37,8 +37,11 @@ public interface WxCpTpUserService {
* @param departId 必填。部门id
* @param fetchChild 非必填。1/0:是否递归获取子部门下面的成员
* @param status 非必填。0获取全部员工,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加
+ * @param corpId the corp id
+ * @return the list
+ * @throws WxErrorException the wx error exception
*/
- List listByDepartment(Long departId, Boolean fetchChild, Integer status,String corpId) throws WxErrorException;
+ List listByDepartment(Long departId, Boolean fetchChild, Integer status, String corpId) throws WxErrorException;
/**
*
@@ -50,6 +53,8 @@ public interface WxCpTpUserService {
* @param departId 必填。部门id
* @param fetchChild 非必填。1/0:是否递归获取子部门下面的成员
* @param status 非必填。0获取全部员工,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加
+ * @return the list
+ * @throws WxErrorException the wx error exception
*/
List listSimpleByDepartment(Long departId, Boolean fetchChild, Integer status) throws WxErrorException;
@@ -57,6 +62,7 @@ public interface WxCpTpUserService {
* 新建用户.
*
* @param user 用户对象
+ * @throws WxErrorException the wx error exception
*/
void create(WxCpUser user) throws WxErrorException;
@@ -64,6 +70,7 @@ public interface WxCpTpUserService {
* 更新用户.
*
* @param user 用户对象
+ * @throws WxErrorException the wx error exception
*/
void update(WxCpUser user) throws WxErrorException;
@@ -74,6 +81,7 @@ public interface WxCpTpUserService {
*
*
* @param userIds 员工UserID列表。对应管理端的帐号
+ * @throws WxErrorException the wx error exception
*/
void delete(String... userIds) throws WxErrorException;
@@ -81,8 +89,11 @@ public interface WxCpTpUserService {
* 获取用户.
*
* @param userid 用户id
+ * @param corpId the corp id
+ * @return the by id
+ * @throws WxErrorException the wx error exception
*/
- WxCpUser getById(String userid,String corpId) throws WxErrorException;
+ WxCpUser getById(String userid, String corpId) throws WxErrorException;
/**
*
@@ -96,6 +107,8 @@ public interface WxCpTpUserService {
* @param userIds 成员ID列表, 最多支持1000个。
* @param partyIds 部门ID列表,最多支持100个。
* @param tagIds 标签ID列表,最多支持100个。
+ * @return the wx cp invite result
+ * @throws WxErrorException the wx error exception
*/
WxCpInviteResult invite(List userIds, List partyIds, List tagIds) throws WxErrorException;
@@ -113,9 +126,9 @@ public interface WxCpTpUserService {
*
* @param userId 企业内的成员id
* @param agentId 非必填,整型,仅用于发红包。其它场景该参数不要填,如微信支付、企业转账、电子发票
- * @return map对象,可能包含以下值:
- * - openid 企业微信成员userid对应的openid,若有传参agentid,则是针对该agentid的openid。否则是针对企业微信corpid的openid
- * - appid 应用的appid,若请求包中不包含agentid则不返回appid。该appid在使用微信红包时会用到
+ * @return map对象 ,可能包含以下值: - openid 企业微信成员userid对应的openid,若有传参agentid,则是针对该agentid的openid。否则是针对企业微信corpid的openid -
+ * appid 应用的appid,若请求包中不包含agentid则不返回appid。该appid在使用微信红包时会用到
+ * @throws WxErrorException the wx error exception
*/
Map userId2Openid(String userId, Integer agentId) throws WxErrorException;
@@ -133,6 +146,7 @@ public interface WxCpTpUserService {
*
* @param openid 在使用微信支付、微信红包和企业转账之后,返回结果的openid
* @return userid 该openid在企业微信对应的成员userid
+ * @throws WxErrorException the wx error exception
*/
String openid2UserId(String openid) throws WxErrorException;
@@ -148,7 +162,7 @@ public interface WxCpTpUserService {
*
*
* @param mobile 手机号码。长度为5~32个字节
- * @return userid mobile对应的成员userid
+ * @return userid mobile对应的成员userid
* @throws WxErrorException .
*/
String getUserId(String mobile) throws WxErrorException;
@@ -163,7 +177,7 @@ public interface WxCpTpUserService {
*
*
* @param userId 外部联系人的userid
- * @return 联系人详情
+ * @return 联系人详情 external contact
* @throws WxErrorException .
*/
WxCpUserExternalContactInfo getExternalContact(String userId) throws WxErrorException;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java
index 768164096..e3e95a3e8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java
@@ -38,6 +38,8 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.*;
/**
* .
*
+ * @param the type parameter
+ * @param the type parameter
* @author zhenjun cai
*/
@Slf4j
@@ -73,11 +75,17 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
*/
protected final Object globalAuthCorpJsApiTicketRefreshLock = new Object();
+ /**
+ * The Global provider token refresh lock.
+ */
protected final Object globalProviderTokenRefreshLock = new Object();
+ /**
+ * The Config storage.
+ */
protected WxCpTpConfigStorage configStorage;
- private WxSessionManager sessionManager = new StandardSessionManager();
+ private final WxSessionManager sessionManager = new StandardSessionManager();
/**
* 临时文件目录.
@@ -313,11 +321,20 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
@Override
public String post(String url, String postData) throws WxErrorException {
- return execute(SimplePostRequestExecutor.create(this), url, postData,false);
+ return execute(SimplePostRequestExecutor.create(this), url, postData, false);
}
- public String post(String url, String postData,boolean withoutSuiteAccessToken) throws WxErrorException {
- return execute(SimplePostRequestExecutor.create(this), url, postData,withoutSuiteAccessToken);
+ /**
+ * Post string.
+ *
+ * @param url the url
+ * @param postData the post data
+ * @param withoutSuiteAccessToken the without suite access token
+ * @return the string
+ * @throws WxErrorException the wx error exception
+ */
+ public String post(String url, String postData, boolean withoutSuiteAccessToken) throws WxErrorException {
+ return execute(SimplePostRequestExecutor.create(this), url, postData, withoutSuiteAccessToken);
}
/**
@@ -325,13 +342,26 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
*/
@Override
public T execute(RequestExecutor executor, String uri, E data) throws WxErrorException {
- return execute(executor, uri, data,false);
+ return execute(executor, uri, data, false);
}
- public T execute(RequestExecutor executor, String uri, E data,boolean withoutSuiteAccessToken) throws WxErrorException {
+
+ /**
+ * Execute t.
+ *
+ * @param the type parameter
+ * @param the type parameter
+ * @param executor the executor
+ * @param uri the uri
+ * @param data the data
+ * @param withoutSuiteAccessToken the without suite access token
+ * @return the t
+ * @throws WxErrorException the wx error exception
+ */
+ public T execute(RequestExecutor executor, String uri, E data, boolean withoutSuiteAccessToken) throws WxErrorException {
int retryTimes = 0;
do {
try {
- return this.executeInternal(executor, uri, data,withoutSuiteAccessToken);
+ return this.executeInternal(executor, uri, data, withoutSuiteAccessToken);
} catch (WxErrorException e) {
if (retryTimes + 1 > this.maxRetryTimes) {
log.warn("重试达到最大次数【{}】", this.maxRetryTimes);
@@ -361,20 +391,45 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
throw new WxRuntimeException("微信服务端异常,超出重试次数");
}
+ /**
+ * Execute internal t.
+ *
+ * @param the type parameter
+ * @param the type parameter
+ * @param executor the executor
+ * @param uri the uri
+ * @param data the data
+ * @return the t
+ * @throws WxErrorException the wx error exception
+ */
protected T executeInternal(RequestExecutor executor, String uri, E data) throws WxErrorException {
- return executeInternal( executor, uri,data,false);
+ return executeInternal(executor, uri, data, false);
}
- protected T executeInternal(RequestExecutor executor, String uri, E data,boolean withoutSuiteAccessToken) throws WxErrorException {
+
+ /**
+ * Execute internal t.
+ *
+ * @param the type parameter
+ * @param the type parameter
+ * @param executor the executor
+ * @param uri the uri
+ * @param data the data
+ * @param withoutSuiteAccessToken the without suite access token
+ * @return the t
+ * @throws WxErrorException the wx error exception
+ */
+ protected T executeInternal(RequestExecutor executor, String uri, E data,
+ boolean withoutSuiteAccessToken) throws WxErrorException {
E dataForLog = DataUtils.handleDataWithSecret(data);
if (uri.contains("suite_access_token=")) {
throw new IllegalArgumentException("uri参数中不允许有suite_access_token: " + uri);
}
String uriWithAccessToken;
- if(!withoutSuiteAccessToken){
+ if (!withoutSuiteAccessToken) {
String suiteAccessToken = getSuiteAccessToken(false);
uriWithAccessToken = uri + (uri.contains("?") ? "&" : "?") + "suite_access_token=" + suiteAccessToken;
- }else{
+ } else {
uriWithAccessToken = uri;
}
@@ -426,10 +481,20 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
this.maxRetryTimes = maxRetryTimes;
}
+ /**
+ * Gets tmp dir file.
+ *
+ * @return the tmp dir file
+ */
public File getTmpDirFile() {
return this.tmpDirFile;
}
+ /**
+ * Sets tmp dir file.
+ *
+ * @param tmpDirFile the tmp dir file
+ */
public void setTmpDirFile(File tmpDirFile) {
this.tmpDirFile = tmpDirFile;
}
@@ -464,7 +529,8 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("auth_code", authCode);
String access_token = getWxCpProviderToken();
- String responseText = post(configStorage.getApiUrl(GET_LOGIN_INFO) + "?access_token=" + access_token, jsonObject.toString(), true);
+ String responseText = post(configStorage.getApiUrl(GET_LOGIN_INFO) + "?access_token=" + access_token,
+ jsonObject.toString(), true);
return WxTpLoginInfo.fromJson(responseText);
}
@@ -478,7 +544,7 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
//providerAccessToken 的获取不需要suiteAccessToken ,一不必要,二可以提高效率
WxCpProviderToken wxCpProviderToken =
WxCpProviderToken.fromJson(this.post(this.configStorage.getApiUrl(GET_PROVIDER_TOKEN)
- , jsonObject.toString(),true));
+ , jsonObject.toString(), true));
String providerAccessToken = wxCpProviderToken.getProviderAccessToken();
Integer expiresIn = wxCpProviderToken.getExpiresIn();
@@ -509,22 +575,22 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
}
@Override
- public WxCpTpDepartmentService getWxCpTpDepartmentService(){
+ public WxCpTpDepartmentService getWxCpTpDepartmentService() {
return wxCpTpDepartmentService;
}
@Override
- public WxCpTpMediaService getWxCpTpMediaService(){
+ public WxCpTpMediaService getWxCpTpMediaService() {
return wxCpTpMediaService;
}
@Override
- public WxCpTpOAService getWxCpTpOAService(){
+ public WxCpTpOAService getWxCpTpOAService() {
return wxCpTpOAService;
}
@Override
- public WxCpTpUserService getWxCpTpUserService(){
+ public WxCpTpUserService getWxCpTpUserService() {
return wxCpTpUserService;
}
@@ -566,7 +632,7 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ
}
@Override
- public WxCpTpAdmin getAdminList(String authCorpId,Integer agentId) throws WxErrorException{
+ public WxCpTpAdmin getAdminList(String authCorpId, Integer agentId) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("auth_corpid", authCorpId);
jsonObject.addProperty("agentid", agentId);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpContactServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpContactServiceImpl.java
index 9c13f488f..52423aa5f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpContactServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpContactServiceImpl.java
@@ -10,9 +10,11 @@ import me.chanjar.weixin.cp.tp.service.WxCpTpService;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.CONTACT_SEARCH;
/**
+ * The type Wx cp tp contact service.
+ *
* @author uianz
* @description
- * @since 2020/12/23 下午 02:39
+ * @since 2020 /12/23 下午 02:39
*/
@RequiredArgsConstructor
public class WxCpTpContactServiceImpl implements WxCpTpContactService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpDepartmentServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpDepartmentServiceImpl.java
index a51eaf278..851b06f3e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpDepartmentServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpDepartmentServiceImpl.java
@@ -7,7 +7,6 @@ import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.cp.api.impl.WxCpDepartmentServiceImpl;
-import me.chanjar.weixin.cp.bean.WxCpDepart;
import me.chanjar.weixin.cp.bean.WxCpTpDepart;
import me.chanjar.weixin.cp.tp.service.WxCpTpDepartmentService;
import me.chanjar.weixin.cp.tp.service.WxCpTpService;
@@ -18,10 +17,11 @@ import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Department.*;
/**
+ * The type Wx cp tp department service.
+ *
* @author uianz
- * @description corp from {@link WxCpDepartmentServiceImpl )}
- * 唯一不同在于获取部门列表时需要传对应企业的accessToken
- * @since 2020/12/23 下午 02:39
+ * @description corp from {@link WxCpDepartmentServiceImpl )} 唯一不同在于获取部门列表时需要传对应企业的accessToken
+ * @since 2020 /12/23 下午 02:39
*/
@RequiredArgsConstructor
public class WxCpTpDepartmentServiceImpl implements WxCpTpDepartmentService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpEditionServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpEditionServiceImpl.java
index 8b8e8b4e2..34ca852c3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpEditionServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpEditionServiceImpl.java
@@ -12,8 +12,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.PROLONG_TRY;
/**
* 应用版本付费版本相关接口实现
*
- * @author leigouqing
- * created on 2022年4月24日
+ * @author leigouqing created on 2022年4月24日
*/
@RequiredArgsConstructor
public class WxCpTpEditionServiceImpl implements WxCpTpEditionService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpLicenseServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpLicenseServiceImpl.java
index a7daeccf9..5c9fcc296 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpLicenseServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpLicenseServiceImpl.java
@@ -20,8 +20,9 @@ import java.util.*;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.License.*;
/**
- * @author Totoro
- * created on 2022/6/27 11:03
+ * The type Wx cp tp license service.
+ *
+ * @author Totoro created on 2022/6/27 11:03
*/
@RequiredArgsConstructor
public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
@@ -53,15 +54,16 @@ public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
@Override
- public WxCpTpLicenseOrderListResp getOrderList(String corpId, Date startTime, Date endTime, String cursor, int limit) throws WxErrorException {
+ public WxCpTpLicenseOrderListResp getOrderList(String corpId, Date startTime, Date endTime, String cursor,
+ int limit) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("corpid", corpId);
jsonObject.addProperty("cursor", cursor);
jsonObject.addProperty("limit", limit);
- if(startTime != null) {
+ if (startTime != null) {
jsonObject.addProperty("start_time", startTime.getTime() / 1000);
}
- if(endTime != null) {
+ if (endTime != null) {
jsonObject.addProperty("end_time", endTime.getTime() / 1000);
}
String resultText = mainService.post(getWxCpTpConfigStorage().getApiUrl(LIST_ORDER) +
@@ -102,7 +104,8 @@ public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
}
@Override
- public WxCpTpLicenseBatchActiveResultResp batchActiveCode(String corpId, List activeAccountList) throws WxErrorException {
+ public WxCpTpLicenseBatchActiveResultResp batchActiveCode(String corpId,
+ List activeAccountList) throws WxErrorException {
Map map = new HashMap<>(2);
map.put("corpid", corpId);
map.put("active_list", activeAccountList);
@@ -171,6 +174,7 @@ public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
/**
* 获取服务商token的拼接参数
+ *
* @return url
* @throws WxErrorException /
*/
@@ -181,6 +185,7 @@ public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
/**
* 获取tp参数配置
+ *
* @return config
*/
private WxCpTpConfigStorage getWxCpTpConfigStorage() {
@@ -188,6 +193,4 @@ public class WxCpTpLicenseServiceImpl implements WxCpTpLicenseService {
}
-
-
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMediaServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMediaServiceImpl.java
index 2f8afe092..326c9dd66 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMediaServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMediaServiceImpl.java
@@ -26,25 +26,25 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Media.MEDIA_UPLOAD
*/
@RequiredArgsConstructor
public class WxCpTpMediaServiceImpl implements WxCpTpMediaService {
- private final WxCpTpService mainService;
+ private final WxCpTpService mainService;
- @Override
- public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream, String corpId)
- throws WxErrorException, IOException {
- return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType), corpId);
- }
+ @Override
+ public WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream, String corpId)
+ throws WxErrorException, IOException {
+ return this.upload(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType), corpId);
+ }
- @Override
- public WxMediaUploadResult upload(String mediaType, File file, String corpId) throws WxErrorException {
- return this.mainService.execute(MediaUploadRequestExecutor.create(this.mainService.getRequestHttp()),
- mainService.getWxCpTpConfigStorage().getApiUrl(MEDIA_UPLOAD + mediaType) + "&access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId), file);
- }
+ @Override
+ public WxMediaUploadResult upload(String mediaType, File file, String corpId) throws WxErrorException {
+ return this.mainService.execute(MediaUploadRequestExecutor.create(this.mainService.getRequestHttp()),
+ mainService.getWxCpTpConfigStorage().getApiUrl(MEDIA_UPLOAD + mediaType) + "&access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId), file);
+ }
- @Override
- public String uploadImg(File file, String corpId) throws WxErrorException {
- String url = mainService.getWxCpTpConfigStorage().getApiUrl(IMG_UPLOAD);
- url += "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
- return this.mainService.execute(MediaUploadRequestExecutor.create(this.mainService.getRequestHttp()), url, file)
- .getUrl();
- }
+ @Override
+ public String uploadImg(File file, String corpId) throws WxErrorException {
+ String url = mainService.getWxCpTpConfigStorage().getApiUrl(IMG_UPLOAD);
+ url += "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
+ return this.mainService.execute(MediaUploadRequestExecutor.create(this.mainService.getRequestHttp()), url, file)
+ .getUrl();
+ }
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOAServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOAServiceImpl.java
index 6006c10de..42c4c6db9 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOAServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOAServiceImpl.java
@@ -17,50 +17,49 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Oa.*;
/**
* 企业微信 OA 接口实现
*
- * @author Element
- * created on 2019-04-06 11:20
+ * @author Element created on 2019-04-06 11:20
*/
@RequiredArgsConstructor
public class WxCpTpOAServiceImpl implements WxCpTpOAService {
- private final WxCpTpService mainService;
+ private final WxCpTpService mainService;
- @Override
- public String apply(WxCpOaApplyEventRequest request, String corpId) throws WxErrorException {
- String url = mainService.getWxCpTpConfigStorage().getApiUrl(APPLY_EVENT) +
- "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
+ @Override
+ public String apply(WxCpOaApplyEventRequest request, String corpId) throws WxErrorException {
+ String url = mainService.getWxCpTpConfigStorage().getApiUrl(APPLY_EVENT) +
+ "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
- String responseContent = this.mainService.post(url, request.toJson());
- return GsonParser.parse(responseContent).get("sp_no").getAsString();
- }
+ String responseContent = this.mainService.post(url, request.toJson());
+ return GsonParser.parse(responseContent).get("sp_no").getAsString();
+ }
- @Override
- public WxCpTemplateResult getTemplateDetail(@NonNull String templateId, String corpId) throws WxErrorException {
- JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("template_id", templateId);
- String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_TEMPLATE_DETAIL) +
- "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
- String responseContent = this.mainService.post(url, jsonObject.toString());
- return WxCpGsonBuilder.create().fromJson(responseContent, WxCpTemplateResult.class);
- }
+ @Override
+ public WxCpTemplateResult getTemplateDetail(@NonNull String templateId, String corpId) throws WxErrorException {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("template_id", templateId);
+ String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_TEMPLATE_DETAIL) +
+ "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
+ String responseContent = this.mainService.post(url, jsonObject.toString());
+ return WxCpGsonBuilder.create().fromJson(responseContent, WxCpTemplateResult.class);
+ }
- @Override
- public String copyTemplate(@NonNull String openTemplateId, String corpId) throws WxErrorException {
- JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("open_template_id", openTemplateId);
- String url = mainService.getWxCpTpConfigStorage().getApiUrl(COPY_TEMPLATE) +
- "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
- String responseContent = this.mainService.post(url, jsonObject.toString());
- return GsonParser.parse(responseContent).get("template_id").getAsString();
- }
+ @Override
+ public String copyTemplate(@NonNull String openTemplateId, String corpId) throws WxErrorException {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("open_template_id", openTemplateId);
+ String url = mainService.getWxCpTpConfigStorage().getApiUrl(COPY_TEMPLATE) +
+ "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
+ String responseContent = this.mainService.post(url, jsonObject.toString());
+ return GsonParser.parse(responseContent).get("template_id").getAsString();
+ }
- @Override
- public WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo, String corpId) throws WxErrorException {
- JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("sp_no", spNo);
- final String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_APPROVAL_DETAIL) +
- "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
- String responseContent = this.mainService.post(url, jsonObject.toString());
- return WxCpGsonBuilder.create().fromJson(responseContent, WxCpApprovalDetailResult.class);
- }
+ @Override
+ public WxCpApprovalDetailResult getApprovalDetail(@NonNull String spNo, String corpId) throws WxErrorException {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("sp_no", spNo);
+ final String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_APPROVAL_DETAIL) +
+ "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId);
+ String responseContent = this.mainService.post(url, jsonObject.toString());
+ return WxCpGsonBuilder.create().fromJson(responseContent, WxCpApprovalDetailResult.class);
+ }
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOrderServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOrderServiceImpl.java
index a1a07c5a0..b8aff54d3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOrderServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpOrderServiceImpl.java
@@ -16,8 +16,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_ORDER_LIST;
/**
* 应用版本付费订单相关接口实现
*
- * @author leigouqing
- * created on 2022年4月24日
+ * @author leigouqing created on 2022年4月24日
*/
@RequiredArgsConstructor
public class WxCpTpOrderServiceImpl implements WxCpTpOrderService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceApacheHttpClientImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceApacheHttpClientImpl.java
index 22962d933..a128afd7e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceApacheHttpClientImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceApacheHttpClientImpl.java
@@ -24,6 +24,8 @@ import org.apache.http.impl.client.CloseableHttpClient;
import java.io.IOException;
/**
+ * The type Wx cp tp service apache http client.
+ *
* @author someone
*/
public class WxCpTpServiceApacheHttpClientImpl extends BaseWxCpTpServiceImpl {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpTagServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpTagServiceImpl.java
index 1b03f18c7..b81760e72 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpTagServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpTagServiceImpl.java
@@ -25,7 +25,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tag.*;
*
*
* @author zhangq
- * @since 2021-02-14 16:02
+ * @since 2021 -02-14 16:02
*/
@RequiredArgsConstructor
public class WxCpTpTagServiceImpl implements WxCpTpTagService {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpCryptUtil.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpCryptUtil.java
index 8d6a68256..0844708b3 100755
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpCryptUtil.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpCryptUtil.java
@@ -8,13 +8,22 @@ import sun.security.util.DerInputStream;
import sun.security.util.DerValue;
import javax.crypto.Cipher;
+import java.nio.charset.StandardCharsets;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.RSAPrivateCrtKeySpec;
import java.util.Base64;
+/**
+ * The type Wx cp crypt util.
+ */
public class WxCpCryptUtil extends WxCryptUtil {
+ /**
+ * Instantiates a new Wx cp crypt util.
+ *
+ * @param wxCpConfigStorage the wx cp config storage
+ */
public WxCpCryptUtil(WxCpConfigStorage wxCpConfigStorage) {
/*
* @param token 公众平台上,开发者设置的token
@@ -36,8 +45,8 @@ public class WxCpCryptUtil extends WxCryptUtil {
* @param encryptRandomKey 使用PUBLICKEY_VER指定版本的公钥进行非对称加密后base64加密的内容
* @param msgAuditPriKey 会话存档私钥
* @param pkcs1 使用什么方式进行解密,1代表使用PKCS1进行解密,2代表PKCS8进行解密 ...
- * @return
- * @throws Exception
+ * @return string
+ * @throws Exception the exception
*/
public static String decryptPriKey(String encryptRandomKey, String msgAuditPriKey, Integer pkcs1) throws Exception {
if (pkcs1 == null) {
@@ -54,10 +63,10 @@ public class WxCpCryptUtil extends WxCryptUtil {
/**
* PKCS8 解密私钥
*
- * @param encryptRandomKey
- * @param msgAuditPriKey
- * @return
- * @throws Exception
+ * @param encryptRandomKey the encrypt random key
+ * @param msgAuditPriKey the msg audit pri key
+ * @return string
+ * @throws Exception the exception
*/
public static String decryptPriKeyByPKCS8(String encryptRandomKey, String msgAuditPriKey) throws Exception {
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
@@ -73,17 +82,18 @@ public class WxCpCryptUtil extends WxCryptUtil {
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.DECRYPT_MODE, priKey);
byte[] utf8 = cipher.doFinal(Base64.getDecoder().decode(encryptRandomKey));
- return new String(utf8, "UTF-8");
+ return new String(utf8, StandardCharsets.UTF_8);
}
/**
* 会话存档,PKCS1 解密私钥
* 企业获取的会话内容将用公钥加密,企业用自行保存的私钥解开会话内容数据
*
- * @param encryptRandomKey 使用PUBLICKEY_VER指定版本的公钥进行非对称加密后base64加密的内容,需要业务方先base64 decode处理后,再使用指定版本的私钥进行解密,得出内容。String类型
+ * @param encryptRandomKey 使用PUBLICKEY_VER指定版本的公钥进行非对称加密后base64加密的内容,需要业务方先base64
+ * decode处理后,再使用指定版本的私钥进行解密,得出内容。String类型
* @param msgAuditPriKey 会话存档私钥
- * @return
- * @throws Exception
+ * @return string
+ * @throws Exception the exception
*/
public static String decryptPriKeyByPKCS1(String encryptRandomKey, String msgAuditPriKey) throws Exception {
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
@@ -102,7 +112,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.DECRYPT_MODE, priKey);
byte[] utf8 = cipher.doFinal(Base64.getDecoder().decode(encryptRandomKey));
- return new String(utf8, "UTF-8");
+ return new String(utf8, StandardCharsets.UTF_8);
}
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpTpCryptUtil.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpTpCryptUtil.java
index b9c5f2a6d..ac6097446 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpTpCryptUtil.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpTpCryptUtil.java
@@ -1,7 +1,5 @@
package me.chanjar.weixin.cp.util.crypto;
-import com.google.common.base.CharMatcher;
-import com.google.common.io.BaseEncoding;
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
import org.apache.commons.lang3.StringUtils;
@@ -9,11 +7,15 @@ import org.apache.commons.lang3.StringUtils;
import java.util.Base64;
/**
+ * The type Wx cp tp crypt util.
+ *
* @author someone
*/
public class WxCpTpCryptUtil extends WxCryptUtil {
/**
* 构造函数.
+ *
+ * @param wxCpTpConfigStorage the wx cp tp config storage
*/
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
/*
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/StatisticListAdapter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/StatisticListAdapter.java
index 065d3a76d..84eaa946b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/StatisticListAdapter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/StatisticListAdapter.java
@@ -7,13 +7,15 @@ import me.chanjar.weixin.cp.bean.kf.WxCpKfGetCorpStatisticResp;
import java.lang.reflect.Type;
/**
- * @author zhongjun
- * created on 2022/4/25
- **/
+ * The type Statistic list adapter.
+ *
+ * @author zhongjun created on 2022/4/25
+ */
public class StatisticListAdapter implements JsonDeserializer {
@Override
- public WxCpKfGetCorpStatisticResp.StatisticList deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
+ public WxCpKfGetCorpStatisticResp.StatisticList deserialize(JsonElement jsonElement, Type type,
+ JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
WxCpKfGetCorpStatisticResp.StatisticList statisticList = new WxCpKfGetCorpStatisticResp.StatisticList();
JsonObject asJsonObject = jsonElement.getAsJsonObject();
statisticList.setStatTime(asJsonObject.get("stat_time").getAsLong());
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpChatGsonAdapter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpChatGsonAdapter.java
index 0e97181a3..e3a03ffab 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpChatGsonAdapter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpChatGsonAdapter.java
@@ -8,22 +8,14 @@
*/
package me.chanjar.weixin.cp.util.json;
+import com.google.gson.*;
+import me.chanjar.weixin.common.util.json.GsonHelper;
+import me.chanjar.weixin.cp.bean.WxCpChat;
+
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParseException;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
-
-import me.chanjar.weixin.common.util.json.GsonHelper;
-import me.chanjar.weixin.cp.bean.WxCpChat;
-
/**
* 群聊适配器
*
@@ -34,12 +26,12 @@ public class WxCpChatGsonAdapter implements JsonSerializer, JsonDeseri
@Override
public JsonElement serialize(WxCpChat chat, Type typeOfSrc, JsonSerializationContext context) {
JsonObject json = new JsonObject();
- if (chat.getId() != null) {
+ if (chat.getId() != null) {
json.addProperty("chatid", chat.getId());
}
if (chat.getName() != null) {
json.addProperty("name", chat.getName());
- }
+ }
if (chat.getOwner() != null) {
json.addProperty("owner", chat.getOwner());
}
@@ -61,7 +53,7 @@ public class WxCpChatGsonAdapter implements JsonSerializer, JsonDeseri
chat.setId(GsonHelper.getAsString(chatJson.get("chatid")));
chat.setName(GsonHelper.getAsString(chatJson.get("name")));
chat.setOwner(GsonHelper.getAsString(chatJson.get("owner")));
-
+
JsonArray usersJson = chatJson.getAsJsonArray("userlist");
if (usersJson != null) {
List users = new ArrayList<>(usersJson.size());
@@ -70,7 +62,7 @@ public class WxCpChatGsonAdapter implements JsonSerializer, JsonDeseri
users.add(userJson.getAsString());
}
}
-
+
return chat;
}
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpConclusionAdapter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpConclusionAdapter.java
index fd159d175..0a57884a7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpConclusionAdapter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpConclusionAdapter.java
@@ -11,9 +11,11 @@ import java.lang.reflect.Type;
*
* @author element
*/
-public class WxCpConclusionAdapter implements JsonSerializer, JsonDeserializer {
+public class WxCpConclusionAdapter implements JsonSerializer,
+ JsonDeserializer {
@Override
- public WxCpContactWayInfo.ContactWay.Conclusion deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
+ public WxCpContactWayInfo.ContactWay.Conclusion deserialize(JsonElement json, Type typeOfT,
+ JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObject = json.getAsJsonObject();
WxCpContactWayInfo.ContactWay.Conclusion conclusion = new WxCpContactWayInfo.ContactWay.Conclusion();
@@ -77,7 +79,8 @@ public class WxCpConclusionAdapter implements JsonSerializer
* 企业号菜单json转换适配器
* Created by Binary Wang on 2017-6-25.
- * @author Binary Wang
- *
+ * @author Binary Wang
*/
public class WxCpMenuGsonAdapter extends WxMenuGsonAdapter {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpTagGsonAdapter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpTagGsonAdapter.java
index 872190688..41a5b7840 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpTagGsonAdapter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpTagGsonAdapter.java
@@ -15,6 +15,8 @@ import me.chanjar.weixin.cp.bean.WxCpTag;
import java.lang.reflect.Type;
/**
+ * The type Wx cp tag gson adapter.
+ *
* @author Daniel Qian
*/
public class WxCpTagGsonAdapter implements JsonSerializer, JsonDeserializer {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpUserGsonAdapter.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpUserGsonAdapter.java
index b91404bf7..8fd333a59 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpUserGsonAdapter.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/json/WxCpUserGsonAdapter.java
@@ -97,7 +97,8 @@ public class WxCpUserGsonAdapter implements JsonDeserializer, JsonSeri
}
if (GsonHelper.isNotNull(o.get(EXTERNAL_PROFILE))) {
- user.setExternalCorpName(GsonHelper.getString(o.getAsJsonObject().get(EXTERNAL_PROFILE).getAsJsonObject(), EXTERNAL_CORP_NAME));
+ user.setExternalCorpName(GsonHelper.getString(o.getAsJsonObject().get(EXTERNAL_PROFILE).getAsJsonObject(),
+ EXTERNAL_CORP_NAME));
JsonElement jsonElement = o.get(EXTERNAL_PROFILE).getAsJsonObject().get(WECHAT_CHANNELS);
if (jsonElement != null) {
JsonObject asJsonObject = jsonElement.getAsJsonObject();
@@ -126,7 +127,8 @@ public class WxCpUserGsonAdapter implements JsonDeserializer, JsonSeri
switch (type) {
case 0: {
- attr.setTextValue(GsonHelper.getString(attrJsonElement.getAsJsonObject().get("text").getAsJsonObject(), "value"));
+ attr.setTextValue(GsonHelper.getString(attrJsonElement.getAsJsonObject().get("text").getAsJsonObject(),
+ "value"));
break;
}
case 1: {
@@ -294,7 +296,8 @@ public class WxCpUserGsonAdapter implements JsonDeserializer, JsonSeri
this.addProperty(attrsJson, EXTERNAL_CORP_NAME, user.getExternalCorpName());
if (user.getWechatChannels() != null) {
- attrsJson.add(WECHAT_CHANNELS, GsonHelper.buildJsonObject("nickname", user.getWechatChannels().getNickname(), "status", user.getWechatChannels().getStatus()));
+ attrsJson.add(WECHAT_CHANNELS, GsonHelper.buildJsonObject("nickname", user.getWechatChannels().getNickname(),
+ "status", user.getWechatChannels().getStatus()));
}
if (!user.getExternalAttrs().isEmpty()) {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/xml/XStreamTransformer.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/xml/XStreamTransformer.java
index 2fb09ce4c..8f540020a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/xml/XStreamTransformer.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/xml/XStreamTransformer.java
@@ -9,12 +9,23 @@ import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
+/**
+ * The type X stream transformer.
+ */
public class XStreamTransformer {
+ /**
+ * The constant CLASS_2_XSTREAM_INSTANCE.
+ */
protected static final Map CLASS_2_XSTREAM_INSTANCE = configXStreamInstance();
/**
* xml -> pojo
+ *
+ * @param the type parameter
+ * @param clazz the clazz
+ * @param xml the xml
+ * @return the t
*/
@SuppressWarnings("unchecked")
public static T fromXml(Class clazz, String xml) {
@@ -22,6 +33,14 @@ public class XStreamTransformer {
return object;
}
+ /**
+ * From xml t.
+ *
+ * @param the type parameter
+ * @param clazz the clazz
+ * @param is the is
+ * @return the t
+ */
@SuppressWarnings("unchecked")
public static T fromXml(Class clazz, InputStream is) {
T object = (T) CLASS_2_XSTREAM_INSTANCE.get(clazz).fromXML(is);
@@ -40,6 +59,11 @@ public class XStreamTransformer {
/**
* pojo -> xml.
+ *
+ * @param the type parameter
+ * @param clazz the clazz
+ * @param object the object
+ * @return the string
*/
public static String toXml(Class clazz, T object) {
return CLASS_2_XSTREAM_INSTANCE.get(clazz).toXML(object);
@@ -121,6 +145,7 @@ public class XStreamTransformer {
xstream.processAnnotations(WxCpXmlOutTaskCardMessage.class);
return xstream;
}
+
private static XStream configWxCpXmlOutUpdateBtnMessage() {
XStream xstream = XStreamInitializer.getInstance();
xstream.processAnnotations(WxCpXmlOutMessage.class);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModule.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModule.java
index 9d89892f4..69efe530c 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModule.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModule.java
@@ -15,9 +15,15 @@ import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
import java.io.IOException;
import java.io.InputStream;
+/**
+ * The type Api test module.
+ */
@Slf4j
public class ApiTestModule implements Module {
private static final String TEST_CONFIG_XML = "test-config.xml";
+ /**
+ * The Config.
+ */
protected WxXmlCpInMemoryConfigStorage config;
private static T fromXml(Class clazz, InputStream is) {
@@ -45,15 +51,30 @@ public class ApiTestModule implements Module {
}
}
+ /**
+ * The type Wx xml cp in memory config storage.
+ */
@Data
@EqualsAndHashCode(callSuper = true)
@XStreamAlias("xml")
public static class WxXmlCpInMemoryConfigStorage extends WxCpDefaultConfigImpl {
private static final long serialVersionUID = -4521839921547374822L;
+ /**
+ * The User id.
+ */
protected String userId;
+ /**
+ * The Department id.
+ */
protected String departmentId;
+ /**
+ * The Tag id.
+ */
protected String tagId;
+ /**
+ * The External user id.
+ */
protected String externalUserId;
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModuleWithMockServer.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModuleWithMockServer.java
index 3525f938f..867aeecc8 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModuleWithMockServer.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/ApiTestModuleWithMockServer.java
@@ -5,10 +5,12 @@ import com.google.inject.Binder;
/**
* 带mock server 的test module.
*
- * @author Binary Wang
- * created on 2020-08-30
+ * @author Binary Wang created on 2020-08-30
*/
public class ApiTestModuleWithMockServer extends ApiTestModule {
+ /**
+ * The constant mockServerPort.
+ */
public static final int mockServerPort = 8080;
@Override
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/TestConstants.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/TestConstants.java
index 03c84e925..acd442f9f 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/TestConstants.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/TestConstants.java
@@ -7,11 +7,23 @@ package me.chanjar.weixin.cp.api;
*
*/
public class TestConstants {
- ///////////////////////
+ /**
+ * The constant FILE_JPG.
+ */
+///////////////////////
// 文件类型
///////////////////////
public static final String FILE_JPG = "jpeg";
+ /**
+ * The constant FILE_MP3.
+ */
public static final String FILE_MP3 = "mp3";
+ /**
+ * The constant FILE_AMR.
+ */
public static final String FILE_AMR = "amr";
+ /**
+ * The constant FILE_MP4.
+ */
public static final String FILE_MP4 = "mp4";
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBaseAPITest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBaseAPITest.java
index 58ba1a979..4a7d4e547 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBaseAPITest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBaseAPITest.java
@@ -18,9 +18,17 @@ import org.testng.annotations.Test;
@Guice(modules = ApiTestModule.class)
public class WxCpBaseAPITest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpServiceImpl wxService;
+ /**
+ * Test refresh access token.
+ *
+ * @throws WxErrorException the wx error exception
+ */
public void testRefreshAccessToken() throws WxErrorException {
WxCpConfigStorage configStorage = this.wxService.getWxCpConfigStorage();
String before = configStorage.getAccessToken();
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBusyRetryTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBusyRetryTest.java
index 34d4065dc..7acbc9dd2 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBusyRetryTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpBusyRetryTest.java
@@ -13,9 +13,17 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
+/**
+ * The type Wx cp busy retry test.
+ */
@Test
@Slf4j
public class WxCpBusyRetryTest {
+ /**
+ * Get service object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider(name = "getService")
public Object[][] getService() {
WxCpService service = new WxCpServiceImpl() {
@@ -36,11 +44,24 @@ public class WxCpBusyRetryTest {
};
}
+ /**
+ * Test retry.
+ *
+ * @param service the service
+ * @throws WxErrorException the wx error exception
+ */
@Test(dataProvider = "getService", expectedExceptions = RuntimeException.class)
public void testRetry(WxCpService service) throws WxErrorException {
service.execute(null, null, null);
}
+ /**
+ * Test retry in thread pool.
+ *
+ * @param service the service
+ * @throws InterruptedException the interrupted exception
+ * @throws ExecutionException the execution exception
+ */
@Test(dataProvider = "getService")
public void testRetryInThreadPool(final WxCpService service) throws InterruptedException, ExecutionException {
// 当线程池中的线程复用的时候,还是能保证相同的重试次数
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpExternalContactTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpExternalContactTest.java
index 7fb1650da..0359b5f38 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpExternalContactTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpExternalContactTest.java
@@ -1,31 +1,15 @@
package me.chanjar.weixin.cp.api;
-import com.google.common.collect.Lists;
import com.google.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
-import me.chanjar.weixin.cp.bean.WxCpBaseResp;
-import me.chanjar.weixin.cp.bean.external.*;
-import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactBatchInfo;
-import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactInfo;
-import me.chanjar.weixin.cp.bean.external.msg.Attachment;
-import me.chanjar.weixin.cp.bean.external.msg.Image;
-import me.chanjar.weixin.cp.bean.external.msg.Video;
-import org.apache.commons.lang3.time.DateFormatUtils;
+import me.chanjar.weixin.cp.bean.external.WxCpUserExternalUnassignList;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
-import org.testng.collections.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
-import static org.testng.Assert.assertNotNull;
/**
* 离职继承测试类
- *
+ *
* 官方文档:
* https://developer.work.weixin.qq.com/document/path/92124
*/
@@ -35,17 +19,29 @@ public class WxCpExternalContactTest {
@Inject
private WxCpService wxCpService;
+ /**
+ * The Config storage.
+ */
@Inject
protected ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage;
+ /**
+ * Test get external contact.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetExternalContact() throws WxErrorException {
String externalUserId = this.configStorage.getExternalUserId();
- WxCpUserExternalUnassignList unassignList = this.wxCpService.getExternalContactService().listUnassignedList(null, null, 100);
+ WxCpUserExternalUnassignList unassignList = this.wxCpService.getExternalContactService().listUnassignedList(null,
+ null, 100);
log.info(unassignList.toJson());
// test str
- String result = "{\"errcode\":0,\"errmsg\":\"ok\",\"info\":[{\"handover_userid\":\"zhangsan\",\"external_userid\":\"woAJ2GCAAAd4uL12hdfsdasassdDmAAAAA\",\"dimission_time\":1550838571},{\"handover_userid\":\"lisi\",\"external_userid\":\"wmAJ2GCAAAzLTI123ghsdfoGZNqqAAAA\",\"dimission_time\":1550661468}],\"is_last\":false,\"next_cursor\":\"aSfwejksvhToiMMfFeIGZZ\"}";
+ String result = "{\"errcode\":0,\"errmsg\":\"ok\",\"info\":[{\"handover_userid\":\"zhangsan\"," +
+ "\"external_userid\":\"woAJ2GCAAAd4uL12hdfsdasassdDmAAAAA\",\"dimission_time\":1550838571}," +
+ "{\"handover_userid\":\"lisi\",\"external_userid\":\"wmAJ2GCAAAzLTI123ghsdfoGZNqqAAAA\"," +
+ "\"dimission_time\":1550661468}],\"is_last\":false,\"next_cursor\":\"aSfwejksvhToiMMfFeIGZZ\"}";
WxCpUserExternalUnassignList json = WxCpUserExternalUnassignList.fromJson(result);
log.info(json.toJson());
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
index 6e4c207f2..31da36fc3 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
@@ -22,8 +22,7 @@ import java.util.Date;
* 企业微信直播测试类.
* 官方文档:https://open.work.weixin.qq.com/api/doc/90000/90135/93632
*
- * @author Wang_Wong
- * created on 2021-12-23
+ * @author Wang_Wong created on 2021-12-23
*/
@Slf4j
public class WxCpLivingTest {
@@ -31,6 +30,11 @@ public class WxCpLivingTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService wxCpService;
+ /**
+ * Test.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void test() throws WxErrorException {
@@ -103,7 +107,10 @@ public class WxCpLivingTest {
log.info("返回的数据:{}", thisReq.toJson());
// 创建预约直播
- String createJson = "{\"anchor_userid\":\"ChenHu\",\"theme\":\"theme\",\"living_start\":164037820420,\"living_duration\":3600,\"description\":\"test description\",\"type\":4,\"remind_time\":60,\"activity_cover_mediaid\":\"MEDIA_ID\",\"activity_share_mediaid\":\"MEDIA_ID\",\"activity_detail\":{\"description\":\"活动描述,非活动类型的直播不用传\",\"image_list\":[\"xxxx1\",\"xxxx1\"]}}";
+ String createJson = "{\"anchor_userid\":\"ChenHu\",\"theme\":\"theme\",\"living_start\":164037820420," +
+ "\"living_duration\":3600,\"description\":\"test description\",\"type\":4,\"remind_time\":60," +
+ "\"activity_cover_mediaid\":\"MEDIA_ID\",\"activity_share_mediaid\":\"MEDIA_ID\"," +
+ "\"activity_detail\":{\"description\":\"活动描述,非活动类型的直播不用传\",\"image_list\":[\"xxxx1\",\"xxxx1\"]}}";
WxCpLivingCreateRequest requestData = WxCpLivingCreateRequest.fromJson(createJson);
String thisLivingId = wxCpService.getLivingService().livingCreate(requestData);
log.info("livingId为:{}", thisLivingId);
@@ -112,7 +119,8 @@ public class WxCpLivingTest {
/**
* other api
*/
- String livingCode = wxCpService.getLivingService().getLivingCode("o50by5NezHciWnoexJsrI49ILNqI", "lvOQpTDwAAD2MYuOq9y_bmLNMJfbbdGw");
+ String livingCode = wxCpService.getLivingService().getLivingCode("o50by5NezHciWnoexJsrI49ILNqI",
+ "lvOQpTDwAAD2MYuOq9y_bmLNMJfbbdGw");
log.info(JSON.toString(livingCode));
// 直播详情
@@ -123,35 +131,47 @@ public class WxCpLivingTest {
WxCpWatchStat watchStat = wxCpService.getLivingService().getWatchStat("lvOQpTDwAAcP9wNOSSxTwpbni-TMPNSg", "0");
log.info(watchStat.toJson());
- final String watchStateJson = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\",\"stat_info\":{\"users\":[{\"userid\":\"userid\",\"watch_time\":30,\"is_comment\":1,\"is_mic\":1}],\"external_users\":[{\"external_userid\":\"external_userid1\",\"type\":1,\"name\":\"user name\",\"watch_time\":30,\"is_comment\":1,\"is_mic\":1},{\"external_userid\":\"external_userid2\",\"type\":2,\"name\":\"user_name\",\"watch_time\":30,\"is_comment\":1,\"is_mic\":1}]}}";
+ final String watchStateJson = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\"," +
+ "\"stat_info\":{\"users\":[{\"userid\":\"userid\",\"watch_time\":30,\"is_comment\":1,\"is_mic\":1}]," +
+ "\"external_users\":[{\"external_userid\":\"external_userid1\",\"type\":1,\"name\":\"user name\"," +
+ "\"watch_time\":30,\"is_comment\":1,\"is_mic\":1},{\"external_userid\":\"external_userid2\",\"type\":2," +
+ "\"name\":\"user_name\",\"watch_time\":30,\"is_comment\":1,\"is_mic\":1}]}}";
WxCpWatchStat wxCpWatchStat = WxCpWatchStat.fromJson(watchStateJson);
log.info(wxCpWatchStat.toJson());
// 直播观众信息
- final String livingShareInfo = "{\"errcode\":0,\"errmsg\":\"ok\",\"livingid\":\"livingid\",\"viewer_userid\":\"viewer_userid\",\"viewer_external_userid\":\"viewer_external_userid\",\"invitor_userid\":\"invitor_userid\",\"invitor_external_userid\":\"invitor_external_userid\"}";
+ final String livingShareInfo = "{\"errcode\":0,\"errmsg\":\"ok\",\"livingid\":\"livingid\"," +
+ "\"viewer_userid\":\"viewer_userid\",\"viewer_external_userid\":\"viewer_external_userid\"," +
+ "\"invitor_userid\":\"invitor_userid\",\"invitor_external_userid\":\"invitor_external_userid\"}";
WxCpLivingShareInfo wxCpLivingShareInfo = WxCpLivingShareInfo.fromJson(livingShareInfo);
log.info(wxCpLivingShareInfo.toJson());
// 获取成员直播ID列表
- WxCpLivingResult.LivingIdResult livingResult = wxCpService.getLivingService().getUserAllLivingId("ChenHu", null, null);
+ WxCpLivingResult.LivingIdResult livingResult = wxCpService.getLivingService().getUserAllLivingId("ChenHu", null,
+ null);
log.info(livingResult.toJson());
- String livinglist = "{\"errcode\":0,\"errmsg\":\"ok\",\"next_cursor\":\"next_cursor\",\"livingid_list\":[\"livingid1\",\"livingid2\"]}";
+ String livinglist = "{\"errcode\":0,\"errmsg\":\"ok\",\"next_cursor\":\"next_cursor\"," +
+ "\"livingid_list\":[\"livingid1\",\"livingid2\"]}";
WxCpLivingResult.LivingIdResult livingIdResult = WxCpLivingResult.LivingIdResult.fromJson(livinglist);
log.info(livingIdResult.toJson());
log.info("{}", new Date().getTime());
// 创建预约直播
- String create = "{\"anchor_userid\":\"ChenHu\",\"theme\":\"theme\",\"living_start\":164037820420,\"living_duration\":3600,\"description\":\"test description\",\"type\":4,\"remind_time\":60,\"activity_cover_mediaid\":\"MEDIA_ID\",\"activity_share_mediaid\":\"MEDIA_ID\",\"activity_detail\":{\"description\":\"活动描述,非活动类型的直播不用传\",\"image_list\":[\"xxxx1\",\"xxxx1\"]}}";
+ String create = "{\"anchor_userid\":\"ChenHu\",\"theme\":\"theme\",\"living_start\":164037820420," +
+ "\"living_duration\":3600,\"description\":\"test description\",\"type\":4,\"remind_time\":60," +
+ "\"activity_cover_mediaid\":\"MEDIA_ID\",\"activity_share_mediaid\":\"MEDIA_ID\"," +
+ "\"activity_detail\":{\"description\":\"活动描述,非活动类型的直播不用传\",\"image_list\":[\"xxxx1\",\"xxxx1\"]}}";
WxCpLivingCreateRequest request = WxCpLivingCreateRequest.fromJson(create);
String livingId = wxCpService.getLivingService().livingCreate(request);
log.info("livingId为:{}", livingId);
- String modify = "{\"livingid\": \""+ livingId +"\",\"theme\":\"theme\",\"living_start\":164047820420,\"living_duration\":3600,\"description\":\"描述:description\",\"type\":1,\"remind_time\":60}";
+ String modify = "{\"livingid\": \"" + livingId + "\",\"theme\":\"theme\",\"living_start\":164047820420," +
+ "\"living_duration\":3600,\"description\":\"描述:description\",\"type\":1,\"remind_time\":60}";
WxCpLivingModifyRequest modifyReq = WxCpLivingModifyRequest.fromJson(modify);
WxCpLivingResult result = wxCpService.getLivingService().livingModify(modifyReq);
log.info("result:{}", result.toJson());
@@ -170,7 +190,12 @@ public class WxCpLivingTest {
}
- public static void main(String[] args){
+ /**
+ * Main.
+ *
+ * @param args the args
+ */
+ public static void main(String[] args) {
log.info("{}", new Date().getTime());
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java
index 5e3f665c3..53a55aeaf 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java
@@ -3,11 +3,11 @@ package me.chanjar.weixin.cp.api;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.session.StandardSessionManager;
import me.chanjar.weixin.common.session.WxSessionManager;
+import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
+import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
import me.chanjar.weixin.cp.message.WxCpMessageHandler;
import me.chanjar.weixin.cp.message.WxCpMessageMatcher;
import me.chanjar.weixin.cp.message.WxCpMessageRouter;
-import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
-import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -22,6 +22,13 @@ import java.util.Map;
@Test
public class WxCpMessageRouterTest {
+ /**
+ * Prepare.
+ *
+ * @param async the async
+ * @param sb the sb
+ * @param router the router
+ */
@Test(enabled = false)
public void prepare(boolean async, StringBuffer sb, WxCpMessageRouter router) {
router
@@ -40,20 +47,28 @@ public class WxCpMessageRouterTest {
.msgType(WxConsts.XmlMsgType.TEXT).event(WxConsts.EventType.CLICK)
.handler(new WxEchoCpMessageHandler(sb, "COMBINE_2"))
.end()
- .rule().async(async).msgType(WxConsts.XmlMsgType.TEXT).handler(new WxEchoCpMessageHandler(sb, WxConsts.XmlMsgType.TEXT)).end()
- .rule().async(async).event(WxConsts.EventType.CLICK).handler(new WxEchoCpMessageHandler(sb, WxConsts.EventType.CLICK)).end()
+ .rule().async(async).msgType(WxConsts.XmlMsgType.TEXT).handler(new WxEchoCpMessageHandler(sb,
+ WxConsts.XmlMsgType.TEXT)).end()
+ .rule().async(async).event(WxConsts.EventType.CLICK).handler(new WxEchoCpMessageHandler(sb,
+ WxConsts.EventType.CLICK)).end()
.rule().async(async).eventKey("KEY_1").handler(new WxEchoCpMessageHandler(sb, "KEY_1")).end()
.rule().async(async).content("CONTENT_1").handler(new WxEchoCpMessageHandler(sb, "CONTENT_1")).end()
.rule().async(async).rContent(".*bc.*").handler(new WxEchoCpMessageHandler(sb, "abcd")).end()
.rule().async(async).matcher(new WxCpMessageMatcher() {
- @Override
- public boolean match(WxCpXmlMessage message) {
- return "strangeformat".equals(message.getFormat());
- }
- }).handler(new WxEchoCpMessageHandler(sb, "matcher")).end()
+ @Override
+ public boolean match(WxCpXmlMessage message) {
+ return "strangeformat".equals(message.getFormat());
+ }
+ }).handler(new WxEchoCpMessageHandler(sb, "matcher")).end()
.rule().async(async).handler(new WxEchoCpMessageHandler(sb, "ALL")).end();
}
+ /**
+ * Test sync.
+ *
+ * @param message the message
+ * @param expected the expected
+ */
@Test(dataProvider = "messages-1")
public void testSync(WxCpXmlMessage message, String expected) {
StringBuffer sb = new StringBuffer();
@@ -63,6 +78,13 @@ public class WxCpMessageRouterTest {
Assert.assertEquals(sb.toString(), expected);
}
+ /**
+ * Test async.
+ *
+ * @param message the message
+ * @param expected the expected
+ * @throws InterruptedException the interrupted exception
+ */
@Test(dataProvider = "messages-1")
public void testAsync(WxCpXmlMessage message, String expected) throws InterruptedException {
StringBuffer sb = new StringBuffer();
@@ -73,6 +95,11 @@ public class WxCpMessageRouterTest {
Assert.assertEquals(sb.toString(), expected);
}
+ /**
+ * Test concurrency.
+ *
+ * @throws InterruptedException the interrupted exception
+ */
public void testConcurrency() throws InterruptedException {
final WxCpMessageRouter router = new WxCpMessageRouter(null);
router.rule().handler(new WxCpMessageHandler() {
@@ -98,6 +125,11 @@ public class WxCpMessageRouterTest {
Thread.sleep(2000);
}
+ /**
+ * Messages 2 object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider(name = "messages-1")
public Object[][] messages2() {
WxCpXmlMessage message1 = new WxCpXmlMessage();
@@ -152,6 +184,11 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * Standard session manager object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] standardSessionManager() {
@@ -167,6 +204,12 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * Test session clean 1.
+ *
+ * @param ism the ism
+ * @throws InterruptedException the interrupted exception
+ */
@Test(dataProvider = "standardSessionManager")
public void testSessionClean1(StandardSessionManager ism) throws InterruptedException {
@@ -186,6 +229,12 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * Test session clean 2.
+ *
+ * @param ism the ism
+ * @throws InterruptedException the interrupted exception
+ */
@Test(dataProvider = "standardSessionManager")
public void testSessionClean2(StandardSessionManager ism) throws InterruptedException {
@@ -221,6 +270,12 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * Test session clean 3.
+ *
+ * @param ism the ism
+ * @throws InterruptedException the interrupted exception
+ */
@Test(dataProvider = "standardSessionManager")
public void testSessionClean3(StandardSessionManager ism) throws InterruptedException {
@@ -240,6 +295,12 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * Test session clean 4.
+ *
+ * @param ism the ism
+ * @throws InterruptedException the interrupted exception
+ */
@Test(dataProvider = "standardSessionManager")
public void testSessionClean4(StandardSessionManager ism) throws InterruptedException {
@@ -273,11 +334,20 @@ public class WxCpMessageRouterTest {
}
}
+ /**
+ * The type Wx echo cp message handler.
+ */
public static class WxEchoCpMessageHandler implements WxCpMessageHandler {
- private StringBuffer sb;
- private String echoStr;
+ private final StringBuffer sb;
+ private final String echoStr;
+ /**
+ * Instantiates a new Wx echo cp message handler.
+ *
+ * @param sb the sb
+ * @param echoStr the echo str
+ */
public WxEchoCpMessageHandler(StringBuffer sb, String echoStr) {
this.sb = sb;
this.echoStr = echoStr;
@@ -292,6 +362,9 @@ public class WxCpMessageRouterTest {
}
+ /**
+ * The type Wx session message handler.
+ */
public static class WxSessionMessageHandler implements WxCpMessageHandler {
@Override
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
index 2c21c3253..91927046f 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
@@ -24,8 +24,7 @@ import java.util.List;
* 企业微信会话内容存档测试类.
* 官方文档:https://developer.work.weixin.qq.com/document/path/91360
*
- * @author Wang_Wong
- * created on 2022-01-17
+ * @author Wang_Wong created on 2022-01-17
*/
@Slf4j
public class WxCpMsgAuditTest {
@@ -33,7 +32,12 @@ public class WxCpMsgAuditTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
- // com.binarywang.spring.starter.wxjava.cp.config.WxCpServiceAutoConfiguration
+ /**
+ * Test.
+ *
+ * @throws Exception the exception
+ */
+// com.binarywang.spring.starter.wxjava.cp.config.WxCpServiceAutoConfiguration
// WxCpServiceImpl.getAccessToken()
@Test
public void test() throws Exception {
@@ -106,15 +110,19 @@ public class WxCpMsgAuditTest {
* // 企业微信会话存档
* // 1、会话存档私钥,最好去除前缀和换行,如下所示!
* // 2、仔细配置windows以及linux环境sdk路径
- * MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn+5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gH
- * /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
+ * MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn
+ * +5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gH
+ * /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,
+ * libWeWorkFinanceSdk_Java.so
*
*
* 注意:最好先配置lib开头的系统库,再配置sdk类库,配置绝对路径,最好配置为linux路径
* Windows:
- * D:/WorkSpace/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
+ * D:/WorkSpace/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,
+ * libWeWorkFinanceSdk_Java.so
* Linux:
- * /www/osfile/work_msg_storage/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
+ * /www/osfile/work_msg_storage/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,
+ * WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
*
*
* yml配置(支持多个corpId):
@@ -131,8 +139,10 @@ public class WxCpMsgAuditTest {
* secret: xIpum7Yt4NMXcyxdzcQ2l_46BG4Qxxxxxxxxxxx
* token:
* aesKey:
- * msgAuditPriKey: MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn+5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gHxxx
- * msgAuditLibPath: /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
+ * msgAuditPriKey: MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn
+ * +5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gHxxx
+ * msgAuditLibPath: /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk
+ * .dll,libWeWorkFinanceSdk_Java.so
*
*
* 在线生成非对称加密公钥私钥对:
@@ -144,7 +154,7 @@ public class WxCpMsgAuditTest {
* openssl rsa -in private_key.pem -pubout -out public_key.pem
* /
- /**
+ /**
* 建议放到redis,本次请求获取消息记录开始的seq值。首次访问填写0,非首次使用上次企业微信返回的最大seq。允许从任意seq重入拉取。
*/
long seq = 0L;
@@ -152,7 +162,8 @@ public class WxCpMsgAuditTest {
/**
* 图片,语音,视频,表情,文件,音频存档消息,音频共享文档消息调用 获取媒体消息
*/
- List mediaType = Arrays.asList(new String[]{"image", "voice", "video", "emotion", "file", "meeting_voice_call", "voip_doc_share"});
+ List mediaType = Arrays.asList("image", "voice", "video", "emotion", "file",
+ "meeting_voice_call", "voip_doc_share");
// 模拟多次拉取数据,根据seq拉取
for (int i = 0; i < 3; i++) {
@@ -179,7 +190,8 @@ public class WxCpMsgAuditTest {
// 获取消息数据
// https://developer.work.weixin.qq.com/document/path/91774
- final WxCpChatModel decryptData = cpService.getMsgAuditService().getDecryptData(chatDatas.getSdk(), chatData, 2);
+ final WxCpChatModel decryptData = cpService.getMsgAuditService().getDecryptData(chatDatas.getSdk(),
+ chatData, 2);
log.info("获取消息数据为:{}", decryptData.toJson());
/**
@@ -239,7 +251,8 @@ public class WxCpMsgAuditTest {
md5Sum = decryptData.getVoiceId();
sdkFileId = decryptData.getMeetingVoiceCall().getSdkFileId();
- for (WxCpChatModel.MeetingVoiceCall.DemoFileData demofiledata : decryptData.getMeetingVoiceCall().getDemoFileData()) {
+ for (WxCpChatModel.MeetingVoiceCall.DemoFileData demofiledata :
+ decryptData.getMeetingVoiceCall().getDemoFileData()) {
String demoFileDataFileName = demofiledata.getFileName();
suffix = demoFileDataFileName.substring(demoFileDataFileName.lastIndexOf(".") + 1);
}
@@ -283,8 +296,12 @@ public class WxCpMsgAuditTest {
/**
* 文本
*/
-// String text = "{\"msgid\":\"CAQQluDa4QUY0On2rYSAgAMgzPrShAE=\",\"action\":\"send\",\"from\":\"XuJinSheng\",\"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":1547087894783,\"msgtype\":\"text\",\"text\":{\"content\":\"test\"}}";
- String text = "{\"msgid\":\"CAQQluDa4QUY0On2rYSAgAMgzPrShAE=\",\"action\":\"send\",\"from\":\"XuJinSheng\",\"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":1547087894783,\"msgtype\":\"text\",\"text\":{\"content\":\"这是一条引用/回复消息:\\\"\\n------\\n@nick777\"}}";
+// String text = "{\"msgid\":\"CAQQluDa4QUY0On2rYSAgAMgzPrShAE=\",\"action\":\"send\",\"from\":\"XuJinSheng\",
+// \"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":1547087894783,\"msgtype\":\"text\",
+// \"text\":{\"content\":\"test\"}}";
+ String text = "{\"msgid\":\"CAQQluDa4QUY0On2rYSAgAMgzPrShAE=\",\"action\":\"send\",\"from\":\"XuJinSheng\"," +
+ "\"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":1547087894783,\"msgtype\":\"text\"," +
+ "\"text\":{\"content\":\"这是一条引用/回复消息:\\\"\\n------\\n@nick777\"}}";
WxCpChatModel modelText = WxCpChatModel.fromJson(text);
log.info("数据为:" + modelText.toJson());
@@ -292,7 +309,11 @@ public class WxCpMsgAuditTest {
/**
* 图片
*/
- String image = "{\"msgid\":\"CAQQvPnc4QUY0On2rYSAgAMgooLa0Q8=\",\"action\":\"send\",\"from\":\"XuJinSheng\",\"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":0,\"msgtype\":\"image\",\"image\":{\"md5sum\":\"50de8e5ae8ffe4f1df7a93841f71993a\",\"filesize\":70961,\"sdkfileid\":\"CtYBMzA2OTAyMDEwMjA0NjIzMDYwMDIwMTAwMDIwNGI3ZmU0MDZlMDIwMzBmNTliMTAyMDQ1YzliNTQ3NzAyMDQ1YzM3M2NiYzA0MjQ2NjM0MzgzNTM0NjEzNTY1MmQzNDYxMzQzODJkMzQzMTYxNjEyZDM5NjEzOTM2MmQ2MTM2NjQ2NDY0NjUzMDY2NjE2NjM1MzcwMjAxMDAwMjAzMDExNTQwMDQxMDUwZGU4ZTVhZThmZmU0ZjFkZjdhOTM4NDFmNzE5OTNhMDIwMTAyMDIwMTAwMDQwMBI4TkRkZk1UWTRPRGcxTVRBek1ETXlORFF6TWw4eE9UUTVOamN6TkRZMlh6RTFORGN4TWpNNU1ERT0aIGEwNGQwYWUyM2JlYzQ3NzQ5MjZhNWZjMjk0ZTEyNTkz\"}}";
+ String image = "{\"msgid\":\"CAQQvPnc4QUY0On2rYSAgAMgooLa0Q8=\",\"action\":\"send\",\"from\":\"XuJinSheng\"," +
+ "\"tolist\":[\"icefog\"],\"roomid\":\"\",\"msgtime\":0,\"msgtype\":\"image\"," +
+ "\"image\":{\"md5sum\":\"50de8e5ae8ffe4f1df7a93841f71993a\",\"filesize\":70961," +
+ "\"sdkfileid" +
+ "\":\"CtYBMzA2OTAyMDEwMjA0NjIzMDYwMDIwMTAwMDIwNGI3ZmU0MDZlMDIwMzBmNTliMTAyMDQ1YzliNTQ3NzAyMDQ1YzM3M2NiYzA0MjQ2NjM0MzgzNTM0NjEzNTY1MmQzNDYxMzQzODJkMzQzMTYxNjEyZDM5NjEzOTM2MmQ2MTM2NjQ2NDY0NjUzMDY2NjE2NjM1MzcwMjAxMDAwMjAzMDExNTQwMDQxMDUwZGU4ZTVhZThmZmU0ZjFkZjdhOTM4NDFmNzE5OTNhMDIwMTAyMDIwMTAwMDQwMBI4TkRkZk1UWTRPRGcxTVRBek1ETXlORFF6TWw4eE9UUTVOamN6TkRZMlh6RTFORGN4TWpNNU1ERT0aIGEwNGQwYWUyM2JlYzQ3NzQ5MjZhNWZjMjk0ZTEyNTkz\"}}";
WxCpChatModel modelImage = WxCpChatModel.fromJson(image);
log.info("数据为:" + modelImage.toJson());
@@ -300,7 +321,9 @@ public class WxCpMsgAuditTest {
/**
* 撤回消息
*/
- String revoke = "{\"msgid\":\"15775510700152506326_1603875615\",\"action\":\"recall\",\"from\":\"kenshin\",\"tolist\":[\"wmUu0zBgAALV7ZymkcMyxvbTe8YdWxxA\"],\"roomid\":\"\",\"msgtime\":1603875615723,\"msgtype\":\"revoke\",\"revoke\":{\"pre_msgid\":\"14822339130656386894_1603875600\"}}";
+ String revoke = "{\"msgid\":\"15775510700152506326_1603875615\",\"action\":\"recall\",\"from\":\"kenshin\"," +
+ "\"tolist\":[\"wmUu0zBgAALV7ZymkcMyxvbTe8YdWxxA\"],\"roomid\":\"\",\"msgtime\":1603875615723," +
+ "\"msgtype\":\"revoke\",\"revoke\":{\"pre_msgid\":\"14822339130656386894_1603875600\"}}";
WxCpChatModel modelRevoke = WxCpChatModel.fromJson(revoke);
log.info("数据为:" + modelRevoke.toJson());
@@ -308,8 +331,14 @@ public class WxCpMsgAuditTest {
/**
* 同意会话聊天内容
*/
- String agree = "{\"msgid\":\"8891446340739254950_1603875826\",\"action\":\"send\",\"from\":\"wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ\",\"tolist\":[\"kenshin\"],\"roomid\":\"\",\"msgtime\":1603875826656,\"msgtype\":\"agree\",\"agree\":{\"userid\":\"wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ\",\"agree_time\":1603875826656}}";
- String disagree = "{\"msgid\":\"17972321270926900092_1603875944\",\"action\":\"send\",\"from\":\"wmErxtDgAA9AW32YyyuYRimKr7D1KWlw\",\"tolist\":[\"kenshin\"],\"roomid\":\"\",\"msgtime\":1603875944122,\"msgtype\":\"disagree\",\"disagree\":{\"userid\":\"wmErxtDgAA9AW32YyyuYRimKr7D1KWlw\",\"disagree_time\":1603875944122}}";
+ String agree = "{\"msgid\":\"8891446340739254950_1603875826\",\"action\":\"send\"," +
+ "\"from\":\"wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ\",\"tolist\":[\"kenshin\"],\"roomid\":\"\"," +
+ "\"msgtime\":1603875826656,\"msgtype\":\"agree\",\"agree\":{\"userid\":\"wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ\"," +
+ "\"agree_time\":1603875826656}}";
+ String disagree = "{\"msgid\":\"17972321270926900092_1603875944\",\"action\":\"send\"," +
+ "\"from\":\"wmErxtDgAA9AW32YyyuYRimKr7D1KWlw\",\"tolist\":[\"kenshin\"],\"roomid\":\"\"," +
+ "\"msgtime\":1603875944122,\"msgtype\":\"disagree\"," +
+ "\"disagree\":{\"userid\":\"wmErxtDgAA9AW32YyyuYRimKr7D1KWlw\",\"disagree_time\":1603875944122}}";
WxCpChatModel modelAgree = WxCpChatModel.fromJson(agree);
WxCpChatModel modelDisagree = WxCpChatModel.fromJson(disagree);
log.info("数据为:" + modelAgree.toJson());
@@ -319,7 +348,12 @@ public class WxCpMsgAuditTest {
/**
* 语音
*/
- String voice = "{\"msgid\":\"10958372969718811103_1603875609\",\"action\":\"send\",\"from\":\"wmGAgeDQAAdBjb8CK4ieMPRm7Cqm-9VA\",\"tolist\":[\"kenshin\"],\"roomid\":\"\",\"msgtime\":1603875609704,\"msgtype\":\"voice\",\"voice\":{\"md5sum\":\"9db09c7fa627c9e53f17736c786a74d5\",\"voice_size\":6810,\"play_length\":10,\"sdkfileid\":\"kcyZjZqOXhETGYxajB2Zkp5Rk8zYzh4RVF3ZzZGdXlXNWRjMUoxVGZxbzFTTDJnQ2YxL0NraVcxUUJNK3VUamhEVGxtNklCbjZmMEEwSGRwN0h2cU1GQTU1MDRSMWdTSmN3b25ZMkFOeG5hMS90Y3hTQ0VXRlVxYkR0Ymt5c3JmV2VVcGt6UlNXR1ZuTFRWVGtudXVldDRjQ3hscDBrMmNhMFFXVnAwT3Y5NGVqVGpOcWNQV2wrbUJwV01TRm9xWmNDRVVrcFY5Nk9OUS9GbXIvSmZvOVVZZjYxUXBkWnMvUENkVFQxTHc2N0drb2pJT0FLZnhVekRKZ1FSNDU3ZnZtdmYvTzZDOG9DRXl2SUNIOHc9PRI0TkRkZk56ZzRNVE13TVRjMk5qQTRNak0yTmw4ek5qRTVOalExTjE4eE5qQXpPRGMxTmpBNRogNzM3MDY2NmM2YTc5Njg3NDdhNzU3NDY0NzY3NTY4NjY=\"}}";
+ String voice = "{\"msgid\":\"10958372969718811103_1603875609\",\"action\":\"send\"," +
+ "\"from\":\"wmGAgeDQAAdBjb8CK4ieMPRm7Cqm-9VA\",\"tolist\":[\"kenshin\"],\"roomid\":\"\"," +
+ "\"msgtime\":1603875609704,\"msgtype\":\"voice\",\"voice\":{\"md5sum\":\"9db09c7fa627c9e53f17736c786a74d5\"," +
+ "\"voice_size\":6810,\"play_length\":10," +
+ "\"sdkfileid" +
+ "\":\"kcyZjZqOXhETGYxajB2Zkp5Rk8zYzh4RVF3ZzZGdXlXNWRjMUoxVGZxbzFTTDJnQ2YxL0NraVcxUUJNK3VUamhEVGxtNklCbjZmMEEwSGRwN0h2cU1GQTU1MDRSMWdTSmN3b25ZMkFOeG5hMS90Y3hTQ0VXRlVxYkR0Ymt5c3JmV2VVcGt6UlNXR1ZuTFRWVGtudXVldDRjQ3hscDBrMmNhMFFXVnAwT3Y5NGVqVGpOcWNQV2wrbUJwV01TRm9xWmNDRVVrcFY5Nk9OUS9GbXIvSmZvOVVZZjYxUXBkWnMvUENkVFQxTHc2N0drb2pJT0FLZnhVekRKZ1FSNDU3ZnZtdmYvTzZDOG9DRXl2SUNIOHc9PRI0TkRkZk56ZzRNVE13TVRjMk5qQTRNak0yTmw4ek5qRTVOalExTjE4eE5qQXpPRGMxTmpBNRogNzM3MDY2NmM2YTc5Njg3NDdhNzU3NDY0NzY3NTY4NjY=\"}}";
WxCpChatModel modelVoice = WxCpChatModel.fromJson(voice);
log.info("数据为:" + modelVoice.toJson());
@@ -327,7 +361,12 @@ public class WxCpMsgAuditTest {
/**
* 视频
*/
- String video = "{\"msgid\":\"17955920891003447432_1603875627\",\"action\":\"send\",\"from\":\"kenshin\",\"tolist\":[\"wmGAgeDQAAHuRJbt4ZQI_1cqoQcf41WQ\"],\"roomid\":\"\",\"msgtime\":1603875626823,\"msgtype\":\"video\",\"video\":{\"md5sum\":\"d06fc80c01d6fbffcca3b229ba41eac6\",\"filesize\":15169724,\"play_length\":108,\"sdkfileid\":\"MzAzMjYxMzAzNTYzMzgzMjMyMzQwMjAxMDAwMjA0MDBlNzc4YzAwNDEwZDA2ZmM4MGMwMWQ2ZmJmZmNjYTNiMjI5YmE0MWVhYzYwMjAxMDQwMjAxMDAwNDAwEjhORGRmTVRZNE9EZzFNREEyTlRjM056QXpORjgxTWpZeE9USTBOek5mTVRZd016ZzNOVFl5Tnc9PRogNTIzNGQ1NTQ5N2RhNDM1ZDhlZTU5ODk4NDQ4NzRhNDk=\"}}";
+ String video = "{\"msgid\":\"17955920891003447432_1603875627\",\"action\":\"send\",\"from\":\"kenshin\"," +
+ "\"tolist\":[\"wmGAgeDQAAHuRJbt4ZQI_1cqoQcf41WQ\"],\"roomid\":\"\",\"msgtime\":1603875626823," +
+ "\"msgtype\":\"video\",\"video\":{\"md5sum\":\"d06fc80c01d6fbffcca3b229ba41eac6\",\"filesize\":15169724," +
+ "\"play_length\":108," +
+ "\"sdkfileid" +
+ "\":\"MzAzMjYxMzAzNTYzMzgzMjMyMzQwMjAxMDAwMjA0MDBlNzc4YzAwNDEwZDA2ZmM4MGMwMWQ2ZmJmZmNjYTNiMjI5YmE0MWVhYzYwMjAxMDQwMjAxMDAwNDAwEjhORGRmTVRZNE9EZzFNREEyTlRjM056QXpORjgxTWpZeE9USTBOek5mTVRZd016ZzNOVFl5Tnc9PRogNTIzNGQ1NTQ5N2RhNDM1ZDhlZTU5ODk4NDQ4NzRhNDk=\"}}";
WxCpChatModel modelVideo = WxCpChatModel.fromJson(video);
log.info("数据为:" + modelVideo.toJson());
@@ -335,7 +374,9 @@ public class WxCpMsgAuditTest {
/**
* 名片
*/
- String card = "{\"msgid\":\"13714216591700685558_1603875680\",\"action\":\"send\",\"from\":\"kenshin\",\"tolist\":[\"wmGAgeDQAAy2Dtr0F8aK4dTuatfm-5Rg\"],\"roomid\":\"\",\"msgtime\":1603875680377,\"msgtype\":\"card\",\"card\":{\"corpname\":\"微信联系人\",\"userid\":\"wmGAgeDQAAGjFmfnP7A3j2JxQDdLNhSw\"}}";
+ String card = "{\"msgid\":\"13714216591700685558_1603875680\",\"action\":\"send\",\"from\":\"kenshin\"," +
+ "\"tolist\":[\"wmGAgeDQAAy2Dtr0F8aK4dTuatfm-5Rg\"],\"roomid\":\"\",\"msgtime\":1603875680377," +
+ "\"msgtype\":\"card\",\"card\":{\"corpname\":\"微信联系人\",\"userid\":\"wmGAgeDQAAGjFmfnP7A3j2JxQDdLNhSw\"}}";
WxCpChatModel modelCard = WxCpChatModel.fromJson(card);
log.info("数据为:" + modelCard.toJson());
@@ -343,7 +384,10 @@ public class WxCpMsgAuditTest {
/**
* 位置
*/
- String location = "{\"msgid\":\"2641513858500683770_1603876152\",\"action\":\"send\",\"from\":\"icefog\",\"tolist\":[\"wmN6etBgAA0sbJ3invMvRxPQDFoq9uWA\"],\"roomid\":\"\",\"msgtime\":1603876152141,\"msgtype\":\"location\",\"location\":{\"longitude\":116.586285899,\"latitude\":39.911125799,\"address\":\"北京市xxx区xxx路xxx大厦x座\",\"title\":\"xxx管理中心\",\"zoom\":15}}";
+ String location = "{\"msgid\":\"2641513858500683770_1603876152\",\"action\":\"send\",\"from\":\"icefog\"," +
+ "\"tolist\":[\"wmN6etBgAA0sbJ3invMvRxPQDFoq9uWA\"],\"roomid\":\"\",\"msgtime\":1603876152141," +
+ "\"msgtype\":\"location\",\"location\":{\"longitude\":116.586285899,\"latitude\":39.911125799," +
+ "\"address\":\"北京市xxx区xxx路xxx大厦x座\",\"title\":\"xxx管理中心\",\"zoom\":15}}";
WxCpChatModel modelLocation = WxCpChatModel.fromJson(location);
log.info("数据为:" + modelLocation.toJson());
@@ -351,7 +395,11 @@ public class WxCpMsgAuditTest {
/**
* 表情
*/
- String emotion = "{\"msgid\":\"6623217619416669654_1603875612\",\"action\":\"send\",\"from\":\"icef\",\"tolist\":[\"wmErxtDgAAhteCglUZH2kUt3rq431qmg\"],\"roomid\":\"\",\"msgtime\":1603875611148,\"msgtype\":\"emotion\",\"emotion\":{\"type\":1,\"width\":290,\"height\":290,\"imagesize\":962604,\"md5sum\":\"94c2b0bba52cc456cb8221b248096612\",\"sdkfileid\":\"4eE1ESTVNalE1TnprMFh6RTJNRE00TnpVMk1UST0aIDc0NzI2NjY1NzE3NTc0Nzg2ZDZlNzg2YTY5NjY2MTYx\"}}";
+ String emotion = "{\"msgid\":\"6623217619416669654_1603875612\",\"action\":\"send\",\"from\":\"icef\"," +
+ "\"tolist\":[\"wmErxtDgAAhteCglUZH2kUt3rq431qmg\"],\"roomid\":\"\",\"msgtime\":1603875611148," +
+ "\"msgtype\":\"emotion\",\"emotion\":{\"type\":1,\"width\":290,\"height\":290,\"imagesize\":962604," +
+ "\"md5sum\":\"94c2b0bba52cc456cb8221b248096612\"," +
+ "\"sdkfileid\":\"4eE1ESTVNalE1TnprMFh6RTJNRE00TnpVMk1UST0aIDc0NzI2NjY1NzE3NTc0Nzg2ZDZlNzg2YTY5NjY2MTYx\"}}";
WxCpChatModel modelEmotion = WxCpChatModel.fromJson(emotion);
log.info("数据为:" + modelEmotion.toJson());
@@ -359,7 +407,12 @@ public class WxCpMsgAuditTest {
/**
* 文件
*/
- String file = "{\"msgid\":\"18039699423706571225_1603875608\",\"action\":\"send\",\"from\":\"kens\",\"tolist\":[\"wmErxtDgAArDlFIhf76O6w4GxU81al8w\"],\"roomid\":\"\",\"msgtime\":1603875608214,\"msgtype\":\"file\",\"file\":{\"md5sum\":\"18e93fc2ea884df23b3d2d3b8667b9f0\",\"filename\":\"资料.docx\",\"fileext\":\"docx\",\"filesize\":18181,\"sdkfileid\":\"E4ODRkZjIzYjNkMmQzYjg2NjdiOWYwMDIwMTA1MDIwMTAwMDQwMBI4TkRkZk1UWTRPRGcxTURrek9UZzBPVEF6TTE4eE1EUXpOVGcxTlRVNVh6RTJNRE00TnpVMk1EZz0aIDMwMzkzMzY0NjEzNjM3NjY2NDY1NjMzNjYxMzIzNzYx\"}}";
+ String file = "{\"msgid\":\"18039699423706571225_1603875608\",\"action\":\"send\",\"from\":\"kens\"," +
+ "\"tolist\":[\"wmErxtDgAArDlFIhf76O6w4GxU81al8w\"],\"roomid\":\"\",\"msgtime\":1603875608214," +
+ "\"msgtype\":\"file\",\"file\":{\"md5sum\":\"18e93fc2ea884df23b3d2d3b8667b9f0\",\"filename\":\"资料.docx\"," +
+ "\"fileext\":\"docx\",\"filesize\":18181," +
+ "\"sdkfileid" +
+ "\":\"E4ODRkZjIzYjNkMmQzYjg2NjdiOWYwMDIwMTA1MDIwMTAwMDQwMBI4TkRkZk1UWTRPRGcxTURrek9UZzBPVEF6TTE4eE1EUXpOVGcxTlRVNVh6RTJNRE00TnpVMk1EZz0aIDMwMzkzMzY0NjEzNjM3NjY2NDY1NjMzNjYxMzIzNzYx\"}}";
WxCpChatModel modelFile = WxCpChatModel.fromJson(file);
log.info("数据为:" + modelFile.toJson());
@@ -367,7 +420,10 @@ public class WxCpMsgAuditTest {
/**
* 链接
*/
- String link = "{\"msgid\":\"11788441727514772650_1603875624\",\"action\":\"send\",\"from\":\"kenshin\",\"tolist\":[\"0000726\"],\"roomid\":\"\",\"msgtime\":1603875624476,\"msgtype\":\"link\",\"link\":{\"title\":\"邀请你加入群聊\",\"description\":\"技术支持群,进入可查看详情\",\"link_url\":\"https://work.weixin.qq.com/wework_admin/external_room/join/exceed?vcode=xxx\",\"image_url\":\"https://wework.qpic.cn/wwpic/xxx/0\"}}";
+ String link = "{\"msgid\":\"11788441727514772650_1603875624\",\"action\":\"send\",\"from\":\"kenshin\"," +
+ "\"tolist\":[\"0000726\"],\"roomid\":\"\",\"msgtime\":1603875624476,\"msgtype\":\"link\"," +
+ "\"link\":{\"title\":\"邀请你加入群聊\",\"description\":\"技术支持群,进入可查看详情\",\"link_url\":\"https://work.weixin.qq" +
+ ".com/wework_admin/external_room/join/exceed?vcode=xxx\",\"image_url\":\"https://wework.qpic.cn/wwpic/xxx/0\"}}";
WxCpChatModel modelLink = WxCpChatModel.fromJson(link);
log.info("数据为:" + modelLink.toJson());
@@ -375,7 +431,10 @@ public class WxCpMsgAuditTest {
/**
* 小程序消息
*/
- String weapp = "{\"msgid\":\"11930598857592605935_1603875608\",\"action\":\"send\",\"from\":\"kens\",\"tolist\":[\"wmGAgeDQAAsgQetTQGqRbMxrkodpM3fA\"],\"roomid\":\"\",\"msgtime\":1603875608691,\"msgtype\":\"weapp\",\"weapp\":{\"title\":\"开始聊天前请仔细阅读服务须知事项\",\"description\":\"客户需同意存档聊天记录\",\"username\":\"xxx@app\",\"displayname\":\"服务须知\"}}";
+ String weapp = "{\"msgid\":\"11930598857592605935_1603875608\",\"action\":\"send\",\"from\":\"kens\"," +
+ "\"tolist\":[\"wmGAgeDQAAsgQetTQGqRbMxrkodpM3fA\"],\"roomid\":\"\",\"msgtime\":1603875608691," +
+ "\"msgtype\":\"weapp\",\"weapp\":{\"title\":\"开始聊天前请仔细阅读服务须知事项\",\"description\":\"客户需同意存档聊天记录\"," +
+ "\"username\":\"xxx@app\",\"displayname\":\"服务须知\"}}";
WxCpChatModel modelWeapp = WxCpChatModel.fromJson(weapp);
log.info("数据为:" + modelWeapp.toJson());
@@ -383,7 +442,11 @@ public class WxCpMsgAuditTest {
/**
* 会话记录消息
*/
- String chatrecord = "{\"msgid\":\"11354299838102555191_1603875658\",\"action\":\"send\",\"from\":\"ken\",\"tolist\":[\"icef\"],\"roomid\":\"\",\"msgtime\":1603875657905,\"msgtype\":\"chatrecord\",\"chatrecord\":{\"title\":\"群聊\",\"item\":[{\"type\":\"ChatRecordText\",\"msgtime\":1603875610,\"content\":\"{\\\"content\\\":\\\"test\\\"}\",\"from_chatroom\":false},{\"type\":\"ChatRecordText\",\"msgtime\":1603875620,\"content\":\"{\\\"content\\\":\\\"test2\\\"}\",\"from_chatroom\":false}]}}";
+ String chatrecord = "{\"msgid\":\"11354299838102555191_1603875658\",\"action\":\"send\",\"from\":\"ken\"," +
+ "\"tolist\":[\"icef\"],\"roomid\":\"\",\"msgtime\":1603875657905,\"msgtype\":\"chatrecord\"," +
+ "\"chatrecord\":{\"title\":\"群聊\",\"item\":[{\"type\":\"ChatRecordText\",\"msgtime\":1603875610," +
+ "\"content\":\"{\\\"content\\\":\\\"test\\\"}\",\"from_chatroom\":false},{\"type\":\"ChatRecordText\"," +
+ "\"msgtime\":1603875620,\"content\":\"{\\\"content\\\":\\\"test2\\\"}\",\"from_chatroom\":false}]}}";
WxCpChatModel modelChatRecord = WxCpChatModel.fromJson(chatrecord);
log.info("数据为:" + modelChatRecord.toJson());
@@ -391,7 +454,12 @@ public class WxCpMsgAuditTest {
/**
* 填表消息
*/
- String collect = "{\"msgid\":\"2500536226619379797_1576034482\",\"action\":\"send\",\"from\":\"nick\",\"tolist\":[\"XuJinSheng\",\"15108264797\"],\"roomid\":\"wrjc7bDwYAOAhf9quEwRRxyyoMm0QAAA\",\"msgtime\":1576034482344,\"msgtype\":\"collect\",\"collect\":{\"room_name\":\"这是一个群\",\"creator\":\"nick\",\"create_time\":\"2019-12-11 11:21:22\",\"title\":\"这是填表title\",\"details\":[{\"id\":1,\"ques\":\"表项1,文本\",\"type\":\"Text\"},{\"id\":2,\"ques\":\"表项2,数字\",\"type\":\"Number\"},{\"id\":3,\"ques\":\"表项3,日期\",\"type\":\"Date\"},{\"id\":4,\"ques\":\"表项4,时间\",\"type\":\"Time\"}]}}";
+ String collect = "{\"msgid\":\"2500536226619379797_1576034482\",\"action\":\"send\",\"from\":\"nick\"," +
+ "\"tolist\":[\"XuJinSheng\",\"15108264797\"],\"roomid\":\"wrjc7bDwYAOAhf9quEwRRxyyoMm0QAAA\"," +
+ "\"msgtime\":1576034482344,\"msgtype\":\"collect\",\"collect\":{\"room_name\":\"这是一个群\",\"creator\":\"nick\"," +
+ "\"create_time\":\"2019-12-11 11:21:22\",\"title\":\"这是填表title\",\"details\":[{\"id\":1,\"ques\":\"表项1,文本\"," +
+ "\"type\":\"Text\"},{\"id\":2,\"ques\":\"表项2,数字\",\"type\":\"Number\"},{\"id\":3,\"ques\":\"表项3,日期\"," +
+ "\"type\":\"Date\"},{\"id\":4,\"ques\":\"表项4,时间\",\"type\":\"Time\"}]}}";
WxCpChatModel modelCollect = WxCpChatModel.fromJson(collect);
log.info("数据为:" + modelCollect.toJson());
@@ -399,7 +467,9 @@ public class WxCpMsgAuditTest {
/**
* 红包消息
*/
- String redpacket = "{\"msgid\":\"333590477316965370_1603877439\",\"action\":\"send\",\"from\":\"kens\",\"tolist\":[\"1000000444696\"],\"roomid\":\"\",\"msgtime\":1603877439038,\"msgtype\":\"redpacket\",\"redpacket\":{\"type\":1,\"wish\":\"恭喜发财,大吉大利\",\"totalcnt\":1,\"totalamount\":3000}}";
+ String redpacket = "{\"msgid\":\"333590477316965370_1603877439\",\"action\":\"send\",\"from\":\"kens\"," +
+ "\"tolist\":[\"1000000444696\"],\"roomid\":\"\",\"msgtime\":1603877439038,\"msgtype\":\"redpacket\"," +
+ "\"redpacket\":{\"type\":1,\"wish\":\"恭喜发财,大吉大利\",\"totalcnt\":1,\"totalamount\":3000}}";
WxCpChatModel modelRedpacket = WxCpChatModel.fromJson(redpacket);
log.info("数据为:" + modelRedpacket.toJson());
@@ -407,7 +477,10 @@ public class WxCpMsgAuditTest {
/**
* 会议邀请信息
*/
- String meeting = "{\"msgid\":\"5935786683775673543_1603877328\",\"action\":\"send\",\"from\":\"ken\",\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr2vOpDgAAN4zVWKbS\",\"msgtime\":1603877328914,\"msgtype\":\"meeting\",\"meeting\":{\"topic\":\"夕会\",\"starttime\":1603877400,\"endtime\":1603881000,\"address\":\"\",\"remarks\":\"\",\"meetingtype\":102,\"meetingid\":1210342560,\"status\":1}}";
+ String meeting = "{\"msgid\":\"5935786683775673543_1603877328\",\"action\":\"send\",\"from\":\"ken\"," +
+ "\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr2vOpDgAAN4zVWKbS\",\"msgtime\":1603877328914," +
+ "\"msgtype\":\"meeting\",\"meeting\":{\"topic\":\"夕会\",\"starttime\":1603877400,\"endtime\":1603881000," +
+ "\"address\":\"\",\"remarks\":\"\",\"meetingtype\":102,\"meetingid\":1210342560,\"status\":1}}";
WxCpChatModel modelMeeting = WxCpChatModel.fromJson(meeting);
log.info("数据为:" + modelMeeting.toJson());
@@ -415,7 +488,8 @@ public class WxCpMsgAuditTest {
/**
* 切换企业日志
*/
- String switchlog = "{\"msgid\":\"125289002219525886280\",\"action\":\"switch\",\"time\":1554119421840,\"user\":\"XuJinSheng\"}";
+ String switchlog = "{\"msgid\":\"125289002219525886280\",\"action\":\"switch\",\"time\":1554119421840," +
+ "\"user\":\"XuJinSheng\"}";
WxCpChatModel modelSwitchLog = WxCpChatModel.fromJson(switchlog);
log.info("数据为:" + modelSwitchLog.toJson());
@@ -423,7 +497,10 @@ public class WxCpMsgAuditTest {
/**
* 在线文档消息
*/
- String docMsg = "{\"msgid\":\"9732089160923053207_1603877765\",\"action\":\"send\",\"from\":\"ken\",\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wrJawBCQAAStr3jxVxEH\",\"msgtime\":1603877765291,\"msgtype\":\"docmsg\",\"doc\":{\"title\":\"测试&演示客户\",\"doc_creator\":\"test\",\"link_url\":\"https://doc.weixin.qq.com/txdoc/excel?docid=xxx\"}}";
+ String docMsg = "{\"msgid\":\"9732089160923053207_1603877765\",\"action\":\"send\",\"from\":\"ken\"," +
+ "\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wrJawBCQAAStr3jxVxEH\",\"msgtime\":1603877765291," +
+ "\"msgtype\":\"docmsg\",\"doc\":{\"title\":\"测试&演示客户\",\"doc_creator\":\"test\",\"link_url\":\"https://doc" +
+ ".weixin.qq.com/txdoc/excel?docid=xxx\"}}";
WxCpChatModel modelDocMsg = WxCpChatModel.fromJson(docMsg);
log.info("数据为:" + modelDocMsg.toJson());
@@ -431,7 +508,9 @@ public class WxCpMsgAuditTest {
/**
* MarkDown格式消息
*/
- String markDown = "{\"msgid\":\"7546287934688259248_1603875715\",\"action\":\"send\",\"from\":\"ken\",\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr0SfLCgAAgCaCPeM33UNe\",\"msgtime\":1603875715782,\"msgtype\":\"markdown\",\"info\":{\"content\":\"请前往系统查看,谢谢。\"}}";
+ String markDown = "{\"msgid\":\"7546287934688259248_1603875715\",\"action\":\"send\",\"from\":\"ken\"," +
+ "\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr0SfLCgAAgCaCPeM33UNe\",\"msgtime\":1603875715782," +
+ "\"msgtype\":\"markdown\",\"info\":{\"content\":\"请前往系统查看,谢谢。\"}}";
WxCpChatModel modelMarkDown = WxCpChatModel.fromJson(markDown);
log.info("数据为:" + modelMarkDown.toJson());
@@ -439,7 +518,10 @@ public class WxCpMsgAuditTest {
/**
* 图文消息
*/
- String news = "{\"msgid\":\"118732825779547782215\",\"action\":\"send\",\"from\":\"kens\",\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wrErxtDgAA0jgXE5\",\"msgtime\":1603876045165,\"msgtype\":\"news\",\"info\":{\"item\":[{\"title\":\"service \",\"description\":\"test\",\"url\":\"http://xxx\",\"picurl\":\"https://www.qq.com/xxx.jpg\"}]}}";
+ String news = "{\"msgid\":\"118732825779547782215\",\"action\":\"send\",\"from\":\"kens\",\"tolist\":[\"icef\"," +
+ "\"test\"],\"roomid\":\"wrErxtDgAA0jgXE5\",\"msgtime\":1603876045165,\"msgtype\":\"news\"," +
+ "\"info\":{\"item\":[{\"title\":\"service \",\"description\":\"test\",\"url\":\"http://xxx\"," +
+ "\"picurl\":\"https://www.qq.com/xxx.jpg\"}]}}";
WxCpChatModel modelNews = WxCpChatModel.fromJson(news);
log.info("数据为:" + modelNews.toJson());
@@ -447,7 +529,11 @@ public class WxCpMsgAuditTest {
/**
* 日程消息
*/
- String calendar = "{\"msgid\":\"2345881211604379705_1603877680\",\"action\":\"send\",\"from\":\"ken\",\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr2LO0CAAAFrTZCGWWAxBA\",\"msgtime\":1603877680795,\"msgtype\":\"calendar\",\"calendar\":{\"title\":\"xxx业绩复盘会\",\"creatorname\":\"test\",\"attendeename\":[\"aaa\",\"bbb\"],\"starttime\":1603882800,\"endtime\":1603886400,\"place\":\"\",\"remarks\":\"\"}}";
+ String calendar = "{\"msgid\":\"2345881211604379705_1603877680\",\"action\":\"send\",\"from\":\"ken\"," +
+ "\"tolist\":[\"icef\",\"test\"],\"roomid\":\"wr2LO0CAAAFrTZCGWWAxBA\",\"msgtime\":1603877680795," +
+ "\"msgtype\":\"calendar\",\"calendar\":{\"title\":\"xxx业绩复盘会\",\"creatorname\":\"test\"," +
+ "\"attendeename\":[\"aaa\",\"bbb\"],\"starttime\":1603882800,\"endtime\":1603886400,\"place\":\"\"," +
+ "\"remarks\":\"\"}}";
WxCpChatModel modelCalendar = WxCpChatModel.fromJson(calendar);
log.info("数据为:" + modelCalendar.toJson());
@@ -455,7 +541,13 @@ public class WxCpMsgAuditTest {
/**
* 混合消息
*/
- String mixed = "{\"msgid\":\"DAQQluDa4QUY0On4kYSABAMgzPrShAE=\",\"action\":\"send\",\"from\":\"HeMiao\",\"tolist\":[\"HeChangTian\",\"LiuZeYu\"],\"roomid\":\"wr_tZ2BwAAUwHpYMwy9cIWqnlU3Hzqfg\",\"msgtime\":1577414359072,\"msgtype\":\"mixed\",\"mixed\":{\"item\":[{\"type\":\"text\",\"content\":\"{\\\"content\\\":\\\"你好[微笑]\\\\n\\\"}\"},{\"type\":\"image\",\"content\":\"{\\\"md5sum\\\":\\\"368b6c18c82e6441bfd89b343e9d2429\\\",\\\"filesize\\\":13177,\\\"sdkfileid\\\":\\\"CtYBMzA2OTAyMDEwMjA0NjIzMDYwMDIwMTAwMDWwNDVmYWY4Y2Q3MDIwMzBmNTliMTAyMDQwYzljNTQ3NzAyMDQ1ZTA1NmFlMjA0MjQ2NjM0NjIzNjY2MzYzNTMyMmQzNzYxMzQ2NDJkMzQ2MjYxNjQyZDM4MzMzMzM4MmQ3MTYyMzczMTM4NjM2NDYxMzczMjY2MzkwMjAxMDAwMjAzMDIwMDEwMDQxMDM2OGI2YzE4YzgyZTY0NDFiZmQ4OWIyNDNlOWQyNDI4MDIwMTAyMDIwMTAwMDQwMBI4TkRkZk2UWTRPRGcxTVRneE5URTFNRGc1TVY4eE1UTTFOak0yTURVeFh6RTFOemMwTVRNek5EYz0aIDQzMTY5NDFlM2MxZDRmZjhhMjEwY2M0NDQzZGUXOTEy\\\"}\"}]}}";
+ String mixed = "{\"msgid\":\"DAQQluDa4QUY0On4kYSABAMgzPrShAE=\",\"action\":\"send\",\"from\":\"HeMiao\"," +
+ "\"tolist\":[\"HeChangTian\",\"LiuZeYu\"],\"roomid\":\"wr_tZ2BwAAUwHpYMwy9cIWqnlU3Hzqfg\"," +
+ "\"msgtime\":1577414359072,\"msgtype\":\"mixed\",\"mixed\":{\"item\":[{\"type\":\"text\"," +
+ "\"content\":\"{\\\"content\\\":\\\"你好[微笑]\\\\n\\\"}\"},{\"type\":\"image\"," +
+ "\"content\":\"{\\\"md5sum\\\":\\\"368b6c18c82e6441bfd89b343e9d2429\\\",\\\"filesize\\\":13177," +
+ "\\\"sdkfileid" +
+ "\\\":\\\"CtYBMzA2OTAyMDEwMjA0NjIzMDYwMDIwMTAwMDWwNDVmYWY4Y2Q3MDIwMzBmNTliMTAyMDQwYzljNTQ3NzAyMDQ1ZTA1NmFlMjA0MjQ2NjM0NjIzNjY2MzYzNTMyMmQzNzYxMzQ2NDJkMzQ2MjYxNjQyZDM4MzMzMzM4MmQ3MTYyMzczMTM4NjM2NDYxMzczMjY2MzkwMjAxMDAwMjAzMDIwMDEwMDQxMDM2OGI2YzE4YzgyZTY0NDFiZmQ4OWIyNDNlOWQyNDI4MDIwMTAyMDIwMTAwMDQwMBI4TkRkZk2UWTRPRGcxTVRneE5URTFNRGc1TVY4eE1UTTFOak0yTURVeFh6RTFOemMwTVRNek5EYz0aIDQzMTY5NDFlM2MxZDRmZjhhMjEwY2M0NDQzZGUXOTEy\\\"}\"}]}}";
WxCpChatModel modelMixed = WxCpChatModel.fromJson(mixed);
log.info("获取混合消息,文件对象为:{}", modelMixed.getMixed().getItem().get(0).getContent());
@@ -468,7 +560,12 @@ public class WxCpMsgAuditTest {
/**
* 音频存档消息
*/
- String meetingVoiceCall = "{\"msgid\":\"17952229780246929345_1594197637\",\"action\":\"send\",\"from\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"tolist\":[\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\"],\"msgtime\":1594197581203,\"msgtype\":\"meeting_voice_call\",\"voiceid\":\"grb8a4c48a3c094a70982c518d55e40557\",\"meeting_voice_call\":{\"endtime\":1594197635,\"sdkfileid\":\"CpsBKjAqd0xhb2JWRUJldGtwcE5DVTB6UjRUalN6c09vTjVyRnF4YVJ5M24rZC9YcHF3cHRPVzRwUUlaMy9iTytFcnc0SlBkZDU1YjRNb0MzbTZtRnViOXV5WjUwZUIwKzhjbU9uRUlxZ3pyK2VXSVhUWVN2ejAyWFJaTldGSkRJVFl0aUhkcVdjbDJ1L2RPbjJsRlBOamJaVDNnPT0SOE5EZGZNVFk0T0RnMU16YzVNVGt5T1RJMk9GOHhNalk0TXpBeE9EZzJYekUxT1RReE9UYzJNemM9GiA3YTYyNzA3NTY4Nzc2MTY3NzQ2MTY0NzA2ZTc4NjQ2OQ==\",\"demofiledata\":[{\"filename\":\"65eb1cdd3e7a3c1740ecd74220b6c627.docx\",\"demooperator\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"starttime\":1594197599,\"endtime\":1594197609}],\"sharescreendata\":[{\"share\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"starttime\":1594197624,\"endtime\":1594197624}]}}";
+ String meetingVoiceCall = "{\"msgid\":\"17952229780246929345_1594197637\",\"action\":\"send\"," +
+ "\"from\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"tolist\":[\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\"]," +
+ "\"msgtime\":1594197581203,\"msgtype\":\"meeting_voice_call\"," +
+ "\"voiceid\":\"grb8a4c48a3c094a70982c518d55e40557\",\"meeting_voice_call\":{\"endtime\":1594197635," +
+ "\"sdkfileid" +
+ "\":\"CpsBKjAqd0xhb2JWRUJldGtwcE5DVTB6UjRUalN6c09vTjVyRnF4YVJ5M24rZC9YcHF3cHRPVzRwUUlaMy9iTytFcnc0SlBkZDU1YjRNb0MzbTZtRnViOXV5WjUwZUIwKzhjbU9uRUlxZ3pyK2VXSVhUWVN2ejAyWFJaTldGSkRJVFl0aUhkcVdjbDJ1L2RPbjJsRlBOamJaVDNnPT0SOE5EZGZNVFk0T0RnMU16YzVNVGt5T1RJMk9GOHhNalk0TXpBeE9EZzJYekUxT1RReE9UYzJNemM9GiA3YTYyNzA3NTY4Nzc2MTY3NzQ2MTY0NzA2ZTc4NjQ2OQ==\",\"demofiledata\":[{\"filename\":\"65eb1cdd3e7a3c1740ecd74220b6c627.docx\",\"demooperator\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"starttime\":1594197599,\"endtime\":1594197609}],\"sharescreendata\":[{\"share\":\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\",\"starttime\":1594197624,\"endtime\":1594197624}]}}";
WxCpChatModel modelMeetingVoiceCall = WxCpChatModel.fromJson(meetingVoiceCall);
log.info("数据为:" + modelMeetingVoiceCall.toJson());
@@ -476,7 +573,13 @@ public class WxCpMsgAuditTest {
/**
* 音频共享文档消息
*/
- String voipDocShare = "{\"msgid\":\"16527954622422422847_1594199256\",\"action\":\"send\",\"from\":\"18002520162\",\"tolist\":[\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\"],\"msgtime\":1594199235014,\"msgtype\":\"voip_doc_share\",\"voipid\":\"gr2751c98b19300571f8afb3b74514bd32\",\"voip_doc_share\":{\"filename\":\"欢迎使用微盘.pdf.pdf\",\"md5sum\":\"ff893900f24e55e216e617a40e5c4648\",\"filesize\":4400654,\"sdkfileid\":\"CpsBKjAqZUlLdWJMd2gvQ1JxMzd0ZjlpdW5mZzJOOE9JZm5kbndvRmRqdnBETjY0QlcvdGtHSFFTYm95dHM2VlllQXhkUUN5KzRmSy9KT3pudnA2aHhYZFlPemc2aVZ6YktzaVh3YkFPZHlqNnl2L2MvcGlqcVRjRTlhZEZsOGlGdHJpQ2RWSVNVUngrVFpuUmo3TGlPQ1BJemlRPT0SOE5EZGZNVFk0T0RnMU16YzVNVGt5T1RJMk9GODFNelUyTlRBd01qQmZNVFU1TkRFNU9USTFOZz09GiA3YTcwNmQ2Zjc5NjY3MDZjNjY2Zjc4NzI3NTZmN2E2YQ==\"}}";
+ String voipDocShare = "{\"msgid\":\"16527954622422422847_1594199256\",\"action\":\"send\"," +
+ "\"from\":\"18002520162\",\"tolist\":[\"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA\"],\"msgtime\":1594199235014," +
+ "\"msgtype\":\"voip_doc_share\",\"voipid\":\"gr2751c98b19300571f8afb3b74514bd32\"," +
+ "\"voip_doc_share\":{\"filename\":\"欢迎使用微盘.pdf.pdf\",\"md5sum\":\"ff893900f24e55e216e617a40e5c4648\"," +
+ "\"filesize\":4400654," +
+ "\"sdkfileid" +
+ "\":\"CpsBKjAqZUlLdWJMd2gvQ1JxMzd0ZjlpdW5mZzJOOE9JZm5kbndvRmRqdnBETjY0QlcvdGtHSFFTYm95dHM2VlllQXhkUUN5KzRmSy9KT3pudnA2aHhYZFlPemc2aVZ6YktzaVh3YkFPZHlqNnl2L2MvcGlqcVRjRTlhZEZsOGlGdHJpQ2RWSVNVUngrVFpuUmo3TGlPQ1BJemlRPT0SOE5EZGZNVFk0T0RnMU16YzVNVGt5T1RJMk9GODFNelUyTlRBd01qQmZNVFU1TkRFNU9USTFOZz09GiA3YTcwNmQ2Zjc5NjY3MDZjNjY2Zjc4NzI3NTZmN2E2YQ==\"}}";
WxCpChatModel modelVoipDocShare = WxCpChatModel.fromJson(voipDocShare);
log.info("数据为:" + modelVoipDocShare.toJson());
@@ -484,7 +587,11 @@ public class WxCpMsgAuditTest {
/**
* 互通红包消息
*/
- String externalRedpacket = "{\"msgid\":\"8632214264349267353_1603786184\",\"action\":\"send\",\"from\":\"woJ7ijBwAAmqwojT8r_DaNMbr_NAvaag\",\"tolist\":[\"woJ7ijBwAA6SjS_sIyPLZtyEPJlT7Cfw\",\"tiny-six768\"],\"roomid\":\"wrJ7ijBwAAG1vly_DzVI72Ghc-PtA5Dw\",\"msgtime\":1603786183955,\"msgtype\":\"external_redpacket\",\"redpacket\":{\"type\":1,\"wish\":\"恭喜发财,大吉大利\",\"totalcnt\":2,\"totalamount\":20}}";
+ String externalRedpacket = "{\"msgid\":\"8632214264349267353_1603786184\",\"action\":\"send\"," +
+ "\"from\":\"woJ7ijBwAAmqwojT8r_DaNMbr_NAvaag\",\"tolist\":[\"woJ7ijBwAA6SjS_sIyPLZtyEPJlT7Cfw\"," +
+ "\"tiny-six768\"],\"roomid\":\"wrJ7ijBwAAG1vly_DzVI72Ghc-PtA5Dw\",\"msgtime\":1603786183955," +
+ "\"msgtype\":\"external_redpacket\",\"redpacket\":{\"type\":1,\"wish\":\"恭喜发财,大吉大利\",\"totalcnt\":2," +
+ "\"totalamount\":20}}";
WxCpChatModel modelExternalRedpacket = WxCpChatModel.fromJson(externalRedpacket);
log.info("数据为:" + modelExternalRedpacket.toJson());
@@ -492,7 +599,10 @@ public class WxCpMsgAuditTest {
/**
* 视频号消息
*/
- String sphfeed = "{\"msgid\":\"5702551662099334532_1619511584_external\",\"action\":\"send\",\"from\":\"yangzhu1\",\"tolist\":[\"wmJSb5CgAA4aWXWndJspQGpJMDbsMwMA\"],\"roomid\":\"\",\"msgtime\":1619511584444,\"msgtype\":\"sphfeed\",\"sphfeed\":{\"feed_type\":4,\"sph_name\":\"云游天地旅行家\",\"feed_desc\":\"瑞士丨盖尔默缆车,名副其实的过山车~\\n\\n#旅行#风景#热门\"}}";
+ String sphfeed = "{\"msgid\":\"5702551662099334532_1619511584_external\",\"action\":\"send\"," +
+ "\"from\":\"yangzhu1\",\"tolist\":[\"wmJSb5CgAA4aWXWndJspQGpJMDbsMwMA\"],\"roomid\":\"\"," +
+ "\"msgtime\":1619511584444,\"msgtype\":\"sphfeed\",\"sphfeed\":{\"feed_type\":4,\"sph_name\":\"云游天地旅行家\"," +
+ "\"feed_desc\":\"瑞士丨盖尔默缆车,名副其实的过山车~\\n\\n#旅行#风景#热门\"}}";
WxCpChatModel modelSphFeed = WxCpChatModel.fromJson(sphfeed);
log.info("数据为:" + modelSphFeed.toJson());
@@ -512,7 +622,7 @@ public class WxCpMsgAuditTest {
WxCpCheckAgreeRequest.Info info = new WxCpCheckAgreeRequest.Info();
info.setUserid("wangkai");
info.setExteranalOpenId("wmOQpTDwAAkOscTrtUlSli0YLU2jcpUg");
- if(info != null){
+ if (info != null) {
userList.add(info);
checkAgreeRequest.setInfo(userList);
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaAgentTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaAgentTest.java
index 2a69fb6a0..badc68f47 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaAgentTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaAgentTest.java
@@ -21,10 +21,10 @@ import java.io.InputStream;
/**
* 企业微信自建应用接口测试类.
* https://developer.work.weixin.qq.com/document/path/90269
- * https://developer.work.weixin.qq.com/document/path/90240#%E5%AE%A1%E6%89%B9%E7%8A%B6%E6%80%81%E9%80%9A%E7%9F%A5%E4%BA%8B%E4%BB%B6
+ * https://developer.work.weixin.qq.com/document/path/90240#%E5%AE%A1%E6%89%B9%E7%8A%B6%E6%80%81%E9%80%9A%E7%9F%A5%E4
+ * %BA%8B%E4%BB%B6
*
- * @author Wang_Wong
- * created on 2022-04-06
+ * @author Wang_Wong created on 2022-04-06
*/
@Slf4j
public class WxCpOaAgentTest {
@@ -33,6 +33,11 @@ public class WxCpOaAgentTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
+ /**
+ * Test.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void test() throws WxErrorException {
@@ -91,7 +96,7 @@ public class WxCpOaAgentTest {
" 0 \n" +
" \n" +
"\n";
- final WxCpXmlMessage mess2 = XStreamTransformer.fromXml(WxCpXmlMessage.class, testXml2);
+ final WxCpXmlMessage mess2 = XStreamTransformer.fromXml(WxCpXmlMessage.class, testXml2);
mess2.setAllFieldsMap(XmlUtils.xml2Map(testXml2));
log.info("xmlJson: {}", JSON.toString(mess2));
@@ -116,7 +121,7 @@ public class WxCpOaAgentTest {
"\t1 \n" +
"\n";
- final WxCpXmlMessage mess = XStreamTransformer.fromXml(WxCpXmlMessage.class, testXml);
+ final WxCpXmlMessage mess = XStreamTransformer.fromXml(WxCpXmlMessage.class, testXml);
mess.setAllFieldsMap(XmlUtils.xml2Map(testXml));
log.info("xmlJson: {}", JSON.toString(mess));
@@ -188,7 +193,14 @@ public class WxCpOaAgentTest {
/**
* Test
*/
- String test = "{\"errcode\":0,\"errmsg\":\"ok\",\"data\":{\"ThirdNo\":\"thirdNoxxx\",\"OpenTemplateId\":\"1234567111\",\"OpenSpName\":\"付款\",\"OpenSpstatus\":1,\"ApplyTime\":1527837645,\"ApplyUsername\":\"jackiejjwu\",\"ApplyUserParty\":\"产品部\",\"ApplyUserImage\":\"http://www.qq.com/xxx.png\",\"ApplyUserId\":\"WuJunJie\",\"ApprovalNodes\":{\"ApprovalNode\":[{\"NodeStatus\":1,\"NodeAttr\":1,\"NodeType\":1,\"Items\":{\"Item\":[{\"ItemName\":\"chauvetxiao\",\"ItemParty\":\"产品部\",\"ItemImage\":\"http://www.qq.com/xxx.png\",\"ItemUserId\":\"XiaoWen\",\"ItemStatus\":1,\"ItemSpeech\":\"\",\"ItemOpTime\":0}]}}]},\"NotifyNodes\":{\"NotifyNode\":[{\"ItemName\":\"jinhuiguo\",\"ItemParty\":\"行政部\",\"ItemImage\":\"http://www.qq.com/xxx.png\",\"ItemUserId\":\"GuoJinHui\"}]},\"ApproverStep\":0}}";
+ String test = "{\"errcode\":0,\"errmsg\":\"ok\",\"data\":{\"ThirdNo\":\"thirdNoxxx\"," +
+ "\"OpenTemplateId\":\"1234567111\",\"OpenSpName\":\"付款\",\"OpenSpstatus\":1,\"ApplyTime\":1527837645," +
+ "\"ApplyUsername\":\"jackiejjwu\",\"ApplyUserParty\":\"产品部\",\"ApplyUserImage\":\"http://www.qq.com/xxx.png\"," +
+ "\"ApplyUserId\":\"WuJunJie\",\"ApprovalNodes\":{\"ApprovalNode\":[{\"NodeStatus\":1,\"NodeAttr\":1," +
+ "\"NodeType\":1,\"Items\":{\"Item\":[{\"ItemName\":\"chauvetxiao\",\"ItemParty\":\"产品部\"," +
+ "\"ItemImage\":\"http://www.qq.com/xxx.png\",\"ItemUserId\":\"XiaoWen\",\"ItemStatus\":1,\"ItemSpeech\":\"\"," +
+ "\"ItemOpTime\":0}]}}]},\"NotifyNodes\":{\"NotifyNode\":[{\"ItemName\":\"jinhuiguo\",\"ItemParty\":\"行政部\"," +
+ "\"ItemImage\":\"http://www.qq.com/xxx.png\",\"ItemUserId\":\"GuoJinHui\"}]},\"ApproverStep\":0}}";
final WxCpOpenApprovalData data = WxCpGsonBuilder.create()
.fromJson(GsonParser.parse(test).get("data"),
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveServiceTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveServiceTest.java
index 14ecdd2f4..dc1c45873 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveServiceTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveServiceTest.java
@@ -29,6 +29,11 @@ public class WxCpOaWeDriveServiceTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
+ /**
+ * Test.
+ *
+ * @throws Exception the exception
+ */
@Test
public void test() throws Exception {
@@ -39,7 +44,8 @@ public class WxCpOaWeDriveServiceTest {
cpService = new WxCpServiceImpl();
cpService.setWxCpConfigStorage(config);
- String createSpace = "{\"userid\":\"USERID\",\"space_name\":\"SPACE_NAME\",\"auth_info\":[{\"type\":1,\"userid\":\"USERID\",\"auth\":2},{\"type\":2,\"departmentid\":2,\"auth\":1}]}";
+ String createSpace = "{\"userid\":\"USERID\",\"space_name\":\"SPACE_NAME\",\"auth_info\":[{\"type\":1," +
+ "\"userid\":\"USERID\",\"auth\":2},{\"type\":2,\"departmentid\":2,\"auth\":1}]}";
WxCpSpaceCreateRequest wxCpSpaceCreateRequest = WxCpSpaceCreateRequest.fromJson(createSpace);
log.info(wxCpSpaceCreateRequest.toJson());
@@ -150,7 +156,7 @@ public class WxCpOaWeDriveServiceTest {
File file = new File("D:/info.log.2022-05-07.0.log");
// File file = new File("D:/16.png");
FileInputStream inputFile = new FileInputStream(file);
- byte[] buffer = new byte[(int)file.length()];
+ byte[] buffer = new byte[(int) file.length()];
inputFile.read(buffer);
inputFile.close();
String encodeBase64Content = Base64.getEncoder().encodeToString(buffer);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthTest.java
index 8beebe860..d922c14dc 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolHealthTest.java
@@ -19,8 +19,7 @@ import java.util.Date;
* 企业微信家校应用 健康上报接口.
* https://developer.work.weixin.qq.com/document/path/93676
*
- * @author Wang_Wong
- * created on : 2022/5/31 9:10
+ * @author Wang_Wong created on : 2022/5/31 9:10
*/
@Slf4j
public class WxCpSchoolHealthTest {
@@ -28,6 +27,11 @@ public class WxCpSchoolHealthTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
+ /**
+ * Test.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void test() throws WxErrorException {
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolTest.java
index aea9f5df7..08843bc40 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolTest.java
@@ -19,8 +19,7 @@ import java.util.Date;
* 企业微信家校应用 复学码相关接口.
* https://developer.work.weixin.qq.com/document/path/93744
*
- * @author Wang_Wong
- * created on : 2022/5/31 9:10
+ * @author Wang_Wong created on : 2022/5/31 9:10
*/
@Slf4j
public class WxCpSchoolTest {
@@ -28,6 +27,11 @@ public class WxCpSchoolTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
+ /**
+ * Test.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void test() throws WxErrorException {
@@ -68,7 +72,9 @@ public class WxCpSchoolTest {
* 获取未观看直播统计
* https://developer.work.weixin.qq.com/document/path/93742
*/
- String str3 = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\",\"stat_info\":{\"students\":[{\"student_userid\":\"zhansan_child\",\"parent_userid\":\"zhangsan\",\"partyids\":[10,11]},{\"student_userid\":\"lisi_child\",\"parent_userid\":\"lisi\",\"partyids\":[5]}]}}";
+ String str3 = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\"," +
+ "\"stat_info\":{\"students\":[{\"student_userid\":\"zhansan_child\",\"parent_userid\":\"zhangsan\"," +
+ "\"partyids\":[10,11]},{\"student_userid\":\"lisi_child\",\"parent_userid\":\"lisi\",\"partyids\":[5]}]}}";
WxCpSchoolUnwatchStat schoolUnwatchStat = WxCpSchoolUnwatchStat.fromJson(str3);
log.info("unwatchStat:{}", schoolUnwatchStat.toJson());
@@ -79,14 +85,24 @@ public class WxCpSchoolTest {
* 获取观看直播统计
* https://developer.work.weixin.qq.com/document/path/93741
*/
- String str2 = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\",\"stat_infoes\":{\"students\":[{\"student_userid\":\"zhansan_child\",\"parent_userid\":\"zhangsan\",\"partyids\":[10,11],\"watch_time\":30,\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":1},{\"student_userid\":\"lisi_child\",\"parent_userid\":\"lisi\",\"partyids\":[10,11],\"watch_time\":30,\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":0}],\"visitors\":[{\"nickname\":\"wx_nickname1\",\"watch_time\":30,\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":1},{\"nickname\":\"wx_nickname2\",\"watch_time\":30,\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":0}]}}";
+ String str2 = "{\"errcode\":0,\"errmsg\":\"ok\",\"ending\":1,\"next_key\":\"NEXT_KEY\"," +
+ "\"stat_infoes\":{\"students\":[{\"student_userid\":\"zhansan_child\",\"parent_userid\":\"zhangsan\"," +
+ "\"partyids\":[10,11],\"watch_time\":30,\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":1}," +
+ "{\"student_userid\":\"lisi_child\",\"parent_userid\":\"lisi\",\"partyids\":[10,11],\"watch_time\":30," +
+ "\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":0}]," +
+ "\"visitors\":[{\"nickname\":\"wx_nickname1\",\"watch_time\":30,\"enter_time\":1586433904," +
+ "\"leave_time\":1586434000,\"is_comment\":1},{\"nickname\":\"wx_nickname2\",\"watch_time\":30," +
+ "\"enter_time\":1586433904,\"leave_time\":1586434000,\"is_comment\":0}]}}";
WxCpSchoolWatchStat wxCpSchoolWatchStat = WxCpSchoolWatchStat.fromJson(str2);
log.info("wxCpSchoolWatchStat:{}", wxCpSchoolWatchStat.toJson());
WxCpSchoolWatchStat watchStat = cpService.getSchoolService().getWatchStat(livingId, "0");
log.info("watchStat:{}", watchStat.toJson());
- String str1 = "{\"errcode\":0,\"errmsg\":\"ok\",\"living_info\":{\"theme\":\"直角三角形讲解\",\"living_start\":1586405229,\"living_duration\":1800,\"anchor_userid\":\"zhangsan\",\"living_range\":{\"partyids\":[1,4,9],\"group_names\":[\"group_name1\",\"group_name2\"]},\"viewer_num\":100,\"comment_num\":110,\"open_replay\":1,\"push_stream_url\":\"https://www.qq.test.com\"}}";
+ String str1 = "{\"errcode\":0,\"errmsg\":\"ok\",\"living_info\":{\"theme\":\"直角三角形讲解\"," +
+ "\"living_start\":1586405229,\"living_duration\":1800,\"anchor_userid\":\"zhangsan\"," +
+ "\"living_range\":{\"partyids\":[1,4,9],\"group_names\":[\"group_name1\",\"group_name2\"]},\"viewer_num\":100," +
+ "\"comment_num\":110,\"open_replay\":1,\"push_stream_url\":\"https://www.qq.test.com\"}}";
WxCpSchoolLivingInfo wxCpSchoolLivingInfo = WxCpSchoolLivingInfo.fromJson(str1);
log.info("str1:{}", wxCpSchoolLivingInfo.toJson());
@@ -102,7 +118,9 @@ public class WxCpSchoolTest {
* 获取学生付款结果
* https://developer.work.weixin.qq.com/document/path/94553
*/
- String paymentResultStr = "{\"errcode\":0,\"errmsg\":\"ok\",\"project_name\":\"学费\",\"amount\":998,\"payment_result\":[{\"student_userid\":\"xxxx\",\"trade_state\":1,\"trade_no\":\"xxxxx\",\"payer_parent_userid\":\"zhangshan\"}]}";
+ String paymentResultStr = "{\"errcode\":0,\"errmsg\":\"ok\",\"project_name\":\"学费\",\"amount\":998," +
+ "\"payment_result\":[{\"student_userid\":\"xxxx\",\"trade_state\":1,\"trade_no\":\"xxxxx\"," +
+ "\"payer_parent_userid\":\"zhangshan\"}]}";
WxCpPaymentResult cpPaymentResult = WxCpPaymentResult.fromJson(paymentResultStr);
log.info("cpPaymentResult:{}", cpPaymentResult.toJson());
@@ -130,14 +148,16 @@ public class WxCpSchoolTest {
* 获取老师健康信息
* https://developer.work.weixin.qq.com/document/path/93744
*/
- WxCpCustomizeHealthInfo teacherCustomizeHealthInfo = cpService.getSchoolService().getTeacherCustomizeHealthInfo(date, null, null);
+ WxCpCustomizeHealthInfo teacherCustomizeHealthInfo =
+ cpService.getSchoolService().getTeacherCustomizeHealthInfo(date, null, null);
log.info("teacherCustomizeHealthInfo为:{}", teacherCustomizeHealthInfo.toJson());
/**
* 获取学生健康信息
* https://developer.work.weixin.qq.com/document/path/93745
*/
- WxCpCustomizeHealthInfo studentCustomizeHealthInfo = cpService.getSchoolService().getStudentCustomizeHealthInfo(date, null, null);
+ WxCpCustomizeHealthInfo studentCustomizeHealthInfo =
+ cpService.getSchoolService().getStudentCustomizeHealthInfo(date, null, null);
log.info("studentCustomizeHealthInfo为:{}", studentCustomizeHealthInfo.toJson());
/**
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolUserTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolUserTest.java
index 3434247d9..b05a7e2ff 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolUserTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpSchoolUserTest.java
@@ -27,8 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* 企业微信家校沟通相关接口.
* https://developer.work.weixin.qq.com/document/path/91638
*
- * @author Wang_Wong
- * created on : 2022/6/18 9:10
+ * @author Wang_Wong created on : 2022/6/18 9:10
*/
@Slf4j
public class WxCpSchoolUserTest {
@@ -36,6 +35,11 @@ public class WxCpSchoolUserTest {
private static WxCpConfigStorage wxCpConfigStorage;
private static WxCpService cpService;
+ /**
+ * Test.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void test() throws WxErrorException {
@@ -50,7 +54,7 @@ public class WxCpSchoolUserTest {
list.add(1);
list.add(2);
list.add(3);
- log.info("list:{}", list.toString());
+ log.info("list:{}", list);
final String userId = "WangKai";
final String exUserId = "wmOQpTDwAAJFHrryZ8I8ALLEZuLHIUKA";
@@ -240,8 +244,10 @@ public class WxCpSchoolUserTest {
" } \n" +
" ] \n" +
"}";
- WxCpBatchUpdateParentRequest batchUpdateParentRequest = WxCpBatchUpdateParentRequest.fromJson(batchUpdateParentRequestParam);
- WxCpBatchResultList batchUpdateParentResult = cpService.getSchoolUserService().batchUpdateParent(batchUpdateParentRequest);
+ WxCpBatchUpdateParentRequest batchUpdateParentRequest =
+ WxCpBatchUpdateParentRequest.fromJson(batchUpdateParentRequestParam);
+ WxCpBatchResultList batchUpdateParentResult =
+ cpService.getSchoolUserService().batchUpdateParent(batchUpdateParentRequest);
/**
@@ -249,7 +255,7 @@ public class WxCpSchoolUserTest {
*
* https://developer.work.weixin.qq.com/document/path/92335
*/
- WxCpBatchResultList batchDeleteParentResult = cpService.getSchoolUserService().batchDeleteParent(new String[]{"abc", userId});
+ WxCpBatchResultList batchDeleteParentResult = cpService.getSchoolUserService().batchDeleteParent("abc", userId);
/**
@@ -337,7 +343,8 @@ public class WxCpSchoolUserTest {
"}";
assertThat(wxCpBatchCreateParentRequest.toJson()).isEqualTo(GsonParser.parse(batchCreateParentRequestParam).toString());
- WxCpBatchResultList batchCreateParentResult = cpService.getSchoolUserService().batchCreateParent(wxCpBatchCreateParentRequest);
+ WxCpBatchResultList batchCreateParentResult =
+ cpService.getSchoolUserService().batchCreateParent(wxCpBatchCreateParentRequest);
// 返回结果
String batchResultStr = "{\n" +
@@ -408,7 +415,8 @@ public class WxCpSchoolUserTest {
"\t\t}\n" +
" ]\n" +
"}";
- WxCpBatchUpdateStudentRequest batchUpdateStudentRequest = WxCpBatchUpdateStudentRequest.fromJson(batchUpdateStudent);
+ WxCpBatchUpdateStudentRequest batchUpdateStudentRequest =
+ WxCpBatchUpdateStudentRequest.fromJson(batchUpdateStudent);
WxCpBatchResultList list3 = cpService.getSchoolUserService().batchUpdateStudent(batchUpdateStudentRequest);
log.info("list3: {}", list3.toJson());
@@ -422,7 +430,8 @@ public class WxCpSchoolUserTest {
String batchDeleteStudent = "{\n" +
"\t\"useridlist\": [\"zhangsan\", \"lisi\"]\n" +
"}\n";
- WxCpBatchDeleteStudentRequest batchDeleteStudentRequest = WxCpBatchDeleteStudentRequest.fromJson(batchDeleteStudent);
+ WxCpBatchDeleteStudentRequest batchDeleteStudentRequest =
+ WxCpBatchDeleteStudentRequest.fromJson(batchDeleteStudent);
WxCpBatchResultList list2 = cpService.getSchoolUserService().batchDeleteStudent(batchDeleteStudentRequest);
log.info("list2: {}", list2.toJson());
@@ -444,7 +453,8 @@ public class WxCpSchoolUserTest {
"\t\t}\n" +
" ]\n" +
"}";
- WxCpBatchCreateStudentRequest batchCreateStudentRequest = WxCpBatchCreateStudentRequest.fromJson(batchCreateStudent);
+ WxCpBatchCreateStudentRequest batchCreateStudentRequest =
+ WxCpBatchCreateStudentRequest.fromJson(batchCreateStudent);
WxCpBatchResultList list1 = cpService.getSchoolUserService().batchCreateStudent(batchCreateStudentRequest);
log.info("list1: {}", list1.toJson());
@@ -568,7 +578,18 @@ public class WxCpSchoolUserTest {
* 家校沟通 获取外部联系人详情
* https://developer.work.weixin.qq.com/document/path/92322
*/
- String str7 = "{\"errcode\":0,\"errmsg\":\"ok\",\"external_contact\":{\"external_userid\":\"woAAAA\",\"name\":\"李四\",\"position\":\"Mangaer\",\"avatar\":\"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0\",\"corp_name\":\"腾讯\",\"corp_full_name\":\"腾讯科技有限公司\",\"type\":2,\"gender\":1,\"unionid\":\"unAAAAA\",\"is_subscribe\":1,\"subscriber_info\":{\"tag_id\":[\"TAG_ID1\",\"TAG_ID2\"],\"remark_mobiles\":[\"10000000000\",\"10000000001\"],\"remark\":\"李小明-爸爸\"},\"external_profile\":{\"external_attr\":[{\"type\":0,\"name\":\"文本名称\",\"text\":{\"value\":\"文本\"}},{\"type\":1,\"name\":\"网页名称\",\"web\":{\"url\":\"http://www.test.com\",\"title\":\"标题\"}},{\"type\":2,\"name\":\"测试app\",\"miniprogram\":{\"appid\":\"wxAAAAA\",\"pagepath\":\"/index\",\"title\":\"my miniprogram\"}}]}},\"follow_user\":[{\"userid\":\"rocky\",\"remark\":\"李部长\",\"description\":\"对接采购事物\",\"createtime\":1525779812,\"tags\":[{\"group_name\":\"标签分组名称\",\"tag_name\":\"标签名称\",\"type\":1}],\"remark_corp_name\":\"腾讯科技\",\"remark_mobiles\":[10000000003,10000000004]},{\"userid\":\"tommy\",\"remark\":\"李总\",\"description\":\"采购问题咨询\",\"createtime\":1525881637,\"state\":\"外联二维码1\"}]}";
+ String str7 = "{\"errcode\":0,\"errmsg\":\"ok\",\"external_contact\":{\"external_userid\":\"woAAAA\"," +
+ "\"name\":\"李四\",\"position\":\"Mangaer\",\"avatar\":\"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0\"," +
+ "\"corp_name\":\"腾讯\",\"corp_full_name\":\"腾讯科技有限公司\",\"type\":2,\"gender\":1,\"unionid\":\"unAAAAA\"," +
+ "\"is_subscribe\":1,\"subscriber_info\":{\"tag_id\":[\"TAG_ID1\",\"TAG_ID2\"]," +
+ "\"remark_mobiles\":[\"10000000000\",\"10000000001\"],\"remark\":\"李小明-爸爸\"}," +
+ "\"external_profile\":{\"external_attr\":[{\"type\":0,\"name\":\"文本名称\",\"text\":{\"value\":\"文本\"}}," +
+ "{\"type\":1,\"name\":\"网页名称\",\"web\":{\"url\":\"http://www.test.com\",\"title\":\"标题\"}},{\"type\":2," +
+ "\"name\":\"测试app\",\"miniprogram\":{\"appid\":\"wxAAAAA\",\"pagepath\":\"/index\",\"title\":\"my " +
+ "miniprogram\"}}]}},\"follow_user\":[{\"userid\":\"rocky\",\"remark\":\"李部长\",\"description\":\"对接采购事物\"," +
+ "\"createtime\":1525779812,\"tags\":[{\"group_name\":\"标签分组名称\",\"tag_name\":\"标签名称\",\"type\":1}]," +
+ "\"remark_corp_name\":\"腾讯科技\",\"remark_mobiles\":[10000000003,10000000004]},{\"userid\":\"tommy\"," +
+ "\"remark\":\"李总\",\"description\":\"采购问题咨询\",\"createtime\":1525881637,\"state\":\"外联二维码1\"}]}";
WxCpExternalContact wxCpExternalContact = WxCpExternalContact.fromJson(str7);
log.info("wxCpExternalContact:{}", wxCpExternalContact.toJson());
@@ -621,7 +642,12 @@ public class WxCpSchoolUserTest {
* 获取部门列表
* https://developer.work.weixin.qq.com/document/path/92343
*/
- String str5 = "{\"errcode\":0,\"errmsg\":\"ok\",\"departments\":[{\"name\":\"一年级\",\"parentid\":1,\"id\":2,\"type\":2,\"register_year\":2018,\"standard_grade\":1,\"order\":1,\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":1},{\"userid\":\"lisi\",\"type\":2}],\"is_graduated\":0},{\"name\":\"一年级一班\",\"parentid\":1,\"id\":3,\"type\":1,\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":3,\"subject\":\"语文\"},{\"userid\":\"lisi\",\"type\":4,\"subject\":\"数学\"}],\"open_group_chat\":1,\"group_chat_id\":\"group_chat_id\"}]}";
+ String str5 = "{\"errcode\":0,\"errmsg\":\"ok\",\"departments\":[{\"name\":\"一年级\",\"parentid\":1,\"id\":2," +
+ "\"type\":2,\"register_year\":2018,\"standard_grade\":1,\"order\":1," +
+ "\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":1},{\"userid\":\"lisi\",\"type\":2}]," +
+ "\"is_graduated\":0},{\"name\":\"一年级一班\",\"parentid\":1,\"id\":3,\"type\":1," +
+ "\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":3,\"subject\":\"语文\"},{\"userid\":\"lisi\"," +
+ "\"type\":4,\"subject\":\"数学\"}],\"open_group_chat\":1,\"group_chat_id\":\"group_chat_id\"}]}";
WxCpDepartmentList wxCpDepartmentList = WxCpDepartmentList.fromJson(str5);
log.info("wxCpDepartmentList:{}", wxCpDepartmentList.toJson());
@@ -639,7 +665,9 @@ public class WxCpSchoolUserTest {
* 更新部门
* https://developer.work.weixin.qq.com/document/path/92341
*/
- String str4 = "{\"name\":\"一年级\",\"parentid\":5,\"id\":2,\"register_year\":2018,\"standard_grade\":1,\"order\":1,\"new_id\":100,\"department_admins\":[{\"op\":0,\"userid\":\"zhangsan\",\"type\":3,\"subject\":\"语文\"},{\"op\":1,\"userid\":\"lisi\",\"type\":4,\"subject\":\"数学\"}]}";
+ String str4 = "{\"name\":\"一年级\",\"parentid\":5,\"id\":2,\"register_year\":2018,\"standard_grade\":1,\"order\":1," +
+ "\"new_id\":100,\"department_admins\":[{\"op\":0,\"userid\":\"zhangsan\",\"type\":3,\"subject\":\"语文\"}," +
+ "{\"op\":1,\"userid\":\"lisi\",\"type\":4,\"subject\":\"数学\"}]}";
WxCpUpdateDepartmentRequest wxCpUpdateDepartmentRequest = WxCpUpdateDepartmentRequest.fromJson(str4);
log.info("wxCpUpdateParentRequest:{}", wxCpUpdateDepartmentRequest.toJson());
@@ -650,7 +678,9 @@ public class WxCpSchoolUserTest {
* 创建部门
* https://developer.work.weixin.qq.com/document/path/92340
*/
- String str3 = "{\"name\":\"一年级\",\"parentid\":5,\"id\":2,\"type\":1,\"register_year\":2018,\"standard_grade\":1,\"order\":1,\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":4,\"subject\":\"语文\"},{\"userid\":\"lisi\",\"type\":3,\"subject\":\"数学\"}]}";
+ String str3 = "{\"name\":\"一年级\",\"parentid\":5,\"id\":2,\"type\":1,\"register_year\":2018,\"standard_grade\":1," +
+ "\"order\":1,\"department_admins\":[{\"userid\":\"zhangsan\",\"type\":4,\"subject\":\"语文\"}," +
+ "{\"userid\":\"lisi\",\"type\":3,\"subject\":\"数学\"}]}";
WxCpCreateDepartmentRequest wxCpCreateDepartmentRequest = WxCpCreateDepartmentRequest.fromJson(str3);
log.info("wxCpCreateDepartmentRequest:{}", wxCpCreateDepartmentRequest.toJson());
@@ -678,7 +708,9 @@ public class WxCpSchoolUserTest {
* 更新家长
* https://developer.work.weixin.qq.com/document/path/92333
*/
- String str2 = "{\"parent_userid\":\"zhangsan_parent_userid\",\"new_parent_userid\":\"NEW_ID\",\"mobile\":\"18000000000\",\"children\":[{\"student_userid\":\"zhangsan\",\"relation\":\"爸爸\"},{\"student_userid\":\"lisi\",\"relation\":\"伯父\"}]}";
+ String str2 = "{\"parent_userid\":\"zhangsan_parent_userid\",\"new_parent_userid\":\"NEW_ID\"," +
+ "\"mobile\":\"18000000000\",\"children\":[{\"student_userid\":\"zhangsan\",\"relation\":\"爸爸\"}," +
+ "{\"student_userid\":\"lisi\",\"relation\":\"伯父\"}]}";
WxCpUpdateParentRequest updateParentRequest1 = WxCpUpdateParentRequest.fromJson(str2);
log.info("updateParentRequest1:{}", updateParentRequest1.toJson());
@@ -709,7 +741,9 @@ public class WxCpSchoolUserTest {
* 创建家长
* https://developer.work.weixin.qq.com/document/path/92331
*/
- String str1 = "{\"parent_userid\":\"zhangsan_parent_userid\",\"mobile\":\"10000000000\",\"to_invite\":false,\"children\":[{\"student_userid\":\"zhangsan\",\"relation\":\"爸爸\"},{\"student_userid\":\"lisi\",\"relation\":\"伯父\"}]}";
+ String str1 = "{\"parent_userid\":\"zhangsan_parent_userid\",\"mobile\":\"10000000000\",\"to_invite\":false," +
+ "\"children\":[{\"student_userid\":\"zhangsan\",\"relation\":\"爸爸\"},{\"student_userid\":\"lisi\"," +
+ "\"relation\":\"伯父\"}]}";
WxCpCreateParentRequest createParentRequest1 = WxCpCreateParentRequest.fromJson(str1);
log.info("createParentRequest1:{}", createParentRequest1.toJson());
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpTpMessageRouterTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpTpMessageRouterTest.java
index 41c0b3796..91f91058c 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpTpMessageRouterTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpTpMessageRouterTest.java
@@ -15,9 +15,15 @@ import java.util.Map;
import static org.testng.Assert.assertNotNull;
import static org.testng.AssertJUnit.assertNull;
+/**
+ * The type Wx cp tp message router test.
+ */
public class WxCpTpMessageRouterTest {
+ /**
+ * Test message router.
+ */
@Test
public void testMessageRouter() {
WxCpTpService service = new WxCpTpServiceApacheHttpClientImpl();
@@ -40,7 +46,8 @@ public class WxCpTpMessageRouterTest {
router.rule().infoType("change_contact").changeType("update_tag").handler(new WxCpTpMessageHandler() {
@Override
- public WxCpXmlOutMessage handle(WxCpTpXmlMessage wxMessage, Map context, WxCpTpService wxCpService, WxSessionManager sessionManager) throws WxErrorException {
+ public WxCpXmlOutMessage handle(WxCpTpXmlMessage wxMessage, Map context,
+ WxCpTpService wxCpService, WxSessionManager sessionManager) throws WxErrorException {
System.out.println("handler enter");
assertNotNull(wxCpService);
return null;
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
index 739470a2d..c2b1dad93 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
@@ -32,26 +32,50 @@ import static org.mockito.Mockito.mock;
@Test
@Guice(modules = ApiTestModule.class)
public class BaseWxCpServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
+ /**
+ * Test get agent jsapi ticket.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetAgentJsapiTicket() throws WxErrorException {
assertThat(this.wxService.getAgentJsapiTicket()).isNotEmpty();
assertThat(this.wxService.getAgentJsapiTicket(true)).isNotEmpty();
}
+ /**
+ * Test js code 2 session.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testJsCode2Session() throws WxErrorException {
assertThat(this.wxService.jsCode2Session("111")).isNotNull();
}
+ /**
+ * Test get provider token.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetProviderToken() throws WxErrorException {
assertThat(this.wxService.getProviderToken("111", "123")).isNotNull();
}
+ /**
+ * Test execute auto refresh token.
+ *
+ * @throws WxErrorException the wx error exception
+ * @throws IOException the io exception
+ */
@Test
public void testExecuteAutoRefreshToken() throws WxErrorException, IOException {
//测试access token获取时的重试机制
@@ -94,12 +118,13 @@ public class BaseWxCpServiceImplTest {
AtomicInteger counter = new AtomicInteger();
Mockito.when(re.execute(Mockito.anyString(), Mockito.any(), Mockito.any())).thenAnswer(invocation -> {
counter.incrementAndGet();
- WxError error = WxError.builder().errorCode(WxMpErrorMsgEnum.CODE_40001.getCode()).errorMsg(WxMpErrorMsgEnum.CODE_40001.getMsg()).build();
+ WxError error =
+ WxError.builder().errorCode(WxMpErrorMsgEnum.CODE_40001.getCode()).errorMsg(WxMpErrorMsgEnum.CODE_40001.getMsg()).build();
throw new WxErrorException(error);
});
try {
Object execute = service.execute(re, "http://baidu.com", new HashMap<>());
- Assert.assertTrue(false, "代码应该不会执行到这里");
+ Assert.fail("代码应该不会执行到这里");
} catch (WxErrorException e) {
Assert.assertEquals(WxMpErrorMsgEnum.CODE_40001.getCode(), e.getError().getErrorCode());
Assert.assertEquals(2, counter.get());
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
index 97c7d40fe..07438056c 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
@@ -33,6 +33,11 @@ public class WxCpAgentServiceImplTest {
@Inject
private WxCpService wxCpService;
+ /**
+ * Test get.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testGet() throws Exception {
final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
@@ -45,6 +50,11 @@ public class WxCpAgentServiceImplTest {
assertThat(wxCpAgent.getAllowTags().getTagIds().toArray()).isNotEmpty();
}
+ /**
+ * Test set.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSet() throws WxErrorException {
final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
@@ -56,6 +66,11 @@ public class WxCpAgentServiceImplTest {
.build());
}
+ /**
+ * Test list.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testList() throws WxErrorException {
List list = this.wxCpService.getAgentService().list();
@@ -67,12 +82,25 @@ public class WxCpAgentServiceImplTest {
assertThat(list.get(0).getSquareLogoUrl()).isNotEmpty();
}
+ /**
+ * The type Mock test.
+ */
public static class MockTest {
- private WxCpService wxService = mock(WxCpService.class);
+ private final WxCpService wxService = mock(WxCpService.class);
+ /**
+ * Test get.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testGet() throws Exception {
- String returnJson = "{\"errcode\": 0,\"errmsg\": \"ok\",\"agentid\": 9,\"name\": \"测试应用\",\"square_logo_url\": \"http://wx.qlogo.cn/mmhead/alksjf;lasdjf;lasjfuodiuj3rj2o34j/0\",\"description\": \"这是一个企业号应用\",\"allow_userinfos\": {\"user\": [{\"userid\": \"0009854\"}, {\"userid\": \"1723\"}, {\"userid\": \"5625\"}]},\"allow_partys\": {\"partyid\": [42762742]},\"allow_tags\": {\"tagid\": [23, 22, 35, 19, 32, 125, 133, 46, 150, 38, 183, 9, 7]},\"close\": 0,\"redirect_domain\": \"weixin.com.cn\",\"report_location_flag\": 0,\"isreportenter\": 0,\"home_url\": \"\"}";
+ String returnJson = "{\"errcode\": 0,\"errmsg\": \"ok\",\"agentid\": 9,\"name\": \"测试应用\",\"square_logo_url\": " +
+ "\"http://wx.qlogo.cn/mmhead/alksjf;lasdjf;lasjfuodiuj3rj2o34j/0\",\"description\": \"这是一个企业号应用\"," +
+ "\"allow_userinfos\": {\"user\": [{\"userid\": \"0009854\"}, {\"userid\": \"1723\"}, {\"userid\": " +
+ "\"5625\"}]},\"allow_partys\": {\"partyid\": [42762742]},\"allow_tags\": {\"tagid\": [23, 22, 35, 19, 32, " +
+ "125, 133, 46, 150, 38, 183, 9, 7]},\"close\": 0,\"redirect_domain\": \"weixin.com.cn\"," +
+ "\"report_location_flag\": 0,\"isreportenter\": 0,\"home_url\": \"\"}";
final WxCpConfigStorage configStorage = new WxCpDefaultConfigImpl();
when(wxService.getWxCpConfigStorage()).thenReturn(configStorage);
when(wxService.get(String.format(configStorage.getApiUrl(WxCpApiPathConsts.Agent.AGENT_GET), 9), null)).thenReturn(returnJson);
@@ -85,7 +113,8 @@ public class WxCpAgentServiceImplTest {
assertEquals(new Integer[]{42762742}, wxCpAgent.getAllowParties().getPartyIds().toArray());
- assertEquals(new Integer[]{23, 22, 35, 19, 32, 125, 133, 46, 150, 38, 183, 9, 7}, wxCpAgent.getAllowTags().getTagIds().toArray());
+ assertEquals(new Integer[]{23, 22, 35, 19, 32, 125, 133, 46, 150, 38, 183, 9, 7},
+ wxCpAgent.getAllowTags().getTagIds().toArray());
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchImplTest.java
index 21a65a7da..c931c6fc6 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentWorkBenchImplTest.java
@@ -16,8 +16,9 @@ import java.util.ArrayList;
import java.util.List;
/**
- * @author songshiyu
- * created on : create in 10:31 2020/9/29
+ * The type Wx cp agent work bench impl test.
+ *
+ * @author songshiyu created on : create in 10:31 2020/9/29
* @description: 测试工作台服务
*/
@Guice(modules = ApiTestModule.class)
@@ -26,22 +27,44 @@ public class WxCpAgentWorkBenchImplTest {
@Inject
private WxCpService wxCpService;
+ /**
+ * Test template set.
+ *
+ * @param template the template
+ * @throws WxErrorException the wx error exception
+ */
@Test(dataProvider = "template")
public void testTemplateSet(WxCpAgentWorkBench template) throws WxErrorException {
this.wxCpService.getWorkBenchService().setWorkBenchTemplate(template);
}
+ /**
+ * Test template get.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testTemplateGet() throws WxErrorException {
String result = this.wxCpService.getWorkBenchService().getWorkBenchTemplate(1000011L);
- System.out.println("获取工作台模板设置:"+result);
+ System.out.println("获取工作台模板设置:" + result);
}
+ /**
+ * Test user data set.
+ *
+ * @param userDatas the user datas
+ * @throws WxErrorException the wx error exception
+ */
@Test(dataProvider = "userDatas")
public void testUserDataSet(WxCpAgentWorkBench userDatas) throws WxErrorException {
this.wxCpService.getWorkBenchService().setWorkBenchData(userDatas);
}
+ /**
+ * Template object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] template() {
return new Object[][]{
@@ -57,6 +80,11 @@ public class WxCpAgentWorkBenchImplTest {
};
}
+ /**
+ * User datas object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] userDatas() {
return new Object[][]{
@@ -72,15 +100,20 @@ public class WxCpAgentWorkBenchImplTest {
};
}
+ /**
+ * Test key data template set.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testKeyDataTemplateSet() throws WxErrorException {
WxCpAgentWorkBench template = new WxCpAgentWorkBench();
template.setAgentId(1000011L);
template.setType(WxCpConsts.WorkBenchType.KEYDATA);
List workBenchKeyDataList = new ArrayList<>();
- for(int i = 1;i < 4;i++){
+ for (int i = 1; i < 4; i++) {
WorkBenchKeyData workBenchKeyData = new WorkBenchKeyData();
- workBenchKeyData.setKey("审批"+i);
+ workBenchKeyData.setKey("审批" + i);
workBenchKeyData.setData(String.valueOf(i));
workBenchKeyData.setJumpUrl("http://www.qq.com");
workBenchKeyData.setPagePath("pages/index");
@@ -91,6 +124,11 @@ public class WxCpAgentWorkBenchImplTest {
this.wxCpService.getWorkBenchService().setWorkBenchTemplate(template);
}
+ /**
+ * Test key data user data set.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testKeyDataUserDataSet() throws WxErrorException {
WxCpAgentWorkBench template = new WxCpAgentWorkBench();
@@ -108,15 +146,20 @@ public class WxCpAgentWorkBenchImplTest {
this.wxCpService.getWorkBenchService().setWorkBenchTemplate(template);
}
+ /**
+ * Test list template set.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testListTemplateSet() throws WxErrorException {
WxCpAgentWorkBench template = new WxCpAgentWorkBench();
template.setAgentId(1000011L);
template.setType(WxCpConsts.WorkBenchType.LIST);
List workBenchListArray = new ArrayList<>();
- for(int i = 0;i < 2;i++){
+ for (int i = 0; i < 2; i++) {
WorkBenchList workBenchlist = new WorkBenchList();
- workBenchlist.setTitle("测试"+i);
+ workBenchlist.setTitle("测试" + i);
workBenchlist.setJumpUrl("http://www.qq.com");
workBenchlist.setPagePath("pages/index");
workBenchListArray.add(workBenchlist);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java
index 56df47e36..09c50574c 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java
@@ -1,20 +1,23 @@
package me.chanjar.weixin.cp.api.impl;
-import java.util.Arrays;
-
-import org.testng.*;
-import org.testng.annotations.*;
-
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import me.chanjar.weixin.common.error.WxErrorException;
-import me.chanjar.weixin.cp.constant.WxCpConsts.AppChatMsgType;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.WxCpService;
-import me.chanjar.weixin.cp.bean.message.WxCpAppChatMessage;
import me.chanjar.weixin.cp.bean.WxCpChat;
import me.chanjar.weixin.cp.bean.article.MpnewsArticle;
import me.chanjar.weixin.cp.bean.article.NewArticle;
+import me.chanjar.weixin.cp.bean.message.WxCpAppChatMessage;
+import me.chanjar.weixin.cp.constant.WxCpConsts.AppChatMsgType;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Guice;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Collections;
import static org.assertj.core.api.Assertions.assertThat;
@@ -31,12 +34,20 @@ public class WxCpChatServiceImplTest {
@Inject
private WxCpService cpService;
+ /**
+ * Init.
+ */
@BeforeTest
public void init() {
this.chatId = "mychatid";
this.userId = ((ApiTestModule.WxXmlCpInMemoryConfigStorage) this.cpService.getWxCpConfigStorage()).getUserId();
}
+ /**
+ * Test create.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testCreate() throws Exception {
final String result = cpService.getChatService().create("测试群聊", userId,
@@ -45,6 +56,11 @@ public class WxCpChatServiceImplTest {
assertThat(result).isEqualTo(chatId);
}
+ /**
+ * Test get.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testGet() throws Exception {
WxCpChat chat = this.cpService.getChatService().get(chatId);
@@ -52,14 +68,24 @@ public class WxCpChatServiceImplTest {
Assert.assertEquals(chat.getName(), "测试群聊");
}
+ /**
+ * Test update.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testUpdate() throws Exception {
- this.cpService.getChatService().update(chatId, "", "", Arrays.asList("ZhengWuYao"), null);
+ this.cpService.getChatService().update(chatId, "", "", Collections.singletonList("ZhengWuYao"), null);
WxCpChat chat = this.cpService.getChatService().get(chatId);
System.out.println(chat);
Assert.assertEquals(chat.getUsers().size(), 3);
}
+ /**
+ * Messages object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] messages() {
return new Object[][]{
@@ -101,7 +127,8 @@ public class WxCpChatServiceImplTest {
.btnTxt("更多")
.title("领奖通知")
.url("https://zhidao.baidu.com/question/2073647112026042748.html")
- .description("2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:520258
请于2016年10月10日前联系行 政同事领取
")
+ .description("2016年9月26日
恭喜你抽中iPhone " +
+ "7一台,领奖码:520258
请于2016年10月10日前联系行 政同事领取
")
.build()
},
{WxCpAppChatMessage.builder()
@@ -151,6 +178,12 @@ public class WxCpChatServiceImplTest {
};
}
+ /**
+ * Test send msg.
+ *
+ * @param message the message
+ * @throws WxErrorException the wx error exception
+ */
@Test(dataProvider = "messages")
public void testSendMsg(WxCpAppChatMessage message) throws WxErrorException {
this.cpService.getChatService().sendMsg(message);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpDepartmentServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpDepartmentServiceImplTest.java
index d08dee498..f8e0d5e19 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpDepartmentServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpDepartmentServiceImplTest.java
@@ -27,6 +27,11 @@ public class WxCpDepartmentServiceImplTest {
private WxCpDepart depart;
+ /**
+ * Test create.
+ *
+ * @throws Exception the exception
+ */
@Test
public void testCreate() throws Exception {
WxCpDepart cpDepart = new WxCpDepart();
@@ -37,6 +42,11 @@ public class WxCpDepartmentServiceImplTest {
System.out.println(departId);
}
+ /**
+ * Depart ids object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] departIds() {
return new Object[][]{
@@ -46,6 +56,12 @@ public class WxCpDepartmentServiceImplTest {
};
}
+ /**
+ * Test list.
+ *
+ * @param id the id
+ * @throws Exception the exception
+ */
@Test(dataProvider = "departIds")
public void testList(Long id) throws Exception {
System.out.println("=================获取部门");
@@ -58,6 +74,11 @@ public class WxCpDepartmentServiceImplTest {
}
}
+ /**
+ * Test update.
+ *
+ * @throws Exception the exception
+ */
@Test(dependsOnMethods = {"testList", "testCreate"})
public void testUpdate() throws Exception {
System.out.println("=================更新部门");
@@ -65,6 +86,11 @@ public class WxCpDepartmentServiceImplTest {
this.wxCpService.getDepartmentService().update(this.depart);
}
+ /**
+ * Test delete.
+ *
+ * @throws Exception the exception
+ */
@Test(dependsOnMethods = "testUpdate")
public void testDelete() throws Exception {
System.out.println("=================删除部门");
@@ -76,8 +102,8 @@ public class WxCpDepartmentServiceImplTest {
* 获取子部门ID列表
* https://developer.work.weixin.qq.com/document/path/95350
*
- * @param id
- * @throws WxErrorException
+ * @param id the id
+ * @throws WxErrorException the wx error exception
*/
@Test(dataProvider = "departIds")
public void testSimpleList(Long id) throws WxErrorException {
@@ -87,6 +113,12 @@ public class WxCpDepartmentServiceImplTest {
departList.forEach(System.out::println);
}
+ /**
+ * Test get.
+ *
+ * @param id the id
+ * @throws WxErrorException the wx error exception
+ */
@Test(dataProvider = "departIds")
public void testGet(Long id) throws WxErrorException {
if (id == null) {
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java
index 9aa64d662..181924a47 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java
@@ -12,25 +12,34 @@ import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactInfo;
import me.chanjar.weixin.cp.bean.external.msg.Attachment;
import me.chanjar.weixin.cp.bean.external.msg.Image;
import me.chanjar.weixin.cp.bean.external.msg.Video;
-import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
+import org.testng.collections.CollectionUtils;
import java.util.*;
-import org.testng.collections.CollectionUtils;
-
import static org.testng.Assert.assertNotNull;
+/**
+ * The type Wx cp external contact service impl test.
+ */
@Guice(modules = ApiTestModule.class)
public class WxCpExternalContactServiceImplTest {
@Inject
private WxCpService wxCpService;
+ /**
+ * The Config storage.
+ */
@Inject
protected ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage;
private final String userId = "someone" + System.currentTimeMillis();
+ /**
+ * Test get external contact.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetExternalContact() throws WxErrorException {
String externalUserId = this.configStorage.getExternalUserId();
@@ -39,6 +48,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test add contact way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testAddContactWay() throws WxErrorException {
@@ -55,6 +69,11 @@ public class WxCpExternalContactServiceImplTest {
this.wxCpService.getExternalContactService().addContactWay(info);
}
+ /**
+ * Test get contact way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetContactWay() throws WxErrorException {
final String configId = "39fea3d93e30faaa8c7a9edd4cfe4d08";
@@ -63,6 +82,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(contactWayInfo);
}
+ /**
+ * Test update contact way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUpdateContactWay() throws WxErrorException {
final String configId = "2d7a68c657663afbd1d90db19a4b5ee9";
@@ -78,6 +102,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(resp);
}
+ /**
+ * Test del contact way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testDelContactWay() throws WxErrorException {
final String configId = "2d7a68c657663afbd1d90db19a4b5ee9";
@@ -86,6 +115,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(resp);
}
+ /**
+ * Test close temp chat.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testCloseTempChat() throws WxErrorException {
final String externalUserId = "externalUserId";
@@ -93,6 +127,11 @@ public class WxCpExternalContactServiceImplTest {
System.out.println(resp);
}
+ /**
+ * Test list external contacts.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testListExternalContacts() throws WxErrorException {
String userId = this.configStorage.getUserId();
@@ -101,6 +140,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(ret);
}
+ /**
+ * Test list external with permission.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testListExternalWithPermission() throws WxErrorException {
List ret = this.wxCpService.getExternalContactService().listFollowers();
@@ -108,22 +152,39 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(ret);
}
+ /**
+ * Test get contact detail.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetContactDetail() throws WxErrorException {
String externalUserId = this.configStorage.getExternalUserId();
- WxCpExternalContactInfo result = this.wxCpService.getExternalContactService().getContactDetail(externalUserId, null);
+ WxCpExternalContactInfo result = this.wxCpService.getExternalContactService().getContactDetail(externalUserId,
+ null);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test get contact detail batch.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetContactDetailBatch() throws WxErrorException {
String userId = this.configStorage.getUserId();
- WxCpExternalContactBatchInfo result = this.wxCpService.getExternalContactService().getContactDetailBatch(new String[]{userId}, "", 100);
+ WxCpExternalContactBatchInfo result =
+ this.wxCpService.getExternalContactService().getContactDetailBatch(new String[]{userId}, "", 100);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test get corp tag list.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetCorpTagList() throws WxErrorException {
String[] tag = {};
@@ -132,6 +193,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test add corp tag.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testAddCorpTag() throws WxErrorException {
@@ -154,15 +220,26 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test edit corp tag.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testEditCorpTag() throws WxErrorException {
- WxCpBaseResp result = this.wxCpService.getExternalContactService().editCorpTag("et2omCCwAA6PtGsfeEOQMENl3Ub1FA6A", "未知6", 2);
+ WxCpBaseResp result = this.wxCpService.getExternalContactService().editCorpTag("et2omCCwAA6PtGsfeEOQMENl3Ub1FA6A"
+ , "未知6", 2);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test del corp tag.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testDelCorpTag() throws WxErrorException {
@@ -175,6 +252,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test mark tag.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testMarkTag() throws WxErrorException {
@@ -183,28 +265,46 @@ public class WxCpExternalContactServiceImplTest {
String[] addTag = {"et2omCCwAAzdcSK-RV80YS9sbpCXlNlQ"};
String[] removeTag = {};
- WxCpBaseResp result = this.wxCpService.getExternalContactService().markTag(userid, externalUserid, addTag, removeTag);
+ WxCpBaseResp result = this.wxCpService.getExternalContactService().markTag(userid, externalUserid, addTag,
+ removeTag);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test delete contact way.
+ */
@Test
public void testDeleteContactWay() {
}
+ /**
+ * Test list followers.
+ */
@Test
public void testListFollowers() {
}
+ /**
+ * Test list unassigned list.
+ */
@Test
public void testListUnassignedList() {
}
+ /**
+ * Test transfer external contact.
+ */
@Test
public void testTransferExternalContact() {
}
+ /**
+ * Test transfer customer.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testTransferCustomer() throws WxErrorException {
WxCpUserTransferCustomerReq req = new WxCpUserTransferCustomerReq();
@@ -217,6 +317,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test trnsfer result.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testTrnsferResult() throws WxErrorException {
WxCpUserTransferResultResp result = this.wxCpService.getExternalContactService().transferResult("123", "234", "");
@@ -224,6 +329,11 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Testresigned transfer customer.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testresignedTransferCustomer() throws WxErrorException {
WxCpUserTransferCustomerReq req = new WxCpUserTransferCustomerReq();
@@ -236,51 +346,92 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Testresigned trnsfer result.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testresignedTrnsferResult() throws WxErrorException {
- WxCpUserTransferResultResp result = this.wxCpService.getExternalContactService().resignedTransferResult("123", "234", "");
+ WxCpUserTransferResultResp result = this.wxCpService.getExternalContactService().resignedTransferResult("123",
+ "234", "");
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test list group chat.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testListGroupChat() throws WxErrorException {
- WxCpUserExternalGroupChatList result = this.wxCpService.getExternalContactService().listGroupChat(0, 100, 0, new String[1], new String[1]);
+ WxCpUserExternalGroupChatList result = this.wxCpService.getExternalContactService().listGroupChat(0, 100, 0,
+ new String[1], new String[1]);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test list group chat v 3.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testListGroupChatV3() throws WxErrorException {
- WxCpUserExternalGroupChatList result = this.wxCpService.getExternalContactService().listGroupChat(100, "", 0, new String[1]);
+ WxCpUserExternalGroupChatList result = this.wxCpService.getExternalContactService().listGroupChat(100, "", 0,
+ new String[1]);
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test get group chat.
+ */
@Test
public void testGetGroupChat() {
}
+ /**
+ * Test transfer group chat.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testTransferGroupChat() throws WxErrorException {
String[] str = {"wri1_QEAAATfnZl_VJ4hlQda0e4Mgf1A"};
- WxCpUserExternalGroupChatTransferResp result = this.wxCpService.getExternalContactService().transferGroupChat(str, "123");
+ WxCpUserExternalGroupChatTransferResp result = this.wxCpService.getExternalContactService().transferGroupChat(str
+ , "123");
System.out.println(result);
assertNotNull(result);
}
+ /**
+ * Test get user behavior statistic.
+ */
@Test
public void testGetUserBehaviorStatistic() {
}
+ /**
+ * Test get group chat statistic.
+ */
@Test
public void testGetGroupChatStatistic() {
}
+ /**
+ * Test add msg template.
+ */
@Test
public void testAddMsgTemplate() {
}
+ /**
+ * Test send welcome msg.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendWelcomeMsg() throws WxErrorException {
Image image = new Image();
@@ -302,6 +453,11 @@ public class WxCpExternalContactServiceImplTest {
.build());
}
+ /**
+ * Test update remark.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUpdateRemark() throws WxErrorException {
this.wxCpService.getExternalContactService().updateRemark(WxCpUpdateRemarkRequest.builder()
@@ -315,19 +471,30 @@ public class WxCpExternalContactServiceImplTest {
.build());
}
+ /**
+ * Test get product list album.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetProductListAlbum() throws WxErrorException {
WxCpProductAlbumListResult result = this.wxCpService.getExternalContactService()
.getProductAlbumList(100, null);
System.out.println(result);
assertNotNull(result);
- if(CollectionUtils.hasElements(result.getProductList())){
- WxCpProductAlbumResult result1 = this.wxCpService.getExternalContactService().getProductAlbum(result.getProductList().get(0).getProductId());
+ if (CollectionUtils.hasElements(result.getProductList())) {
+ WxCpProductAlbumResult result1 =
+ this.wxCpService.getExternalContactService().getProductAlbum(result.getProductList().get(0).getProductId());
System.out.println(result1);
assertNotNull(result1);
}
}
+ /**
+ * Test get moment list.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetMomentList() throws WxErrorException {
WxCpGetMomentList result = this.wxCpService.getExternalContactService()
@@ -336,12 +503,17 @@ public class WxCpExternalContactServiceImplTest {
assertNotNull(result);
}
+ /**
+ * Test add join way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testAddJoinWay() throws WxErrorException {
- WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
- joinWay.setChatIdList(Arrays.asList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
+ WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
+ joinWay.setChatIdList(Collections.singletonList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
joinWay.setScene(2);
joinWay.setAutoCreateRoom(1);
joinWay.setRemark("CreateDate:" + DateFormatUtils.ISO_8601_EXTENDED_DATETIME_FORMAT.format(new Date()));
@@ -351,14 +523,19 @@ public class WxCpExternalContactServiceImplTest {
this.wxCpService.getExternalContactService().addJoinWay(info);
}
+ /**
+ * Test update join way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUpdateJoinWay() throws WxErrorException {
final String configId = "";
- WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
+ WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
joinWay.setConfigId(configId);
- joinWay.setChatIdList(Arrays.asList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
+ joinWay.setChatIdList(Collections.singletonList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
joinWay.setScene(2);
joinWay.setAutoCreateRoom(1);
joinWay.setRemark("CreateDate:" + DateFormatUtils.ISO_8601_EXTENDED_DATETIME_FORMAT.format(new Date()));
@@ -368,6 +545,11 @@ public class WxCpExternalContactServiceImplTest {
this.wxCpService.getExternalContactService().updateJoinWay(info);
}
+ /**
+ * Test del join way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testDelJoinWay() throws WxErrorException {
@@ -376,6 +558,11 @@ public class WxCpExternalContactServiceImplTest {
this.wxCpService.getExternalContactService().delJoinWay(configId);
}
+ /**
+ * Test get join way.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetJoinWay() throws WxErrorException {
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java
index 45996e4d9..8e0d87d82 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java
@@ -19,27 +19,42 @@ import java.util.stream.Stream;
/**
* 微信群机器人消息发送api 单元测试
*
- * @author yr
- * created on 2020-08-20
+ * @author yr created on 2020-08-20
*/
@Slf4j
@Guice(modules = ApiTestModule.class)
public class WxCpGroupRobotServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
private WxCpGroupRobotService robotService;
+ /**
+ * Sets .
+ */
@BeforeTest
public void setup() {
robotService = wxService.getGroupRobotService();
}
+ /**
+ * Test send text.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendText() throws WxErrorException {
robotService.sendText("Hello World", null, null);
}
+ /**
+ * Test send mark down.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendMarkDown() throws WxErrorException {
String content = "实时新增用户反馈132例 ,请相关同事注意。\n" +
@@ -49,6 +64,11 @@ public class WxCpGroupRobotServiceImplTest {
robotService.sendMarkdown(content);
}
+ /**
+ * Test send image.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendImage() throws WxErrorException {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("mm.jpeg");
@@ -58,6 +78,11 @@ public class WxCpGroupRobotServiceImplTest {
robotService.sendImage(base64, md5);
}
+ /**
+ * Test send news.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendNews() throws WxErrorException {
NewArticle article = new NewArticle("图文消息测试", "hello world", "http://www.baidu.com",
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImplTest.java
index 2b28d9ee0..c918c297b 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImplTest.java
@@ -6,13 +6,7 @@ import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAdd;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountAddResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountDel;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLink;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountLinkResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountListResp;
-import me.chanjar.weixin.cp.bean.kf.WxCpKfAccountUpd;
+import me.chanjar.weixin.cp.bean.kf.*;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -22,8 +16,7 @@ import java.io.InputStream;
* WxCpKfServiceImpl-测试类
* 需要用到专门的 secret https://kf.weixin.qq.com/api/doc/path/93304#secret
*
- * @author Fu
- * created on 2022/1/19 20:12
+ * @author Fu created on 2022/1/19 20:12
*/
@Guice(modules = ApiTestModule.class)
public class WxCpKfServiceImplTest {
@@ -33,6 +26,11 @@ public class WxCpKfServiceImplTest {
private static String kfid = "wkPzhXVAAAJD9oR75LrO1DmURSOUFBIg";
+ /**
+ * Test account add.
+ *
+ * @throws Exception the exception
+ */
@Test(priority = 1)
public void testAccountAdd() throws Exception {
try (InputStream in = ClassLoader.getSystemResourceAsStream("mm.jpeg")) {
@@ -47,6 +45,11 @@ public class WxCpKfServiceImplTest {
}
}
+ /**
+ * Test account upd.
+ *
+ * @throws Exception the exception
+ */
@Test(priority = 2)
public void testAccountUpd() throws Exception {
WxCpKfAccountUpd upd = new WxCpKfAccountUpd();
@@ -56,12 +59,22 @@ public class WxCpKfServiceImplTest {
System.out.println(resp);
}
+ /**
+ * Test account list.
+ *
+ * @throws Exception the exception
+ */
@Test(priority = 3)
public void testAccountList() throws Exception {
- WxCpKfAccountListResp resp = this.wxService.getKfService().listAccount(0,10);
+ WxCpKfAccountListResp resp = this.wxService.getKfService().listAccount(0, 10);
System.out.println(resp);
}
+ /**
+ * Test account link.
+ *
+ * @throws Exception the exception
+ */
@Test(priority = 4)
public void testAccountLink() throws Exception {
WxCpKfAccountLink link = new WxCpKfAccountLink();
@@ -71,6 +84,11 @@ public class WxCpKfServiceImplTest {
System.out.println(resp);
}
+ /**
+ * Test account del.
+ *
+ * @throws Exception the exception
+ */
@Test(priority = 5)
public void testAccountDel() throws Exception {
WxCpKfAccountDel del = new WxCpKfAccountDel();
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImplTest.java
index 70873c49c..b964aad51 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMediaServiceImplTest.java
@@ -1,14 +1,5 @@
package me.chanjar.weixin.cp.api.impl;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.annotations.*;
-
import com.google.inject.Inject;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
@@ -16,9 +7,19 @@ import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.TestConstants;
import me.chanjar.weixin.cp.api.WxCpService;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Guice;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.testng.Assert.*;
+import static org.testng.Assert.assertTrue;
/**
* Created by Binary Wang on 2017-6-25.
@@ -30,8 +31,13 @@ public class WxCpMediaServiceImplTest {
@Inject
private WxCpService wxService;
- private List mediaIds = new ArrayList<>();
+ private final List mediaIds = new ArrayList<>();
+ /**
+ * Media data object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] mediaData() {
return new Object[][]{
@@ -44,6 +50,15 @@ public class WxCpMediaServiceImplTest {
};
}
+ /**
+ * Test upload media.
+ *
+ * @param mediaType the media type
+ * @param fileType the file type
+ * @param fileName the file name
+ * @throws WxErrorException the wx error exception
+ * @throws IOException the io exception
+ */
@Test(dataProvider = "mediaData")
public void testUploadMedia(String mediaType, String fileType, String fileName) throws WxErrorException, IOException {
try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(fileName)) {
@@ -62,6 +77,11 @@ public class WxCpMediaServiceImplTest {
}
}
+ /**
+ * Download media object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] downloadMedia() {
Object[][] params = new Object[this.mediaIds.size()][];
@@ -71,6 +91,12 @@ public class WxCpMediaServiceImplTest {
return params;
}
+ /**
+ * Test download.
+ *
+ * @param mediaId the media id
+ * @throws WxErrorException the wx error exception
+ */
@Test(dependsOnMethods = {"testUploadMedia"}, dataProvider = "downloadMedia")
public void testDownload(String mediaId) throws WxErrorException {
File file = this.wxService.getMediaService().download(mediaId);
@@ -78,6 +104,11 @@ public class WxCpMediaServiceImplTest {
System.out.println(file);
}
+ /**
+ * Test upload img.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUploadImg() throws WxErrorException {
URL url = ClassLoader.getSystemResource("mm.jpeg");
@@ -85,6 +116,11 @@ public class WxCpMediaServiceImplTest {
assertThat(res).isNotEmpty();
}
+ /**
+ * Test get jssdk file.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetJssdkFile() throws WxErrorException {
File file = this.wxService.getMediaService().getJssdkFile("....");
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImplTest.java
index b9dbbd3aa..928cf4be4 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImplTest.java
@@ -6,22 +6,31 @@ import me.chanjar.weixin.common.bean.menu.WxMenu;
import me.chanjar.weixin.common.bean.menu.WxMenuButton;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.WxCpService;
-import org.testng.annotations.*;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Guice;
+import org.testng.annotations.Test;
-import static org.testng.Assert.*;
+import static org.testng.Assert.assertNotNull;
/**
*
*
* Created by Binary Wang on 2017-6-25.
- * @author Binary Wang
- *
+ * @author Binary Wang
*/
@Guice(modules = ApiTestModule.class)
public class WxCpMenuServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
+ /**
+ * Menu data object [ ] [ ].
+ *
+ * @return the object [ ] [ ]
+ */
@DataProvider
public Object[][] menuData() {
WxMenu menu = new WxMenu();
@@ -69,11 +78,22 @@ public class WxCpMenuServiceImplTest {
}
+ /**
+ * Test create.
+ *
+ * @param wxMenu the wx menu
+ * @throws Exception the exception
+ */
@Test(dataProvider = "menuData")
public void testCreate(WxMenu wxMenu) throws Exception {
this.wxService.getMenuService().create(wxMenu);
}
+ /**
+ * Test get.
+ *
+ * @throws Exception the exception
+ */
@Test(dependsOnMethods = "testCreate")
public void testGet() throws Exception {
WxMenu menu = this.wxService.getMenuService().get();
@@ -81,6 +101,11 @@ public class WxCpMenuServiceImplTest {
System.out.println(menu.toJson());
}
+ /**
+ * Test delete.
+ *
+ * @throws Exception the exception
+ */
@Test(dependsOnMethods = {"testGet", "testCreate"})
public void testDelete() throws Exception {
this.wxService.getMenuService().delete();
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImplTest.java
index 7cf373b5d..e1070a28a 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImplTest.java
@@ -26,19 +26,24 @@ import static org.testng.Assert.assertNotNull;
/**
* 测试类.
*
- * @author Binary Wang
- * created on 2020-08-30
+ * @author Binary Wang created on 2020-08-30
*/
@Test
//@Guice(modules = ApiTestModuleWithMockServer.class)
@Guice(modules = ApiTestModule.class)
public class WxCpMessageServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
private Runner mockRunner;
private ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage;
+ /**
+ * Sets .
+ */
@BeforeTest
public void setup() {
HttpServer mockServer = jsonHttpServer(mockServerPort, file("src/test/resources/moco/message.json"));
@@ -47,11 +52,19 @@ public class WxCpMessageServiceImplTest {
this.configStorage = (ApiTestModule.WxXmlCpInMemoryConfigStorage) this.wxService.getWxCpConfigStorage();
}
+ /**
+ * Stop mock server.
+ */
@AfterTest
public void stopMockServer() {
this.mockRunner.stop();
}
+ /**
+ * Test send message.
+ *
+ * @throws WxErrorException the wx error exception
+ */
public void testSendMessage() throws WxErrorException {
WxCpMessage message = new WxCpMessage();
// message.setAgentId(configStorage.getAgentId());
@@ -67,6 +80,11 @@ public class WxCpMessageServiceImplTest {
System.out.println(messageSendResult.getInvalidTagList());
}
+ /**
+ * Test send message 1.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendMessage1() throws WxErrorException {
WxCpMessage message = WxCpMessage
@@ -84,6 +102,11 @@ public class WxCpMessageServiceImplTest {
System.out.println(messageSendResult.getInvalidTagList());
}
+ /**
+ * Test send message markdown.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendMessage_markdown() throws WxErrorException {
WxCpMessage message = WxCpMessage
@@ -112,13 +135,19 @@ public class WxCpMessageServiceImplTest {
System.out.println(messageSendResult.getInvalidTagList());
}
+ /**
+ * Test send message text card.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendMessage_textCard() throws WxErrorException {
WxCpMessage message = WxCpMessage
.TEXTCARD()
.toUser(configStorage.getUserId())
.btnTxt("更多")
- .description("2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
")
+ .description("2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
")
.url("URL")
.title("领奖通知")
.build();
@@ -131,6 +160,11 @@ public class WxCpMessageServiceImplTest {
System.out.println(messageSendResult.getInvalidTagList());
}
+ /**
+ * Test send message mini program notice.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendMessage_miniProgram_notice() throws WxErrorException {
WxCpMessage message = WxCpMessage
@@ -154,6 +188,11 @@ public class WxCpMessageServiceImplTest {
System.out.println(messageSendResult.getInvalidTagList());
}
+ /**
+ * Test send linked corp message.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testSendLinkedCorpMessage() throws WxErrorException {
this.wxService.getMessageService().sendLinkedCorpMessage(WxCpLinkedCorpMessage.builder()
@@ -163,11 +202,19 @@ public class WxCpMessageServiceImplTest {
.build());
}
+ /**
+ * Test send.
+ */
@Test
public void testSend() {
// see other test methods
}
+ /**
+ * Test get statistics.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetStatistics() throws WxErrorException {
final WxCpMessageSendStatistics statistics = this.wxService.getMessageService().getStatistics(1);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImplTest.java
index 4df875633..ca45be64c 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImplTest.java
@@ -23,12 +23,22 @@ public class WxCpOAuth2ServiceImplTest {
@Inject
private WxCpService wxService;
+ /**
+ * Test get user detail.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetUserDetail() throws WxErrorException {
WxCpUserDetail userDetail = this.wxService.getOauth2Service().getUserDetail("b");
System.out.println(userDetail);
}
+ /**
+ * Test get user info.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGetUserInfo() throws WxErrorException {
final WxCpOauth2UserInfo result = this.wxService.getOauth2Service().getUserInfo("abc");
@@ -36,6 +46,9 @@ public class WxCpOAuth2ServiceImplTest {
System.out.println(result);
}
+ /**
+ * Test build authorization url.
+ */
@Test
public void testBuildAuthorizationUrl() {
}
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImplTest.java
index 9c182923f..befa11511 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaCalendarServiceImplTest.java
@@ -9,6 +9,7 @@ import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
@@ -16,17 +17,23 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* 单元测试.
*
- * @author Binary Wang
- * created on 2020-09-20
+ * @author Binary Wang created on 2020-09-20
*/
-
@Test
@Guice(modules = ApiTestModule.class)
public class WxCpOaCalendarServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
private final String calId = "wcbBJNCQAARipW967iE8DKPAp5Kb96qQ";
+ /**
+ * Test add.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testAdd() throws WxErrorException {
this.wxService.getOaCalendarService().add(WxCpOaCalendar.builder()
@@ -41,6 +48,11 @@ public class WxCpOaCalendarServiceImplTest {
.build());
}
+ /**
+ * Test update.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUpdate() throws WxErrorException {
this.wxService.getOaCalendarService().update(WxCpOaCalendar.builder()
@@ -56,12 +68,22 @@ public class WxCpOaCalendarServiceImplTest {
.build());
}
+ /**
+ * Test get.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGet() throws WxErrorException {
- final List calendars = this.wxService.getOaCalendarService().get(Arrays.asList(calId));
+ final List calendars = this.wxService.getOaCalendarService().get(Collections.singletonList(calId));
assertThat(calendars).isNotEmpty();
}
+ /**
+ * Test delete.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testDelete() throws WxErrorException {
this.wxService.getOaCalendarService().delete(calId);
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImplTest.java
index ab8fb9f01..c6ed846e8 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpOaMeetingRoomServiceImplTest.java
@@ -16,16 +16,22 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* 单元测试.
*
- * @author Binary Wang
- * created on 2020-09-20
+ * @author Binary Wang created on 2020-09-20
*/
-
@Test
@Guice(modules = ApiTestModule.class)
public class WxCpOaMeetingRoomServiceImplTest {
+ /**
+ * The Wx service.
+ */
@Inject
protected WxCpService wxService;
+ /**
+ * Test add.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testAdd() throws WxErrorException {
this.wxService.getOaMeetingRoomService().addMeetingRoom(WxCpOaMeetingRoom.builder()
@@ -40,6 +46,11 @@ public class WxCpOaMeetingRoomServiceImplTest {
}
+ /**
+ * Test update.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testUpdate() throws WxErrorException {
this.wxService.getOaMeetingRoomService().editMeetingRoom(WxCpOaMeetingRoom.builder()
@@ -53,9 +64,15 @@ public class WxCpOaMeetingRoomServiceImplTest {
.build());
}
+ /**
+ * Test get.
+ *
+ * @throws WxErrorException the wx error exception
+ */
@Test
public void testGet() throws WxErrorException {
- final List meetingRooms = this.wxService.getOaMeetingRoomService().listMeetingRoom(WxCpOaMeetingRoom.builder()
+ final List