From d3f6023d2ce8ce48393759662ee851276c32eab1 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 14 Dec 2024 00:45:24 +0800 Subject: [PATCH] =?UTF-8?q?:art=EF=BC=9A=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86javadoc=E6=96=87=E6=A1=A3=E5=92=8C=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- .../tp/service/WxCpTpDepartmentService.java | 10 +-- .../cp/api/WxCpOaWeDriveServiceTest.java | 61 +++++++++---------- 3 files changed, 37 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index ebd8a852c..c61c8d48d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ ## WxJava - 微信开发 Java SDK [![码云Gitee](https://gitee.com/binary/weixin-java-tools/badge/star.svg?theme=blue)](https://gitee.com/binary/weixin-java-tools) -[![Github](https://img.shields.io/github/stars/Wechat-Group/WxJava?logo=github&style=flat)](https://github.com/binarywang/WxJava) -[![GitHub release](https://img.shields.io/github/release/Wechat-Group/WxJava.svg)](https://github.com/binarywang/WxJava/releases) +[![Github](https://img.shields.io/github/stars/binarywang/WxJava?logo=github&style=flat)](https://github.com/binarywang/WxJava) +[![GitHub release](https://img.shields.io/github/release/binarywang/WxJava.svg)](https://github.com/binarywang/WxJava/releases) [![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/wx-java.svg)](http://mvnrepository.com/artifact/com.github.binarywang/wx-java) -[![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) +[![Build Status](https://img.shields.io/circleci/project/github/binarywang/WxJava/develop.svg?sanitize=true)](https://circleci.com/gh/binarywang/WxJava/tree/develop) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-支持-blue.svg)](https://www.jetbrains.com/?from=WxJava-weixin-java-tools) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 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 8cbd17d6d..706add84a 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 @@ -17,7 +17,7 @@ public interface WxCpTpDepartmentService { *
    * 部门管理接口 - 创建部门.
    * 最多支持创建500个部门
-   * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90205
+   * 详情请见: ...
    * 
* * @param depart 部门 @@ -29,7 +29,7 @@ public interface WxCpTpDepartmentService { /** *
    * 部门管理接口 - 获取部门列表.
-   * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
+   * 详情请见: ...
    * 
* * @param id 部门id。获取指定部门及其下的子部门。非必需,可为null @@ -42,7 +42,7 @@ public interface WxCpTpDepartmentService { /** *
    * 部门管理接口 - 更新部门.
-   * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90206
+   * 详情请见: ...
    * 如果id为0(未部门),1(黑名单),2(星标组),或者不存在的id,微信会返回系统繁忙的错误
    * 
* @@ -54,7 +54,7 @@ public interface WxCpTpDepartmentService { /** *
    * 部门管理接口 - 删除部门.
-   * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90207
+   * 详情请见: ...
    * 应用须拥有指定部门的管理权限
    * 
* @@ -66,7 +66,7 @@ public interface WxCpTpDepartmentService { /** *
    * 部门管理接口 - 获取部门列表.
-   * 详情请见: https://work.weixin.qq.com/api/doc#90000/90135/90208
+   * 详情请见: ...
    * 
* * @param corpId the corp id 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 365741c32..bd7599061 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 @@ -56,19 +56,19 @@ public class WxCpOaWeDriveServiceTest { String fileId2 = "s.ww45d3e188865aca30.652091685u4h_f.652696024TU4P"; - /** + /* * 获取分享链接 */ WxCpFileShare fileShare = cpService.getOaWeDriveService().fileShare(uId, fileId2); log.info("获取分享链接返回结果为:{}", fileShare.toJson()); - /** + /* * 分享设置 */ WxCpBaseResp fileSetting = cpService.getOaWeDriveService().fileSetting(uId, fileId2, 2, 1); log.info("分享设置返回结果为:{}", fileSetting.toJson()); - /** + /* * 删除指定人 */ WxCpFileAclDelRequest aclDelRequest = new WxCpFileAclDelRequest(); @@ -87,7 +87,7 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp aclDel = cpService.getOaWeDriveService().fileAclDel(aclDelRequest); log.info("删除指定人返回结果为:{}", aclDel.toJson()); - /** + /* * 新增指定人 */ WxCpFileAclAddRequest fileAclAdd = new WxCpFileAclAddRequest(); @@ -105,7 +105,7 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp result = cpService.getOaWeDriveService().fileAclAdd(fileAclAdd); log.info("返回结果为:{}", result.toJson()); - /** + /* * 删除文件 */ ArrayList fileIds = Lists.newArrayList(); @@ -113,17 +113,16 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp fileDelete = cpService.getOaWeDriveService().fileDelete(fileIds); log.info("删除文件数据为:{}", fileDelete.toJson()); - /** - * 文件信息 + /* + 文件信息 */ WxCpFileInfo fileInfo = cpService.getOaWeDriveService().fileInfo(fileId); log.info("fileInfo数据为:{}", fileInfo.toJson()); - /** - * 移动文件 + /* + 移动文件 */ WxCpFileMoveRequest fileMoveRequest = new WxCpFileMoveRequest(); - fileMoveRequest.setUserId(uId); fileMoveRequest.setFatherId(spId); fileMoveRequest.setReplace(true); fileMoveRequest.setFileId(new String[]{fileId}); @@ -131,23 +130,22 @@ public class WxCpOaWeDriveServiceTest { WxCpFileMove fileMove = cpService.getOaWeDriveService().fileMove(fileMoveRequest); log.info("fileMove数据为:{}", fileMove.toJson()); - /** - * 新建文件/微文档 + /* + 新建文件/微文档 */ WxCpFileCreate fileCreate = cpService.getOaWeDriveService().fileCreate(spId, spId, 3, "新建微文档1"); log.info("新建文件/微文档:{}", fileCreate.toJson()); - /** - * 下载文件 + /* + 下载文件 */ WxCpFileDownload fileDownload = cpService.getOaWeDriveService().fileDownload(uId, fileId); log.info("下载文件为:{}", fileDownload.toJson()); - /** - * 上传文件 + /* + 上传文件 */ WxCpFileUploadRequest fileUploadRequest = new WxCpFileUploadRequest(); - fileUploadRequest.setUserId(uId); fileUploadRequest.setSpaceId(spId); fileUploadRequest.setFatherId(spId); fileUploadRequest.setFileName("第一个文件"); @@ -165,17 +163,16 @@ public class WxCpOaWeDriveServiceTest { WxCpFileUpload fileUpload = cpService.getOaWeDriveService().fileUpload(fileUploadRequest); log.info("上传文件为:{}", fileUpload.toJson()); - /** - * 重命名文件 + /* + 重命名文件 */ - WxCpFileRename fileRename = cpService.getOaWeDriveService().fileRename(uId, fileUpload.getFileId(), "新的名字呢"); + WxCpFileRename fileRename = cpService.getOaWeDriveService().fileRename(fileUpload.getFileId(), "新的名字呢"); log.info("重命名文件:{}", fileRename.toJson()); - /** - * 获取文件列表 + /* + 获取文件列表 */ WxCpFileListRequest fileListRequest = new WxCpFileListRequest(); - fileListRequest.setUserId(uId); fileListRequest.setSpaceId(spId); fileListRequest.setFatherId(spId); fileListRequest.setSortType(1); @@ -185,7 +182,7 @@ public class WxCpOaWeDriveServiceTest { WxCpFileList fileList = cpService.getOaWeDriveService().fileList(fileListRequest); log.info("获取文件列表为:{}", fileList.toJson()); - /** + /* * 权限管理 */ WxCpSpaceSettingRequest spaceSettingRequest = new WxCpSpaceSettingRequest(); @@ -200,19 +197,19 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp spaceSetting = cpService.getOaWeDriveService().spaceSetting(spaceSettingRequest); log.info("权限管理信息为:{}", spaceSetting.toJson()); - /** + /* * 获取邀请链接 */ WxCpSpaceShare spaceShare = cpService.getOaWeDriveService().spaceShare(uId, spId); log.info("获取邀请链接信息为:{}", spaceShare.toJson()); - /** + /* * 获取空间信息 */ WxCpSpaceInfo data = cpService.getOaWeDriveService().spaceInfo(uId, spId); log.info("获取空间信息为:{}", data.toJson()); - /** + /* * 移除成员/部门 */ WxCpSpaceAclDelRequest spaceAclDelRequest = new WxCpSpaceAclDelRequest(); @@ -231,7 +228,7 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp spaceAclDel = cpService.getOaWeDriveService().spaceAclDel(spaceAclDelRequest); log.info("移除成员/部门,返回数据为:{}", spaceAclDel.toJson()); - /** + /* * 添加成员/部门 * https://developer.work.weixin.qq.com/document/path/93656 */ @@ -252,13 +249,13 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp wxCpBaseResp = cpService.getOaWeDriveService().spaceAclAdd(spaceAclAddRequest); log.info("添加成员/部门,返回数据为:{}", wxCpBaseResp.toJson()); - /** + /* * 获取空间信息 */ WxCpSpaceInfo spaceInfo = cpService.getOaWeDriveService().spaceInfo("WangKai", "s.ww45d3e188865aca30.652091685u4h"); log.info("获取空间信息,spaceInfo信息为:{}", spaceInfo.toJson()); - /** + /* * 新建空间 */ WxCpSpaceCreateRequest request = new WxCpSpaceCreateRequest(); @@ -269,7 +266,7 @@ public class WxCpOaWeDriveServiceTest { log.info("空间id为:{}", spaceCreateData.getSpaceId()); // log.info(spaceCreateData.toJson()); - /** + /* * 重命名空间 */ WxCpSpaceRenameRequest wxCpSpaceRenameRequest = new WxCpSpaceRenameRequest(); @@ -279,7 +276,7 @@ public class WxCpOaWeDriveServiceTest { WxCpBaseResp baseResp = cpService.getOaWeDriveService().spaceRename(wxCpSpaceRenameRequest); log.info("重命名成功:{}", baseResp.toJson()); - /** + /* * 解散空间 */ WxCpBaseResp thisResp = cpService.getOaWeDriveService().spaceDismiss("WangKai", spaceCreateData.getSpaceId());