mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 22:11:40 +08:00
🎨 规范部分javadoc文档
This commit is contained in:
parent
ff62dc5af1
commit
df1aa5c9dc
@ -7,10 +7,10 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 企业微信 OA 审批数据.
|
||||
*
|
||||
* @author Element
|
||||
* @Package me.chanjar.weixin.cp.bean
|
||||
* @date 2019-04-06 14:36
|
||||
* @Description: 企业微信 OA 审批数据
|
||||
*/
|
||||
@Data
|
||||
public class WxCpApprovalDataResult implements Serializable {
|
||||
@ -27,17 +27,16 @@ public class WxCpApprovalDataResult implements Serializable {
|
||||
private Integer total;
|
||||
|
||||
@SerializedName("next_spnum")
|
||||
private Long nextSpnum;
|
||||
private Long nextSpNum;
|
||||
|
||||
private WxCpApprovalData[] data;
|
||||
|
||||
|
||||
@Data
|
||||
public static class WxCpApprovalData implements Serializable{
|
||||
|
||||
public static class WxCpApprovalData implements Serializable {
|
||||
private static final long serialVersionUID = -3051785319608491640L;
|
||||
|
||||
private String spname;
|
||||
@SerializedName("spname")
|
||||
private String spName;
|
||||
|
||||
@SerializedName("apply_name")
|
||||
private String applyName;
|
||||
@ -64,6 +63,6 @@ public class WxCpApprovalDataResult implements Serializable {
|
||||
private String applyUserId;
|
||||
|
||||
@SerializedName("comm")
|
||||
private Map<String,String> comm;
|
||||
private Map<String, String> comm;
|
||||
}
|
||||
}
|
||||
|
@ -7,14 +7,13 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业微信打卡数据.
|
||||
*
|
||||
* @author Element
|
||||
* @Package me.chanjar.weixin.cp.bean
|
||||
* @date 2019-04-06 11:01
|
||||
* @Description: 企业微信打卡数据
|
||||
*/
|
||||
@Data
|
||||
public class WxCpCheckinData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1915820330847799605L;
|
||||
|
||||
@SerializedName("userid")
|
||||
@ -42,7 +41,7 @@ public class WxCpCheckinData implements Serializable {
|
||||
private String wifiName;
|
||||
|
||||
@SerializedName("wifimac")
|
||||
private String wifiMAC;
|
||||
private String wifiMac;
|
||||
|
||||
private String notes;
|
||||
|
||||
|
@ -7,10 +7,10 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业微信打卡规则.
|
||||
*
|
||||
* @author Element
|
||||
* @Package me.chanjar.weixin.cp.bean
|
||||
* @date 2019-04-06 13:22
|
||||
* @Description: 企业微信打卡规则
|
||||
*/
|
||||
@Data
|
||||
public class WxCpCheckinOption implements Serializable {
|
||||
@ -21,10 +21,8 @@ public class WxCpCheckinOption implements Serializable {
|
||||
|
||||
private Group group;
|
||||
|
||||
|
||||
@Data
|
||||
public static class CheckinDate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5601722383347110974L;
|
||||
|
||||
private List<Integer> workdays;
|
||||
@ -36,15 +34,14 @@ public class WxCpCheckinOption implements Serializable {
|
||||
private Long flexTime;
|
||||
|
||||
@SerializedName("noneed_offwork")
|
||||
private Boolean noneedOffwork;
|
||||
private Boolean noNeedOffwork;
|
||||
|
||||
@SerializedName("limit_aheadtime")
|
||||
private Long limitAheadtime;
|
||||
private Long limitAheadTime;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class CheckinTime implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8579954143265336276L;
|
||||
|
||||
@SerializedName("work_sec")
|
||||
@ -90,16 +87,16 @@ public class WxCpCheckinOption implements Serializable {
|
||||
private Boolean needPhoto;
|
||||
|
||||
@SerializedName("note_can_use_local_pic")
|
||||
private Boolean note_can_use_local_pic;
|
||||
private Boolean noteCanUseLocalPic;
|
||||
|
||||
@SerializedName("allow_checkin_offworkday")
|
||||
private Boolean allow_checkin_offworkday;
|
||||
private Boolean allowCheckinOffWorkday;
|
||||
|
||||
@SerializedName("allow_apply_offworkday")
|
||||
private Boolean allow_apply_offworkday;
|
||||
private Boolean allowApplyOffWorkday;
|
||||
|
||||
@SerializedName("wifimac_infos")
|
||||
private List<WifiMACInfo> wifiMACInfos;
|
||||
private List<WifiMacInfo> wifiMacInfos;
|
||||
|
||||
@SerializedName("loc_infos")
|
||||
private List<LocInfo> locInfos;
|
||||
@ -107,8 +104,7 @@ public class WxCpCheckinOption implements Serializable {
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class WifiMACInfo implements Serializable{
|
||||
|
||||
public static class WifiMacInfo implements Serializable {
|
||||
private static final long serialVersionUID = -4657809185716627368L;
|
||||
|
||||
@SerializedName("wifiname")
|
||||
@ -119,8 +115,7 @@ public class WxCpCheckinOption implements Serializable {
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class LocInfo implements Serializable{
|
||||
|
||||
public static class LocInfo implements Serializable {
|
||||
private static final long serialVersionUID = -618965280668099608L;
|
||||
|
||||
private Long lat;
|
||||
@ -136,8 +131,7 @@ public class WxCpCheckinOption implements Serializable {
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SpeDay implements Serializable{
|
||||
|
||||
public static class SpeDay implements Serializable {
|
||||
private static final long serialVersionUID = -3538818921359212748L;
|
||||
|
||||
private Long timestamp;
|
||||
|
@ -7,10 +7,10 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公费电话拨打记录.
|
||||
*
|
||||
* @author Element
|
||||
* @Package me.chanjar.weixin.cp.bean
|
||||
* @date 2019-04-06 15:38
|
||||
* @Description: 公费电话拨打记录
|
||||
*/
|
||||
@Data
|
||||
public class WxCpDialRecord implements Serializable {
|
||||
@ -39,7 +39,7 @@ public class WxCpDialRecord implements Serializable {
|
||||
* 主叫信息
|
||||
*/
|
||||
@Data
|
||||
public static class Caller implements Serializable{
|
||||
public static class Caller implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4792200404338145607L;
|
||||
|
||||
@ -53,7 +53,7 @@ public class WxCpDialRecord implements Serializable {
|
||||
* 被叫信息
|
||||
*/
|
||||
@Data
|
||||
public static class Callee implements Serializable{
|
||||
public static class Callee implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2390963671336179550L;
|
||||
|
||||
|
@ -1,52 +1,30 @@
|
||||
/**
|
||||
* 对公众平台发送给公众账号的消息加解密示例代码.
|
||||
*
|
||||
* @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;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
|
||||
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
|
||||
|
||||
public class WxCpTpCryptUtil extends WxCryptUtil {
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*
|
||||
* @param wxCpConfigStorage
|
||||
*/
|
||||
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
|
||||
/*
|
||||
* @param token 公众平台上,开发者设置的token
|
||||
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
|
||||
* @param appidOrCorpid 公众平台corpId
|
||||
*/
|
||||
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
|
||||
String token = wxCpTpConfigStorage.getToken();
|
||||
String corpId = wxCpTpConfigStorage.getCorpId();
|
||||
|
||||
this.token = token;
|
||||
this.appidOrCorpid = corpId;
|
||||
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package me.chanjar.weixin.cp.util.crypto;
|
||||
|
||||
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
|
||||
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
/**
|
||||
* @author someone
|
||||
*/
|
||||
public class WxCpTpCryptUtil extends WxCryptUtil {
|
||||
/**
|
||||
* 构造函数.
|
||||
*/
|
||||
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
|
||||
/*
|
||||
* @param token 公众平台上,开发者设置的token
|
||||
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
|
||||
* @param appidOrCorpid 公众平台corpId
|
||||
*/
|
||||
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
|
||||
String token = wxCpTpConfigStorage.getToken();
|
||||
String corpId = wxCpTpConfigStorage.getCorpId();
|
||||
|
||||
this.token = token;
|
||||
this.appidOrCorpid = corpId;
|
||||
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,27 +10,27 @@ import java.util.List;
|
||||
|
||||
public interface WxMaTemplateService {
|
||||
/**
|
||||
* 获取小程序模板库标题列表
|
||||
* 获取小程序模板库标题列表.
|
||||
*/
|
||||
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_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_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>
|
||||
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
*
|
||||
* @param offset
|
||||
* @param count
|
||||
* @return
|
||||
*/
|
||||
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>
|
||||
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
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>
|
||||
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/add?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
*
|
||||
* @param id
|
||||
* @param keywordIdList
|
||||
* @return
|
||||
*/
|
||||
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>
|
||||
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
*
|
||||
* @param offset
|
||||
* @param count
|
||||
* @return
|
||||
*/
|
||||
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>
|
||||
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
|
||||
* </pre>
|
||||
*
|
||||
* @param templateId
|
||||
*/
|
||||
boolean delTemplate(String templateId) throws WxErrorException;
|
||||
}
|
||||
|
@ -179,7 +179,6 @@ public interface WxMpService {
|
||||
*/
|
||||
String[] getCallbackIP() throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 网络检测
|
||||
@ -189,7 +188,7 @@ public interface WxMpService {
|
||||
*
|
||||
* @param action 执行的检测动作
|
||||
* @param operator 指定平台从某个运营商进行检测
|
||||
* @throws WxErrorException
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxNetCheckResult netCheck(String action, String operator) throws WxErrorException;
|
||||
|
||||
@ -305,6 +304,8 @@ public interface WxMpService {
|
||||
* 设置当微信系统响应系统繁忙时,最大重试次数.
|
||||
* 默认:5次
|
||||
* </pre>
|
||||
*
|
||||
* @param maxRetryTimes 最大重试次数
|
||||
*/
|
||||
void setMaxRetryTimes(int maxRetryTimes);
|
||||
|
||||
@ -317,18 +318,21 @@ public interface WxMpService {
|
||||
|
||||
/**
|
||||
* 设置 {@link WxMpConfigStorage} 的实现. 兼容老版本
|
||||
*
|
||||
* @param wxConfigProvider .
|
||||
*/
|
||||
void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider);
|
||||
|
||||
/**
|
||||
* {@link Map<String, WxMpConfigStorage>} 加入新的 {@link WxMpConfigStorage},适用于动态添加新的微信公众号配置
|
||||
* Map里 加入新的 {@link WxMpConfigStorage},适用于动态添加新的微信公众号配置.
|
||||
*
|
||||
* @param mpId 公众号id
|
||||
* @param configStorage 新的微信配置
|
||||
*/
|
||||
void addConfigStorage(String mpId, WxMpConfigStorage configStorage);
|
||||
|
||||
/**
|
||||
* 从{@link Map<String, WxMpConfigStorage>} 移除 {@link String mpId} 所对应的 {@link WxMpConfigStorage},适用于动态移除微信公众号配置
|
||||
* 从 Map中 移除 {@link String mpId} 所对应的 {@link WxMpConfigStorage},适用于动态移除微信公众号配置.
|
||||
*
|
||||
* @param mpId 对应公众号的标识
|
||||
*/
|
||||
@ -351,7 +355,7 @@ public interface WxMpService {
|
||||
void setMultiConfigStorages(Map<String, WxMpConfigStorage> configStorages, String defaultMpId);
|
||||
|
||||
/**
|
||||
* 进行相应的公众号切换
|
||||
* 进行相应的公众号切换.
|
||||
*
|
||||
* @param mpId 公众号标识
|
||||
* @return 切换是否成功
|
||||
@ -359,7 +363,7 @@ public interface WxMpService {
|
||||
boolean switchover(String mpId);
|
||||
|
||||
/**
|
||||
* 进行相应的公众号切换
|
||||
* 进行相应的公众号切换.
|
||||
*
|
||||
* @param mpId 公众号标识
|
||||
* @return 切换成功,则返回当前对象,方便链式调用,否则抛出异常
|
||||
@ -484,6 +488,8 @@ public interface WxMpService {
|
||||
void initHttp();
|
||||
|
||||
/**
|
||||
* 获取RequestHttp对象.
|
||||
*
|
||||
* @return RequestHttp对象
|
||||
*/
|
||||
RequestHttp getRequestHttp();
|
||||
@ -516,40 +522,130 @@ public interface WxMpService {
|
||||
*/
|
||||
WxMpOcrService getOcrService();
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param kefuService .
|
||||
*/
|
||||
void setKefuService(WxMpKefuService kefuService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param materialService .
|
||||
*/
|
||||
void setMaterialService(WxMpMaterialService materialService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param menuService .
|
||||
*/
|
||||
void setMenuService(WxMpMenuService menuService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param userService .
|
||||
*/
|
||||
void setUserService(WxMpUserService userService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param tagService .
|
||||
*/
|
||||
void setTagService(WxMpUserTagService tagService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param qrCodeService .
|
||||
*/
|
||||
void setQrCodeService(WxMpQrcodeService qrCodeService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param cardService .
|
||||
*/
|
||||
void setCardService(WxMpCardService cardService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param storeService .
|
||||
*/
|
||||
void setStoreService(WxMpStoreService storeService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param dataCubeService .
|
||||
*/
|
||||
void setDataCubeService(WxMpDataCubeService dataCubeService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param blackListService .
|
||||
*/
|
||||
void setBlackListService(WxMpUserBlacklistService blackListService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param templateMsgService .
|
||||
*/
|
||||
void setTemplateMsgService(WxMpTemplateMsgService templateMsgService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param deviceService .
|
||||
*/
|
||||
void setDeviceService(WxMpDeviceService deviceService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param shakeService .
|
||||
*/
|
||||
void setShakeService(WxMpShakeService shakeService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param memberCardService .
|
||||
*/
|
||||
void setMemberCardService(WxMpMemberCardService memberCardService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param massMessageService .
|
||||
*/
|
||||
void setMassMessageService(WxMpMassMessageService massMessageService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param aiOpenService .
|
||||
*/
|
||||
void setAiOpenService(WxMpAiOpenService aiOpenService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param marketingService .
|
||||
*/
|
||||
void setMarketingService(WxMpMarketingService marketingService);
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param ocrService .
|
||||
*/
|
||||
void setOcrService(WxMpOcrService ocrService);
|
||||
|
||||
/**
|
||||
@ -559,5 +655,10 @@ public interface WxMpService {
|
||||
*/
|
||||
WxMpCommentService getCommentService();
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @param commentService .
|
||||
*/
|
||||
void setCommentService(WxMpCommentService commentService);
|
||||
}
|
||||
|
@ -3,11 +3,13 @@ package me.chanjar.weixin.mp.bean.card;
|
||||
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 {
|
||||
private static final long serialVersionUID = -3502867243738689870L;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
|
@ -1,25 +1,26 @@
|
||||
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 {
|
||||
MEMBER_CARD("MEMBER_CARD"),
|
||||
GROUPON("GROUPON"),
|
||||
CASH("CASH"),
|
||||
DISCOUNT("DISCOUNT"),
|
||||
GIFT("GIFT"),
|
||||
GENERAL_COUPON("GENERAL_COUPON");
|
||||
MEMBER_CARD("MEMBER_CARD"),
|
||||
GROUPON("GROUPON"),
|
||||
CASH("CASH"),
|
||||
DISCOUNT("DISCOUNT"),
|
||||
GIFT("GIFT"),
|
||||
GENERAL_COUPON("GENERAL_COUPON");
|
||||
|
||||
private String code;
|
||||
private String code;
|
||||
|
||||
WxCardType(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
WxCardType(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 快速创建的小程序的账号基本信息.
|
||||
*
|
||||
* @author Hipple
|
||||
* @description 快速创建的小程序的账号基本信息
|
||||
* @since 2019/1/23 14:39
|
||||
*/
|
||||
@Data
|
||||
|
@ -7,8 +7,9 @@ import lombok.EqualsAndHashCode;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 获取小程序已经设置的类目结果类.
|
||||
*
|
||||
* @author Hipple
|
||||
* @description 获取小程序已经设置的类目结果类
|
||||
* @since 2019/1/26 18:27
|
||||
*/
|
||||
@Data
|
||||
|
@ -5,8 +5,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 微信认证名称检测结果类.
|
||||
*
|
||||
* @author Hipple
|
||||
* @description 微信认证名称检测结果类
|
||||
* @since 2019/1/26 17:39
|
||||
*/
|
||||
@Data
|
||||
|
@ -5,8 +5,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 查询改名状态实体类.
|
||||
*
|
||||
* @author Hipple
|
||||
* @description 查询改名状态实体类
|
||||
* @since 2019/1/26 17:52
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -5,8 +5,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 设置小程序名称结果类.
|
||||
*
|
||||
* @author Hipple
|
||||
* @description 设置小程序名称结果类
|
||||
* @since 2019/1/26 17:39
|
||||
*/
|
||||
@Data
|
||||
|
@ -8,13 +8,15 @@ import me.chanjar.weixin.open.bean.result.WxFastMaAccountBasicInfoResult;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @author Hipple
|
||||
* @description
|
||||
* @since 2019/1/23 15:02
|
||||
*/
|
||||
public class WxFastMaAccountBasicInfoGsonAdapter implements JsonDeserializer<WxFastMaAccountBasicInfoResult> {
|
||||
@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();
|
||||
JsonObject jsonObject = jsonElement.getAsJsonObject();
|
||||
|
||||
@ -24,19 +26,22 @@ public class WxFastMaAccountBasicInfoGsonAdapter implements JsonDeserializer<WxF
|
||||
accountBasicInfo.setPrincipalName(GsonHelper.getString(jsonObject, "principal_name"));
|
||||
accountBasicInfo.setRealnameStatus(GsonHelper.getInteger(jsonObject, "realname_status"));
|
||||
|
||||
WxFastMaAccountBasicInfoResult.WxVerifyInfo verifyInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("wx_verify_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.WxVerifyInfo>() {
|
||||
}.getType());
|
||||
WxFastMaAccountBasicInfoResult.WxVerifyInfo verifyInfo = WxOpenGsonBuilder.create()
|
||||
.fromJson(jsonObject.get("wx_verify_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.WxVerifyInfo>() {
|
||||
}.getType());
|
||||
accountBasicInfo.setWxVerifyInfo(verifyInfo);
|
||||
|
||||
WxFastMaAccountBasicInfoResult.SignatureInfo signatureInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("signature_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.SignatureInfo>() {
|
||||
}.getType());
|
||||
WxFastMaAccountBasicInfoResult.SignatureInfo signatureInfo = WxOpenGsonBuilder.create()
|
||||
.fromJson(jsonObject.get("signature_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.SignatureInfo>() {
|
||||
}.getType());
|
||||
accountBasicInfo.setSignatureInfo(signatureInfo);
|
||||
|
||||
WxFastMaAccountBasicInfoResult.HeadImageInfo headImageInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("head_image_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.HeadImageInfo>() {
|
||||
}.getType());
|
||||
WxFastMaAccountBasicInfoResult.HeadImageInfo headImageInfo = WxOpenGsonBuilder.create()
|
||||
.fromJson(jsonObject.get("head_image_info"),
|
||||
new TypeToken<WxFastMaAccountBasicInfoResult.HeadImageInfo>() {
|
||||
}.getType());
|
||||
accountBasicInfo.setHeadImageInfo(headImageInfo);
|
||||
|
||||
return accountBasicInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user