@@ -56,19 +56,19 @@ public void test() throws Exception {
56
56
String fileId2 = "s.ww45d3e188865aca30.652091685u4h_f.652696024TU4P" ;
57
57
58
58
59
- /**
59
+ /*
60
60
* 获取分享链接
61
61
*/
62
62
WxCpFileShare fileShare = cpService .getOaWeDriveService ().fileShare (uId , fileId2 );
63
63
log .info ("获取分享链接返回结果为:{}" , fileShare .toJson ());
64
64
65
- /**
65
+ /*
66
66
* 分享设置
67
67
*/
68
68
WxCpBaseResp fileSetting = cpService .getOaWeDriveService ().fileSetting (uId , fileId2 , 2 , 1 );
69
69
log .info ("分享设置返回结果为:{}" , fileSetting .toJson ());
70
70
71
- /**
71
+ /*
72
72
* 删除指定人
73
73
*/
74
74
WxCpFileAclDelRequest aclDelRequest = new WxCpFileAclDelRequest ();
@@ -87,7 +87,7 @@ public void test() throws Exception {
87
87
WxCpBaseResp aclDel = cpService .getOaWeDriveService ().fileAclDel (aclDelRequest );
88
88
log .info ("删除指定人返回结果为:{}" , aclDel .toJson ());
89
89
90
- /**
90
+ /*
91
91
* 新增指定人
92
92
*/
93
93
WxCpFileAclAddRequest fileAclAdd = new WxCpFileAclAddRequest ();
@@ -105,49 +105,47 @@ public void test() throws Exception {
105
105
WxCpBaseResp result = cpService .getOaWeDriveService ().fileAclAdd (fileAclAdd );
106
106
log .info ("返回结果为:{}" , result .toJson ());
107
107
108
- /**
108
+ /*
109
109
* 删除文件
110
110
*/
111
111
ArrayList <String > fileIds = Lists .newArrayList ();
112
112
fileIds .add (fileId );
113
113
WxCpBaseResp fileDelete = cpService .getOaWeDriveService ().fileDelete (fileIds );
114
114
log .info ("删除文件数据为:{}" , fileDelete .toJson ());
115
115
116
- /**
117
- * 文件信息
116
+ /*
117
+ 文件信息
118
118
*/
119
119
WxCpFileInfo fileInfo = cpService .getOaWeDriveService ().fileInfo (fileId );
120
120
log .info ("fileInfo数据为:{}" , fileInfo .toJson ());
121
121
122
- /**
123
- * 移动文件
122
+ /*
123
+ 移动文件
124
124
*/
125
125
WxCpFileMoveRequest fileMoveRequest = new WxCpFileMoveRequest ();
126
- fileMoveRequest .setUserId (uId );
127
126
fileMoveRequest .setFatherId (spId );
128
127
fileMoveRequest .setReplace (true );
129
128
fileMoveRequest .setFileId (new String []{fileId });
130
129
131
130
WxCpFileMove fileMove = cpService .getOaWeDriveService ().fileMove (fileMoveRequest );
132
131
log .info ("fileMove数据为:{}" , fileMove .toJson ());
133
132
134
- /**
135
- * 新建文件/微文档
133
+ /*
134
+ 新建文件/微文档
136
135
*/
137
136
WxCpFileCreate fileCreate = cpService .getOaWeDriveService ().fileCreate (spId , spId , 3 , "新建微文档1" );
138
137
log .info ("新建文件/微文档:{}" , fileCreate .toJson ());
139
138
140
- /**
141
- * 下载文件
139
+ /*
140
+ 下载文件
142
141
*/
143
142
WxCpFileDownload fileDownload = cpService .getOaWeDriveService ().fileDownload (uId , fileId );
144
143
log .info ("下载文件为:{}" , fileDownload .toJson ());
145
144
146
- /**
147
- * 上传文件
145
+ /*
146
+ 上传文件
148
147
*/
149
148
WxCpFileUploadRequest fileUploadRequest = new WxCpFileUploadRequest ();
150
- fileUploadRequest .setUserId (uId );
151
149
fileUploadRequest .setSpaceId (spId );
152
150
fileUploadRequest .setFatherId (spId );
153
151
fileUploadRequest .setFileName ("第一个文件" );
@@ -165,17 +163,16 @@ public void test() throws Exception {
165
163
WxCpFileUpload fileUpload = cpService .getOaWeDriveService ().fileUpload (fileUploadRequest );
166
164
log .info ("上传文件为:{}" , fileUpload .toJson ());
167
165
168
- /**
169
- * 重命名文件
166
+ /*
167
+ 重命名文件
170
168
*/
171
- WxCpFileRename fileRename = cpService .getOaWeDriveService ().fileRename (uId , fileUpload .getFileId (), "新的名字呢" );
169
+ WxCpFileRename fileRename = cpService .getOaWeDriveService ().fileRename (fileUpload .getFileId (), "新的名字呢" );
172
170
log .info ("重命名文件:{}" , fileRename .toJson ());
173
171
174
- /**
175
- * 获取文件列表
172
+ /*
173
+ 获取文件列表
176
174
*/
177
175
WxCpFileListRequest fileListRequest = new WxCpFileListRequest ();
178
- fileListRequest .setUserId (uId );
179
176
fileListRequest .setSpaceId (spId );
180
177
fileListRequest .setFatherId (spId );
181
178
fileListRequest .setSortType (1 );
@@ -185,7 +182,7 @@ public void test() throws Exception {
185
182
WxCpFileList fileList = cpService .getOaWeDriveService ().fileList (fileListRequest );
186
183
log .info ("获取文件列表为:{}" , fileList .toJson ());
187
184
188
- /**
185
+ /*
189
186
* 权限管理
190
187
*/
191
188
WxCpSpaceSettingRequest spaceSettingRequest = new WxCpSpaceSettingRequest ();
@@ -200,19 +197,19 @@ public void test() throws Exception {
200
197
WxCpBaseResp spaceSetting = cpService .getOaWeDriveService ().spaceSetting (spaceSettingRequest );
201
198
log .info ("权限管理信息为:{}" , spaceSetting .toJson ());
202
199
203
- /**
200
+ /*
204
201
* 获取邀请链接
205
202
*/
206
203
WxCpSpaceShare spaceShare = cpService .getOaWeDriveService ().spaceShare (uId , spId );
207
204
log .info ("获取邀请链接信息为:{}" , spaceShare .toJson ());
208
205
209
- /**
206
+ /*
210
207
* 获取空间信息
211
208
*/
212
209
WxCpSpaceInfo data = cpService .getOaWeDriveService ().spaceInfo (uId , spId );
213
210
log .info ("获取空间信息为:{}" , data .toJson ());
214
211
215
- /**
212
+ /*
216
213
* 移除成员/部门
217
214
*/
218
215
WxCpSpaceAclDelRequest spaceAclDelRequest = new WxCpSpaceAclDelRequest ();
@@ -231,7 +228,7 @@ public void test() throws Exception {
231
228
WxCpBaseResp spaceAclDel = cpService .getOaWeDriveService ().spaceAclDel (spaceAclDelRequest );
232
229
log .info ("移除成员/部门,返回数据为:{}" , spaceAclDel .toJson ());
233
230
234
- /**
231
+ /*
235
232
* 添加成员/部门
236
233
* https://developer.work.weixin.qq.com/document/path/93656
237
234
*/
@@ -252,13 +249,13 @@ public void test() throws Exception {
252
249
WxCpBaseResp wxCpBaseResp = cpService .getOaWeDriveService ().spaceAclAdd (spaceAclAddRequest );
253
250
log .info ("添加成员/部门,返回数据为:{}" , wxCpBaseResp .toJson ());
254
251
255
- /**
252
+ /*
256
253
* 获取空间信息
257
254
*/
258
255
WxCpSpaceInfo spaceInfo = cpService .getOaWeDriveService ().spaceInfo ("WangKai" , "s.ww45d3e188865aca30.652091685u4h" );
259
256
log .info ("获取空间信息,spaceInfo信息为:{}" , spaceInfo .toJson ());
260
257
261
- /**
258
+ /*
262
259
* 新建空间
263
260
*/
264
261
WxCpSpaceCreateRequest request = new WxCpSpaceCreateRequest ();
@@ -269,7 +266,7 @@ public void test() throws Exception {
269
266
log .info ("空间id为:{}" , spaceCreateData .getSpaceId ()); //
270
267
log .info (spaceCreateData .toJson ());
271
268
272
- /**
269
+ /*
273
270
* 重命名空间
274
271
*/
275
272
WxCpSpaceRenameRequest wxCpSpaceRenameRequest = new WxCpSpaceRenameRequest ();
@@ -279,7 +276,7 @@ public void test() throws Exception {
279
276
WxCpBaseResp baseResp = cpService .getOaWeDriveService ().spaceRename (wxCpSpaceRenameRequest );
280
277
log .info ("重命名成功:{}" , baseResp .toJson ());
281
278
282
- /**
279
+ /*
283
280
* 解散空间
284
281
*/
285
282
WxCpBaseResp thisResp = cpService .getOaWeDriveService ().spaceDismiss ("WangKai" , spaceCreateData .getSpaceId ());
0 commit comments