Skip to content

Commit d3f6023

Browse files
committed
:art: 优化部分javadoc文档和单元测试代码
1 parent 7494de9 commit d3f6023

File tree

3 files changed

+37
-40
lines changed

3 files changed

+37
-40
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## WxJava - 微信开发 Java SDK
22

33
[![码云Gitee](https://gitee.com/binary/weixin-java-tools/badge/star.svg?theme=blue)](https://gitee.com/binary/weixin-java-tools)
4-
[![Github](https://img.shields.io/github/stars/Wechat-Group/WxJava?logo=github&style=flat)](https://github.com/binarywang/WxJava)
5-
[![GitHub release](https://img.shields.io/github/release/Wechat-Group/WxJava.svg)](https://github.com/binarywang/WxJava/releases)
4+
[![Github](https://img.shields.io/github/stars/binarywang/WxJava?logo=github&style=flat)](https://github.com/binarywang/WxJava)
5+
[![GitHub release](https://img.shields.io/github/release/binarywang/WxJava.svg)](https://github.com/binarywang/WxJava/releases)
66
[![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/wx-java.svg)](http://mvnrepository.com/artifact/com.github.binarywang/wx-java)
7-
[![Build Status](https://img.shields.io/circleci/project/github/Wechat-Group/WxJava/develop.svg?sanitize=true)](https://circleci.com/gh/Wechat-Group/WxJava/tree/develop)
7+
[![Build Status](https://img.shields.io/circleci/project/github/binarywang/WxJava/develop.svg?sanitize=true)](https://circleci.com/gh/binarywang/WxJava/tree/develop)
88
[![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-支持-blue.svg)](https://www.jetbrains.com/?from=WxJava-weixin-java-tools)
99
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
1010

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/WxCpTpDepartmentService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public interface WxCpTpDepartmentService {
1717
* <pre>
1818
* 部门管理接口 - 创建部门.
1919
* 最多支持创建500个部门
20-
* 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90205
20+
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#90000/90135/90205">...</a>
2121
* </pre>
2222
*
2323
* @param depart 部门
@@ -29,7 +29,7 @@ public interface WxCpTpDepartmentService {
2929
/**
3030
* <pre>
3131
* 部门管理接口 - 获取部门列表.
32-
* 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
32+
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#90000/90135/90208">...</a>
3333
* </pre>
3434
*
3535
* @param id 部门id。获取指定部门及其下的子部门。非必需,可为null
@@ -42,7 +42,7 @@ public interface WxCpTpDepartmentService {
4242
/**
4343
* <pre>
4444
* 部门管理接口 - 更新部门.
45-
* 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90206
45+
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#90000/90135/90206">...</a>
4646
* 如果id为0(未部门),1(黑名单),2(星标组),或者不存在的id,微信会返回系统繁忙的错误
4747
* </pre>
4848
*
@@ -54,7 +54,7 @@ public interface WxCpTpDepartmentService {
5454
/**
5555
* <pre>
5656
* 部门管理接口 - 删除部门.
57-
* 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90207
57+
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#90000/90135/90207">...</a>
5858
* 应用须拥有指定部门的管理权限
5959
* </pre>
6060
*
@@ -66,7 +66,7 @@ public interface WxCpTpDepartmentService {
6666
/**
6767
* <pre>
6868
* 部门管理接口 - 获取部门列表.
69-
* 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
69+
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#90000/90135/90208">...</a>
7070
* </pre>
7171
*
7272
* @param corpId the corp id

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpOaWeDriveServiceTest.java

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ public void test() throws Exception {
5656
String fileId2 = "s.ww45d3e188865aca30.652091685u4h_f.652696024TU4P";
5757

5858

59-
/**
59+
/*
6060
* 获取分享链接
6161
*/
6262
WxCpFileShare fileShare = cpService.getOaWeDriveService().fileShare(uId, fileId2);
6363
log.info("获取分享链接返回结果为:{}", fileShare.toJson());
6464

65-
/**
65+
/*
6666
* 分享设置
6767
*/
6868
WxCpBaseResp fileSetting = cpService.getOaWeDriveService().fileSetting(uId, fileId2, 2, 1);
6969
log.info("分享设置返回结果为:{}", fileSetting.toJson());
7070

71-
/**
71+
/*
7272
* 删除指定人
7373
*/
7474
WxCpFileAclDelRequest aclDelRequest = new WxCpFileAclDelRequest();
@@ -87,7 +87,7 @@ public void test() throws Exception {
8787
WxCpBaseResp aclDel = cpService.getOaWeDriveService().fileAclDel(aclDelRequest);
8888
log.info("删除指定人返回结果为:{}", aclDel.toJson());
8989

90-
/**
90+
/*
9191
* 新增指定人
9292
*/
9393
WxCpFileAclAddRequest fileAclAdd = new WxCpFileAclAddRequest();
@@ -105,49 +105,47 @@ public void test() throws Exception {
105105
WxCpBaseResp result = cpService.getOaWeDriveService().fileAclAdd(fileAclAdd);
106106
log.info("返回结果为:{}", result.toJson());
107107

108-
/**
108+
/*
109109
* 删除文件
110110
*/
111111
ArrayList<String> fileIds = Lists.newArrayList();
112112
fileIds.add(fileId);
113113
WxCpBaseResp fileDelete = cpService.getOaWeDriveService().fileDelete(fileIds);
114114
log.info("删除文件数据为:{}", fileDelete.toJson());
115115

116-
/**
117-
* 文件信息
116+
/*
117+
文件信息
118118
*/
119119
WxCpFileInfo fileInfo = cpService.getOaWeDriveService().fileInfo(fileId);
120120
log.info("fileInfo数据为:{}", fileInfo.toJson());
121121

122-
/**
123-
* 移动文件
122+
/*
123+
移动文件
124124
*/
125125
WxCpFileMoveRequest fileMoveRequest = new WxCpFileMoveRequest();
126-
fileMoveRequest.setUserId(uId);
127126
fileMoveRequest.setFatherId(spId);
128127
fileMoveRequest.setReplace(true);
129128
fileMoveRequest.setFileId(new String[]{fileId});
130129

131130
WxCpFileMove fileMove = cpService.getOaWeDriveService().fileMove(fileMoveRequest);
132131
log.info("fileMove数据为:{}", fileMove.toJson());
133132

134-
/**
135-
* 新建文件/微文档
133+
/*
134+
新建文件/微文档
136135
*/
137136
WxCpFileCreate fileCreate = cpService.getOaWeDriveService().fileCreate(spId, spId, 3, "新建微文档1");
138137
log.info("新建文件/微文档:{}", fileCreate.toJson());
139138

140-
/**
141-
* 下载文件
139+
/*
140+
下载文件
142141
*/
143142
WxCpFileDownload fileDownload = cpService.getOaWeDriveService().fileDownload(uId, fileId);
144143
log.info("下载文件为:{}", fileDownload.toJson());
145144

146-
/**
147-
* 上传文件
145+
/*
146+
上传文件
148147
*/
149148
WxCpFileUploadRequest fileUploadRequest = new WxCpFileUploadRequest();
150-
fileUploadRequest.setUserId(uId);
151149
fileUploadRequest.setSpaceId(spId);
152150
fileUploadRequest.setFatherId(spId);
153151
fileUploadRequest.setFileName("第一个文件");
@@ -165,17 +163,16 @@ public void test() throws Exception {
165163
WxCpFileUpload fileUpload = cpService.getOaWeDriveService().fileUpload(fileUploadRequest);
166164
log.info("上传文件为:{}", fileUpload.toJson());
167165

168-
/**
169-
* 重命名文件
166+
/*
167+
重命名文件
170168
*/
171-
WxCpFileRename fileRename = cpService.getOaWeDriveService().fileRename(uId, fileUpload.getFileId(), "新的名字呢");
169+
WxCpFileRename fileRename = cpService.getOaWeDriveService().fileRename(fileUpload.getFileId(), "新的名字呢");
172170
log.info("重命名文件:{}", fileRename.toJson());
173171

174-
/**
175-
* 获取文件列表
172+
/*
173+
获取文件列表
176174
*/
177175
WxCpFileListRequest fileListRequest = new WxCpFileListRequest();
178-
fileListRequest.setUserId(uId);
179176
fileListRequest.setSpaceId(spId);
180177
fileListRequest.setFatherId(spId);
181178
fileListRequest.setSortType(1);
@@ -185,7 +182,7 @@ public void test() throws Exception {
185182
WxCpFileList fileList = cpService.getOaWeDriveService().fileList(fileListRequest);
186183
log.info("获取文件列表为:{}", fileList.toJson());
187184

188-
/**
185+
/*
189186
* 权限管理
190187
*/
191188
WxCpSpaceSettingRequest spaceSettingRequest = new WxCpSpaceSettingRequest();
@@ -200,19 +197,19 @@ public void test() throws Exception {
200197
WxCpBaseResp spaceSetting = cpService.getOaWeDriveService().spaceSetting(spaceSettingRequest);
201198
log.info("权限管理信息为:{}", spaceSetting.toJson());
202199

203-
/**
200+
/*
204201
* 获取邀请链接
205202
*/
206203
WxCpSpaceShare spaceShare = cpService.getOaWeDriveService().spaceShare(uId, spId);
207204
log.info("获取邀请链接信息为:{}", spaceShare.toJson());
208205

209-
/**
206+
/*
210207
* 获取空间信息
211208
*/
212209
WxCpSpaceInfo data = cpService.getOaWeDriveService().spaceInfo(uId, spId);
213210
log.info("获取空间信息为:{}", data.toJson());
214211

215-
/**
212+
/*
216213
* 移除成员/部门
217214
*/
218215
WxCpSpaceAclDelRequest spaceAclDelRequest = new WxCpSpaceAclDelRequest();
@@ -231,7 +228,7 @@ public void test() throws Exception {
231228
WxCpBaseResp spaceAclDel = cpService.getOaWeDriveService().spaceAclDel(spaceAclDelRequest);
232229
log.info("移除成员/部门,返回数据为:{}", spaceAclDel.toJson());
233230

234-
/**
231+
/*
235232
* 添加成员/部门
236233
* https://developer.work.weixin.qq.com/document/path/93656
237234
*/
@@ -252,13 +249,13 @@ public void test() throws Exception {
252249
WxCpBaseResp wxCpBaseResp = cpService.getOaWeDriveService().spaceAclAdd(spaceAclAddRequest);
253250
log.info("添加成员/部门,返回数据为:{}", wxCpBaseResp.toJson());
254251

255-
/**
252+
/*
256253
* 获取空间信息
257254
*/
258255
WxCpSpaceInfo spaceInfo = cpService.getOaWeDriveService().spaceInfo("WangKai", "s.ww45d3e188865aca30.652091685u4h");
259256
log.info("获取空间信息,spaceInfo信息为:{}", spaceInfo.toJson());
260257

261-
/**
258+
/*
262259
* 新建空间
263260
*/
264261
WxCpSpaceCreateRequest request = new WxCpSpaceCreateRequest();
@@ -269,7 +266,7 @@ public void test() throws Exception {
269266
log.info("空间id为:{}", spaceCreateData.getSpaceId()); //
270267
log.info(spaceCreateData.toJson());
271268

272-
/**
269+
/*
273270
* 重命名空间
274271
*/
275272
WxCpSpaceRenameRequest wxCpSpaceRenameRequest = new WxCpSpaceRenameRequest();
@@ -279,7 +276,7 @@ public void test() throws Exception {
279276
WxCpBaseResp baseResp = cpService.getOaWeDriveService().spaceRename(wxCpSpaceRenameRequest);
280277
log.info("重命名成功:{}", baseResp.toJson());
281278

282-
/**
279+
/*
283280
* 解散空间
284281
*/
285282
WxCpBaseResp thisResp = cpService.getOaWeDriveService().spaceDismiss("WangKai", spaceCreateData.getSpaceId());

0 commit comments

Comments
 (0)