🆕 #2656【企业微信】增加微盘文件管理部分接口

This commit is contained in:
0katekate0
2022-05-22 21:16:10 +08:00
committed by GitHub
parent 9517292a0e
commit 1fdfd5c5a2
6 changed files with 208 additions and 0 deletions

View File

@@ -223,6 +223,32 @@ public interface WxCpOaWeDriveService {
*/
WxCpBaseResp fileDelete(@NonNull String userId, @NonNull List<String> fileId) throws WxErrorException;
/**
* 新增指定人
* 该接口用于对指定文件添加指定人/部门。
* <p>
* 请求方式POSTHTTPS
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_add?access_token=ACCESS_TOKEN
*
* @param request 新增指定人请求参数
* @return
* @throws WxErrorException
*/
WxCpBaseResp fileAclAdd(@NonNull WxCpFileAclAddRequest request) throws WxErrorException;
/**
* 删除指定人
* 该接口用于删除指定文件的指定人/部门。
* <p>
* 请求方式POSTHTTPS
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_del?access_token=ACCESS_TOKEN
*
* @param request 请求参数
* @return
* @throws WxErrorException
*/
WxCpBaseResp fileAclDel(@NonNull WxCpFileAclDelRequest request) throws WxErrorException;
/**
* 文件信息
* 该接口用于获取指定文件的信息。

View File

@@ -153,6 +153,20 @@ public class WxCpOaWeDriveServiceImpl implements WxCpOaWeDriveService {
return WxCpBaseResp.fromJson(responseContent);
}
@Override
public WxCpBaseResp fileAclAdd(@NonNull WxCpFileAclAddRequest request) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(FILE_ACL_ADD);
String responseContent = this.cpService.post(apiUrl, request.toJson());
return WxCpBaseResp.fromJson(responseContent);
}
@Override
public WxCpBaseResp fileAclDel(@NonNull WxCpFileAclDelRequest request) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(FILE_ACL_DEL);
String responseContent = this.cpService.post(apiUrl, request.toJson());
return WxCpBaseResp.fromJson(responseContent);
}
@Override
public WxCpFileInfo fileInfo(@NonNull String userId, @NonNull String fileId) throws WxErrorException {
String apiUrl = this.cpService.getWxCpConfigStorage().getApiUrl(FILE_INFO);