Skip to content

Commit df1aa5c

Browse files
committed
🎨 规范部分javadoc文档
1 parent ff62dc5 commit df1aa5c

File tree

15 files changed

+215
-148
lines changed

15 files changed

+215
-148
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpApprovalDataResult.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import java.util.Map;
88

99
/**
10+
* 企业微信 OA 审批数据.
11+
*
1012
* @author Element
11-
* @Package me.chanjar.weixin.cp.bean
1213
* @date 2019-04-06 14:36
13-
* @Description: 企业微信 OA 审批数据
1414
*/
1515
@Data
1616
public class WxCpApprovalDataResult implements Serializable {
@@ -27,17 +27,16 @@ public class WxCpApprovalDataResult implements Serializable {
2727
private Integer total;
2828

2929
@SerializedName("next_spnum")
30-
private Long nextSpnum;
30+
private Long nextSpNum;
3131

3232
private WxCpApprovalData[] data;
3333

3434

3535
@Data
36-
public static class WxCpApprovalData implements Serializable{
37-
36+
public static class WxCpApprovalData implements Serializable {
3837
private static final long serialVersionUID = -3051785319608491640L;
39-
40-
private String spname;
38+
@SerializedName("spname")
39+
private String spName;
4140

4241
@SerializedName("apply_name")
4342
private String applyName;
@@ -64,6 +63,6 @@ public static class WxCpApprovalData implements Serializable{
6463
private String applyUserId;
6564

6665
@SerializedName("comm")
67-
private Map<String,String> comm;
66+
private Map<String, String> comm;
6867
}
6968
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpCheckinData.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
import java.util.List;
88

99
/**
10+
* 企业微信打卡数据.
11+
*
1012
* @author Element
11-
* @Package me.chanjar.weixin.cp.bean
1213
* @date 2019-04-06 11:01
13-
* @Description: 企业微信打卡数据
1414
*/
1515
@Data
1616
public class WxCpCheckinData implements Serializable {
17-
1817
private static final long serialVersionUID = 1915820330847799605L;
1918

2019
@SerializedName("userid")
@@ -42,7 +41,7 @@ public class WxCpCheckinData implements Serializable {
4241
private String wifiName;
4342

4443
@SerializedName("wifimac")
45-
private String wifiMAC;
44+
private String wifiMac;
4645

4746
private String notes;
4847

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpCheckinOption.java

+11-17
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import java.util.List;
88

99
/**
10+
* 企业微信打卡规则.
11+
*
1012
* @author Element
11-
* @Package me.chanjar.weixin.cp.bean
1213
* @date 2019-04-06 13:22
13-
* @Description: 企业微信打卡规则
1414
*/
1515
@Data
1616
public class WxCpCheckinOption implements Serializable {
@@ -21,10 +21,8 @@ public class WxCpCheckinOption implements Serializable {
2121

2222
private Group group;
2323

24-
2524
@Data
2625
public static class CheckinDate implements Serializable {
27-
2826
private static final long serialVersionUID = -5601722383347110974L;
2927

3028
private List<Integer> workdays;
@@ -36,15 +34,14 @@ public static class CheckinDate implements Serializable {
3634
private Long flexTime;
3735

3836
@SerializedName("noneed_offwork")
39-
private Boolean noneedOffwork;
37+
private Boolean noNeedOffwork;
4038

4139
@SerializedName("limit_aheadtime")
42-
private Long limitAheadtime;
40+
private Long limitAheadTime;
4341
}
4442

4543
@Data
4644
public static class CheckinTime implements Serializable {
47-
4845
private static final long serialVersionUID = -8579954143265336276L;
4946

5047
@SerializedName("work_sec")
@@ -90,25 +87,24 @@ public static class Group implements Serializable {
9087
private Boolean needPhoto;
9188

9289
@SerializedName("note_can_use_local_pic")
93-
private Boolean note_can_use_local_pic;
90+
private Boolean noteCanUseLocalPic;
9491

9592
@SerializedName("allow_checkin_offworkday")
96-
private Boolean allow_checkin_offworkday;
93+
private Boolean allowCheckinOffWorkday;
9794

9895
@SerializedName("allow_apply_offworkday")
99-
private Boolean allow_apply_offworkday;
96+
private Boolean allowApplyOffWorkday;
10097

10198
@SerializedName("wifimac_infos")
102-
private List<WifiMACInfo> wifiMACInfos;
99+
private List<WifiMacInfo> wifiMacInfos;
103100

104101
@SerializedName("loc_infos")
105102
private List<LocInfo> locInfos;
106103

107104
}
108105

109106
@Data
110-
public static class WifiMACInfo implements Serializable{
111-
107+
public static class WifiMacInfo implements Serializable {
112108
private static final long serialVersionUID = -4657809185716627368L;
113109

114110
@SerializedName("wifiname")
@@ -119,8 +115,7 @@ public static class WifiMACInfo implements Serializable{
119115
}
120116

121117
@Data
122-
public static class LocInfo implements Serializable{
123-
118+
public static class LocInfo implements Serializable {
124119
private static final long serialVersionUID = -618965280668099608L;
125120

126121
private Long lat;
@@ -136,8 +131,7 @@ public static class LocInfo implements Serializable{
136131
}
137132

138133
@Data
139-
public static class SpeDay implements Serializable{
140-
134+
public static class SpeDay implements Serializable {
141135
private static final long serialVersionUID = -3538818921359212748L;
142136

143137
private Long timestamp;

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDialRecord.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import java.util.List;
88

99
/**
10+
* 公费电话拨打记录.
11+
*
1012
* @author Element
11-
* @Package me.chanjar.weixin.cp.bean
1213
* @date 2019-04-06 15:38
13-
* @Description: 公费电话拨打记录
1414
*/
1515
@Data
1616
public class WxCpDialRecord implements Serializable {
@@ -39,7 +39,7 @@ public class WxCpDialRecord implements Serializable {
3939
* 主叫信息
4040
*/
4141
@Data
42-
public static class Caller implements Serializable{
42+
public static class Caller implements Serializable {
4343

4444
private static final long serialVersionUID = 4792200404338145607L;
4545

@@ -53,7 +53,7 @@ public static class Caller implements Serializable{
5353
* 被叫信息
5454
*/
5555
@Data
56-
public static class Callee implements Serializable{
56+
public static class Callee implements Serializable {
5757

5858
private static final long serialVersionUID = 2390963671336179550L;
5959

Original file line numberDiff line numberDiff line change
@@ -1,52 +1,30 @@
1-
/**
2-
* 对公众平台发送给公众账号的消息加解密示例代码.
3-
*
4-
* @copyright Copyright (c) 1998-2014 Tencent Inc.
5-
* <p>
6-
* 针对org.apache.commons.codec.binary.Base64,
7-
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
8-
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
9-
* <p>
10-
* 针对org.apache.commons.codec.binary.Base64,
11-
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
12-
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
13-
*/
14-
15-
// ------------------------------------------------------------------------
16-
17-
/**
18-
* 针对org.apache.commons.codec.binary.Base64,
19-
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
20-
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
21-
*/
22-
package me.chanjar.weixin.cp.util.crypto;
23-
24-
import org.apache.commons.codec.binary.Base64;
25-
26-
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
27-
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
28-
29-
public class WxCpTpCryptUtil extends WxCryptUtil {
30-
31-
/**
32-
* 构造函数
33-
*
34-
* @param wxCpConfigStorage
35-
*/
36-
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
37-
/*
38-
* @param token 公众平台上,开发者设置的token
39-
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
40-
* @param appidOrCorpid 公众平台corpId
41-
*/
42-
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
43-
String token = wxCpTpConfigStorage.getToken();
44-
String corpId = wxCpTpConfigStorage.getCorpId();
45-
46-
this.token = token;
47-
this.appidOrCorpid = corpId;
48-
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
49-
}
50-
51-
52-
}
1+
package me.chanjar.weixin.cp.util.crypto;
2+
3+
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
4+
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
5+
import org.apache.commons.codec.binary.Base64;
6+
7+
/**
8+
* @author someone
9+
*/
10+
public class WxCpTpCryptUtil extends WxCryptUtil {
11+
/**
12+
* 构造函数.
13+
*/
14+
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
15+
/*
16+
* @param token 公众平台上,开发者设置的token
17+
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
18+
* @param appidOrCorpid 公众平台corpId
19+
*/
20+
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
21+
String token = wxCpTpConfigStorage.getToken();
22+
String corpId = wxCpTpConfigStorage.getCorpId();
23+
24+
this.token = token;
25+
this.appidOrCorpid = corpId;
26+
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
27+
}
28+
29+
30+
}

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaTemplateService.java

+5-22
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010

1111
public interface WxMaTemplateService {
1212
/**
13-
* 获取小程序模板库标题列表
13+
* 获取小程序模板库标题列表.
1414
*/
1515
String TEMPLATE_LIBRARY_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list";
1616

1717
/**
18-
* 获取模板库某个模板标题下关键词库
18+
* 获取模板库某个模板标题下关键词库.
1919
*/
2020
String TEMPLATE_LIBRARY_KEYWORD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get";
2121

2222
/**
23-
* 组合模板并添加至帐号下的个人模板库
23+
* 组合模板并添加至帐号下的个人模板库.
2424
*/
2525
String TEMPLATE_ADD_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/add";
2626

2727
/**
28-
* 获取帐号下已存在的模板列表
28+
* 获取帐号下已存在的模板列表.
2929
*/
3030
String TEMPLATE_LIST_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/list";
3131

3232
/**
33-
* 删除帐号下的某个模板
33+
* 删除帐号下的某个模板.
3434
*/
3535
String TEMPLATE_DEL_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/template/del";
3636

@@ -41,10 +41,6 @@ public interface WxMaTemplateService {
4141
* 详情请见: <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>
4242
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=ACCESS_TOKEN
4343
* </pre>
44-
*
45-
* @param offset
46-
* @param count
47-
* @return
4844
*/
4945
WxMaTemplateLibraryListResult findTemplateLibraryList(int offset, int count) throws WxErrorException;
5046

@@ -55,9 +51,6 @@ public interface WxMaTemplateService {
5551
* 详情请见: <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>
5652
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get?access_token=ACCESS_TOKEN
5753
* </pre>
58-
*
59-
* @param id
60-
* @return
6154
*/
6255
WxMaTemplateLibraryGetResult findTemplateLibraryKeywordList(String id) throws WxErrorException;
6356

@@ -68,10 +61,6 @@ public interface WxMaTemplateService {
6861
* 详情请见: <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>
6962
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/add?access_token=ACCESS_TOKEN
7063
* </pre>
71-
*
72-
* @param id
73-
* @param keywordIdList
74-
* @return
7564
*/
7665
WxMaTemplateAddResult addTemplate(String id, List<Integer> keywordIdList) throws WxErrorException;
7766

@@ -82,10 +71,6 @@ public interface WxMaTemplateService {
8271
* 详情请见: <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>
8372
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
8473
* </pre>
85-
*
86-
* @param offset
87-
* @param count
88-
* @return
8974
*/
9075
WxMaTemplateListResult findTemplateList(int offset, int count) throws WxErrorException;
9176

@@ -96,8 +81,6 @@ public interface WxMaTemplateService {
9681
* 详情请见: <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>
9782
* 接口url格式: https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN
9883
* </pre>
99-
*
100-
* @param templateId
10184
*/
10285
boolean delTemplate(String templateId) throws WxErrorException;
10386
}

0 commit comments

Comments
 (0)