🎨 规范部分javadoc文档

This commit is contained in:
Binary Wang 2019-09-21 23:17:15 +08:00
parent ff62dc5af1
commit df1aa5c9dc
15 changed files with 215 additions and 148 deletions

View File

@ -7,10 +7,10 @@ import java.io.Serializable;
import java.util.Map; import java.util.Map;
/** /**
* 企业微信 OA 审批数据.
*
* @author Element * @author Element
* @Package me.chanjar.weixin.cp.bean
* @date 2019-04-06 14:36 * @date 2019-04-06 14:36
* @Description: 企业微信 OA 审批数据
*/ */
@Data @Data
public class WxCpApprovalDataResult implements Serializable { public class WxCpApprovalDataResult implements Serializable {
@ -27,17 +27,16 @@ public class WxCpApprovalDataResult implements Serializable {
private Integer total; private Integer total;
@SerializedName("next_spnum") @SerializedName("next_spnum")
private Long nextSpnum; private Long nextSpNum;
private WxCpApprovalData[] data; private WxCpApprovalData[] data;
@Data @Data
public static class WxCpApprovalData implements Serializable { public static class WxCpApprovalData implements Serializable {
private static final long serialVersionUID = -3051785319608491640L; private static final long serialVersionUID = -3051785319608491640L;
@SerializedName("spname")
private String spname; private String spName;
@SerializedName("apply_name") @SerializedName("apply_name")
private String applyName; private String applyName;

View File

@ -7,14 +7,13 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* 企业微信打卡数据.
*
* @author Element * @author Element
* @Package me.chanjar.weixin.cp.bean
* @date 2019-04-06 11:01 * @date 2019-04-06 11:01
* @Description: 企业微信打卡数据
*/ */
@Data @Data
public class WxCpCheckinData implements Serializable { public class WxCpCheckinData implements Serializable {
private static final long serialVersionUID = 1915820330847799605L; private static final long serialVersionUID = 1915820330847799605L;
@SerializedName("userid") @SerializedName("userid")
@ -42,7 +41,7 @@ public class WxCpCheckinData implements Serializable {
private String wifiName; private String wifiName;
@SerializedName("wifimac") @SerializedName("wifimac")
private String wifiMAC; private String wifiMac;
private String notes; private String notes;

View File

@ -7,10 +7,10 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* 企业微信打卡规则.
*
* @author Element * @author Element
* @Package me.chanjar.weixin.cp.bean
* @date 2019-04-06 13:22 * @date 2019-04-06 13:22
* @Description: 企业微信打卡规则
*/ */
@Data @Data
public class WxCpCheckinOption implements Serializable { public class WxCpCheckinOption implements Serializable {
@ -21,10 +21,8 @@ public class WxCpCheckinOption implements Serializable {
private Group group; private Group group;
@Data @Data
public static class CheckinDate implements Serializable { public static class CheckinDate implements Serializable {
private static final long serialVersionUID = -5601722383347110974L; private static final long serialVersionUID = -5601722383347110974L;
private List<Integer> workdays; private List<Integer> workdays;
@ -36,15 +34,14 @@ public class WxCpCheckinOption implements Serializable {
private Long flexTime; private Long flexTime;
@SerializedName("noneed_offwork") @SerializedName("noneed_offwork")
private Boolean noneedOffwork; private Boolean noNeedOffwork;
@SerializedName("limit_aheadtime") @SerializedName("limit_aheadtime")
private Long limitAheadtime; private Long limitAheadTime;
} }
@Data @Data
public static class CheckinTime implements Serializable { public static class CheckinTime implements Serializable {
private static final long serialVersionUID = -8579954143265336276L; private static final long serialVersionUID = -8579954143265336276L;
@SerializedName("work_sec") @SerializedName("work_sec")
@ -90,16 +87,16 @@ public class WxCpCheckinOption implements Serializable {
private Boolean needPhoto; private Boolean needPhoto;
@SerializedName("note_can_use_local_pic") @SerializedName("note_can_use_local_pic")
private Boolean note_can_use_local_pic; private Boolean noteCanUseLocalPic;
@SerializedName("allow_checkin_offworkday") @SerializedName("allow_checkin_offworkday")
private Boolean allow_checkin_offworkday; private Boolean allowCheckinOffWorkday;
@SerializedName("allow_apply_offworkday") @SerializedName("allow_apply_offworkday")
private Boolean allow_apply_offworkday; private Boolean allowApplyOffWorkday;
@SerializedName("wifimac_infos") @SerializedName("wifimac_infos")
private List<WifiMACInfo> wifiMACInfos; private List<WifiMacInfo> wifiMacInfos;
@SerializedName("loc_infos") @SerializedName("loc_infos")
private List<LocInfo> locInfos; private List<LocInfo> locInfos;
@ -107,8 +104,7 @@ public class WxCpCheckinOption implements Serializable {
} }
@Data @Data
public static class WifiMACInfo implements Serializable{ public static class WifiMacInfo implements Serializable {
private static final long serialVersionUID = -4657809185716627368L; private static final long serialVersionUID = -4657809185716627368L;
@SerializedName("wifiname") @SerializedName("wifiname")
@ -120,7 +116,6 @@ public class WxCpCheckinOption implements Serializable {
@Data @Data
public static class LocInfo implements Serializable { public static class LocInfo implements Serializable {
private static final long serialVersionUID = -618965280668099608L; private static final long serialVersionUID = -618965280668099608L;
private Long lat; private Long lat;
@ -137,7 +132,6 @@ public class WxCpCheckinOption implements Serializable {
@Data @Data
public static class SpeDay implements Serializable { public static class SpeDay implements Serializable {
private static final long serialVersionUID = -3538818921359212748L; private static final long serialVersionUID = -3538818921359212748L;
private Long timestamp; private Long timestamp;

View File

@ -7,10 +7,10 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* 公费电话拨打记录.
*
* @author Element * @author Element
* @Package me.chanjar.weixin.cp.bean
* @date 2019-04-06 15:38 * @date 2019-04-06 15:38
* @Description: 公费电话拨打记录
*/ */
@Data @Data
public class WxCpDialRecord implements Serializable { public class WxCpDialRecord implements Serializable {

View File

@ -1,37 +1,15 @@
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
* <p>
* 针对org.apache.commons.codec.binary.Base64
* 需要导入架包commons-codec-1.9或commons-codec-1.8等其他版本
* 官方下载地址http://commons.apache.org/proper/commons-codec/download_codec.cgi
* <p>
* 针对org.apache.commons.codec.binary.Base64
* 需要导入架包commons-codec-1.9或commons-codec-1.8等其他版本
* 官方下载地址http://commons.apache.org/proper/commons-codec/download_codec.cgi
*/
// ------------------------------------------------------------------------
/**
* 针对org.apache.commons.codec.binary.Base64
* 需要导入架包commons-codec-1.9或commons-codec-1.8等其他版本
* 官方下载地址http://commons.apache.org/proper/commons-codec/download_codec.cgi
*/
package me.chanjar.weixin.cp.util.crypto; package me.chanjar.weixin.cp.util.crypto;
import org.apache.commons.codec.binary.Base64;
import me.chanjar.weixin.common.util.crypto.WxCryptUtil; import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage; import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
import org.apache.commons.codec.binary.Base64;
public class WxCpTpCryptUtil extends WxCryptUtil {
/** /**
* 构造函数 * @author someone
* */
* @param wxCpConfigStorage public class WxCpTpCryptUtil extends WxCryptUtil {
/**
* 构造函数.
*/ */
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) { public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
/* /*

View File

@ -10,27 +10,27 @@ import java.util.List;
public interface WxMaTemplateService { public interface WxMaTemplateService {
/** /**
* 获取小程序模板库标题列表 * 获取小程序模板库标题列表.
*/ */
String TEMPLATE_LIBRARY_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list"; String TEMPLATE_LIBRARY_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list";
/** /**
* 获取模板库某个模板标题下关键词库 * 获取模板库某个模板标题下关键词库.
*/ */
String TEMPLATE_LIBRARY_KEYWORD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get"; String TEMPLATE_LIBRARY_KEYWORD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get";
/** /**
* 组合模板并添加至帐号下的个人模板库 * 组合模板并添加至帐号下的个人模板库.
*/ */
String TEMPLATE_ADD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/add"; String TEMPLATE_ADD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/add";
/** /**
* 获取帐号下已存在的模板列表 * 获取帐号下已存在的模板列表.
*/ */
String TEMPLATE_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/list"; String TEMPLATE_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/list";
/** /**
* 删除帐号下的某个模板 * 删除帐号下的某个模板.
*/ */
String TEMPLATE_DEL_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/del"; String TEMPLATE_DEL_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/del";
@ -41,10 +41,6 @@ public interface WxMaTemplateService {
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a> * 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a>
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=ACCESS_TOKEN * 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=ACCESS_TOKEN
* </pre> * </pre>
*
* @param offset
* @param count
* @return
*/ */
WxMaTemplateLibraryListResult findTemplateLibraryList(int offset, int count) throws WxErrorException; WxMaTemplateLibraryListResult findTemplateLibraryList(int offset, int count) throws WxErrorException;
@ -55,9 +51,6 @@ public interface WxMaTemplateService {
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a> * 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a>
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get?access_token=ACCESS_TOKEN * 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get?access_token=ACCESS_TOKEN
* </pre> * </pre>
*
* @param id
* @return
*/ */
WxMaTemplateLibraryGetResult findTemplateLibraryKeywordList(String id) throws WxErrorException; WxMaTemplateLibraryGetResult findTemplateLibraryKeywordList(String id) throws WxErrorException;
@ -68,10 +61,6 @@ public interface WxMaTemplateService {
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a> * 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a>
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/add?access_token=ACCESS_TOKEN * 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/add?access_token=ACCESS_TOKEN
* </pre> * </pre>
*
* @param id
* @param keywordIdList
* @return
*/ */
WxMaTemplateAddResult addTemplate(String id, List<Integer> keywordIdList) throws WxErrorException; WxMaTemplateAddResult addTemplate(String id, List<Integer> keywordIdList) throws WxErrorException;
@ -82,10 +71,6 @@ public interface WxMaTemplateService {
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a> * 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a>
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN * 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
* </pre> * </pre>
*
* @param offset
* @param count
* @return
*/ */
WxMaTemplateListResult findTemplateList(int offset, int count) throws WxErrorException; WxMaTemplateListResult findTemplateList(int offset, int count) throws WxErrorException;
@ -96,8 +81,6 @@ public interface WxMaTemplateService {
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a> * 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1500465446_j4CgR&token=&lang=zh_CN">获取小程序模板库标题列表</a>
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN * 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
* </pre> * </pre>
*
* @param templateId
*/ */
boolean delTemplate(String templateId) throws WxErrorException; boolean delTemplate(String templateId) throws WxErrorException;
} }

View File

@ -179,7 +179,6 @@ public interface WxMpService {
*/ */
String[] getCallbackIP() throws WxErrorException; String[] getCallbackIP() throws WxErrorException;
/** /**
* <pre> * <pre>
* 网络检测 * 网络检测
@ -189,7 +188,7 @@ public interface WxMpService {
* *
* @param action 执行的检测动作 * @param action 执行的检测动作
* @param operator 指定平台从某个运营商进行检测 * @param operator 指定平台从某个运营商进行检测
* @throws WxErrorException * @throws WxErrorException .
*/ */
WxNetCheckResult netCheck(String action, String operator) throws WxErrorException; WxNetCheckResult netCheck(String action, String operator) throws WxErrorException;
@ -305,6 +304,8 @@ public interface WxMpService {
* 设置当微信系统响应系统繁忙时最大重试次数. * 设置当微信系统响应系统繁忙时最大重试次数.
* 默认5次 * 默认5次
* </pre> * </pre>
*
* @param maxRetryTimes 最大重试次数
*/ */
void setMaxRetryTimes(int maxRetryTimes); void setMaxRetryTimes(int maxRetryTimes);
@ -317,18 +318,21 @@ public interface WxMpService {
/** /**
* 设置 {@link WxMpConfigStorage} 的实现. 兼容老版本 * 设置 {@link WxMpConfigStorage} 的实现. 兼容老版本
*
* @param wxConfigProvider .
*/ */
void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider); void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider);
/** /**
* {@link Map<String, WxMpConfigStorage>} 加入新的 {@link WxMpConfigStorage}适用于动态添加新的微信公众号配置 * Map里 加入新的 {@link WxMpConfigStorage}适用于动态添加新的微信公众号配置.
* *
* @param mpId 公众号id
* @param configStorage 新的微信配置 * @param configStorage 新的微信配置
*/ */
void addConfigStorage(String mpId, WxMpConfigStorage configStorage); void addConfigStorage(String mpId, WxMpConfigStorage configStorage);
/** /**
* {@link Map<String, WxMpConfigStorage>} 移除 {@link String mpId} 所对应的 {@link WxMpConfigStorage}适用于动态移除微信公众号配置 * Map中 移除 {@link String mpId} 所对应的 {@link WxMpConfigStorage}适用于动态移除微信公众号配置.
* *
* @param mpId 对应公众号的标识 * @param mpId 对应公众号的标识
*/ */
@ -351,7 +355,7 @@ public interface WxMpService {
void setMultiConfigStorages(Map<String, WxMpConfigStorage> configStorages, String defaultMpId); void setMultiConfigStorages(Map<String, WxMpConfigStorage> configStorages, String defaultMpId);
/** /**
* 进行相应的公众号切换 * 进行相应的公众号切换.
* *
* @param mpId 公众号标识 * @param mpId 公众号标识
* @return 切换是否成功 * @return 切换是否成功
@ -359,7 +363,7 @@ public interface WxMpService {
boolean switchover(String mpId); boolean switchover(String mpId);
/** /**
* 进行相应的公众号切换 * 进行相应的公众号切换.
* *
* @param mpId 公众号标识 * @param mpId 公众号标识
* @return 切换成功则返回当前对象方便链式调用否则抛出异常 * @return 切换成功则返回当前对象方便链式调用否则抛出异常
@ -484,6 +488,8 @@ public interface WxMpService {
void initHttp(); void initHttp();
/** /**
* 获取RequestHttp对象.
*
* @return RequestHttp对象 * @return RequestHttp对象
*/ */
RequestHttp getRequestHttp(); RequestHttp getRequestHttp();
@ -516,40 +522,130 @@ public interface WxMpService {
*/ */
WxMpOcrService getOcrService(); WxMpOcrService getOcrService();
/**
* .
*
* @param kefuService .
*/
void setKefuService(WxMpKefuService kefuService); void setKefuService(WxMpKefuService kefuService);
/**
* .
*
* @param materialService .
*/
void setMaterialService(WxMpMaterialService materialService); void setMaterialService(WxMpMaterialService materialService);
/**
* .
*
* @param menuService .
*/
void setMenuService(WxMpMenuService menuService); void setMenuService(WxMpMenuService menuService);
/**
* .
*
* @param userService .
*/
void setUserService(WxMpUserService userService); void setUserService(WxMpUserService userService);
/**
* .
*
* @param tagService .
*/
void setTagService(WxMpUserTagService tagService); void setTagService(WxMpUserTagService tagService);
/**
* .
*
* @param qrCodeService .
*/
void setQrCodeService(WxMpQrcodeService qrCodeService); void setQrCodeService(WxMpQrcodeService qrCodeService);
/**
* .
*
* @param cardService .
*/
void setCardService(WxMpCardService cardService); void setCardService(WxMpCardService cardService);
/**
* .
*
* @param storeService .
*/
void setStoreService(WxMpStoreService storeService); void setStoreService(WxMpStoreService storeService);
/**
* .
*
* @param dataCubeService .
*/
void setDataCubeService(WxMpDataCubeService dataCubeService); void setDataCubeService(WxMpDataCubeService dataCubeService);
/**
* .
*
* @param blackListService .
*/
void setBlackListService(WxMpUserBlacklistService blackListService); void setBlackListService(WxMpUserBlacklistService blackListService);
/**
* .
*
* @param templateMsgService .
*/
void setTemplateMsgService(WxMpTemplateMsgService templateMsgService); void setTemplateMsgService(WxMpTemplateMsgService templateMsgService);
/**
* .
*
* @param deviceService .
*/
void setDeviceService(WxMpDeviceService deviceService); void setDeviceService(WxMpDeviceService deviceService);
/**
* .
*
* @param shakeService .
*/
void setShakeService(WxMpShakeService shakeService); void setShakeService(WxMpShakeService shakeService);
/**
* .
*
* @param memberCardService .
*/
void setMemberCardService(WxMpMemberCardService memberCardService); void setMemberCardService(WxMpMemberCardService memberCardService);
/**
* .
*
* @param massMessageService .
*/
void setMassMessageService(WxMpMassMessageService massMessageService); void setMassMessageService(WxMpMassMessageService massMessageService);
/**
* .
*
* @param aiOpenService .
*/
void setAiOpenService(WxMpAiOpenService aiOpenService); void setAiOpenService(WxMpAiOpenService aiOpenService);
/**
* .
*
* @param marketingService .
*/
void setMarketingService(WxMpMarketingService marketingService); void setMarketingService(WxMpMarketingService marketingService);
/**
* .
*
* @param ocrService .
*/
void setOcrService(WxMpOcrService ocrService); void setOcrService(WxMpOcrService ocrService);
/** /**
@ -559,5 +655,10 @@ public interface WxMpService {
*/ */
WxMpCommentService getCommentService(); WxMpCommentService getCommentService();
/**
* .
*
* @param commentService .
*/
void setCommentService(WxMpCommentService commentService); void setCommentService(WxMpCommentService commentService);
} }

View File

@ -3,11 +3,13 @@ package me.chanjar.weixin.mp.bean.card;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @description 卡券返回结果基础类 * 卡券返回结果基础类.
* @author: fanxl *
* @date: 2019/1/22 0022 10:08 * @author fanxl
* @date 2019/1/22 0022 10:08
*/ */
public class BaseWxMpCardResult implements Serializable { public class BaseWxMpCardResult implements Serializable {
private static final long serialVersionUID = -3502867243738689870L;
/** /**
* 错误码 * 错误码

View File

@ -1,9 +1,10 @@
package me.chanjar.weixin.mp.enums; package me.chanjar.weixin.mp.enums;
/** /**
* @description: 微信卡券类型 * 微信卡券类型.
* @author: chenyixin *
* @create: 2019-09-07 23:33 * @author chenyixin
* @date 2019-09-07 23:33
**/ **/
public enum WxCardType { public enum WxCardType {
MEMBER_CARD("MEMBER_CARD"), MEMBER_CARD("MEMBER_CARD"),

View File

@ -5,8 +5,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* 快速创建的小程序的账号基本信息.
*
* @author Hipple * @author Hipple
* @description 快速创建的小程序的账号基本信息
* @since 2019/1/23 14:39 * @since 2019/1/23 14:39
*/ */
@Data @Data

View File

@ -7,8 +7,9 @@ import lombok.EqualsAndHashCode;
import java.util.List; import java.util.List;
/** /**
* 获取小程序已经设置的类目结果类.
*
* @author Hipple * @author Hipple
* @description 获取小程序已经设置的类目结果类
* @since 2019/1/26 18:27 * @since 2019/1/26 18:27
*/ */
@Data @Data

View File

@ -5,8 +5,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* 微信认证名称检测结果类.
*
* @author Hipple * @author Hipple
* @description 微信认证名称检测结果类
* @since 2019/1/26 17:39 * @since 2019/1/26 17:39
*/ */
@Data @Data

View File

@ -5,8 +5,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* 查询改名状态实体类.
*
* @author Hipple * @author Hipple
* @description 查询改名状态实体类
* @since 2019/1/26 17:52 * @since 2019/1/26 17:52
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)

View File

@ -5,8 +5,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* 设置小程序名称结果类.
*
* @author Hipple * @author Hipple
* @description 设置小程序名称结果类
* @since 2019/1/26 17:39 * @since 2019/1/26 17:39
*/ */
@Data @Data

View File

@ -8,13 +8,15 @@ import me.chanjar.weixin.open.bean.result.WxFastMaAccountBasicInfoResult;
import java.lang.reflect.Type; import java.lang.reflect.Type;
/** /**
* .
*
* @author Hipple * @author Hipple
* @description
* @since 2019/1/23 15:02 * @since 2019/1/23 15:02
*/ */
public class WxFastMaAccountBasicInfoGsonAdapter implements JsonDeserializer<WxFastMaAccountBasicInfoResult> { public class WxFastMaAccountBasicInfoGsonAdapter implements JsonDeserializer<WxFastMaAccountBasicInfoResult> {
@Override @Override
public WxFastMaAccountBasicInfoResult deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { public WxFastMaAccountBasicInfoResult deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
throws JsonParseException {
WxFastMaAccountBasicInfoResult accountBasicInfo = new WxFastMaAccountBasicInfoResult(); WxFastMaAccountBasicInfoResult accountBasicInfo = new WxFastMaAccountBasicInfoResult();
JsonObject jsonObject = jsonElement.getAsJsonObject(); JsonObject jsonObject = jsonElement.getAsJsonObject();
@ -24,17 +26,20 @@ public class WxFastMaAccountBasicInfoGsonAdapter implements JsonDeserializer<WxF
accountBasicInfo.setPrincipalName(GsonHelper.getString(jsonObject, "principal_name")); accountBasicInfo.setPrincipalName(GsonHelper.getString(jsonObject, "principal_name"));
accountBasicInfo.setRealnameStatus(GsonHelper.getInteger(jsonObject, "realname_status")); accountBasicInfo.setRealnameStatus(GsonHelper.getInteger(jsonObject, "realname_status"));
WxFastMaAccountBasicInfoResult.WxVerifyInfo verifyInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("wx_verify_info"), WxFastMaAccountBasicInfoResult.WxVerifyInfo verifyInfo = WxOpenGsonBuilder.create()
.fromJson(jsonObject.get("wx_verify_info"),
new TypeToken<WxFastMaAccountBasicInfoResult.WxVerifyInfo>() { new TypeToken<WxFastMaAccountBasicInfoResult.WxVerifyInfo>() {
}.getType()); }.getType());
accountBasicInfo.setWxVerifyInfo(verifyInfo); accountBasicInfo.setWxVerifyInfo(verifyInfo);
WxFastMaAccountBasicInfoResult.SignatureInfo signatureInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("signature_info"), WxFastMaAccountBasicInfoResult.SignatureInfo signatureInfo = WxOpenGsonBuilder.create()
.fromJson(jsonObject.get("signature_info"),
new TypeToken<WxFastMaAccountBasicInfoResult.SignatureInfo>() { new TypeToken<WxFastMaAccountBasicInfoResult.SignatureInfo>() {
}.getType()); }.getType());
accountBasicInfo.setSignatureInfo(signatureInfo); accountBasicInfo.setSignatureInfo(signatureInfo);
WxFastMaAccountBasicInfoResult.HeadImageInfo headImageInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("head_image_info"), WxFastMaAccountBasicInfoResult.HeadImageInfo headImageInfo = WxOpenGsonBuilder.create()
.fromJson(jsonObject.get("head_image_info"),
new TypeToken<WxFastMaAccountBasicInfoResult.HeadImageInfo>() { new TypeToken<WxFastMaAccountBasicInfoResult.HeadImageInfo>() {
}.getType()); }.getType());
accountBasicInfo.setHeadImageInfo(headImageInfo); accountBasicInfo.setHeadImageInfo(headImageInfo);