mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #2648 【企业微信】增加微盘文件管理部分接口
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package me.chanjar.weixin.cp.bean.oa.wedrive;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 新建文件/微文档 返回信息.
|
||||
*
|
||||
* @author Wang_Wong
|
||||
*/
|
||||
@Data
|
||||
public class WxCpFileCreate extends WxCpBaseResp implements Serializable {
|
||||
private static final long serialVersionUID = -5028321625142879581L;
|
||||
|
||||
@SerializedName("fileid")
|
||||
private String fileId;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
|
||||
public static WxCpFileCreate fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpFileCreate.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package me.chanjar.weixin.cp.bean.oa.wedrive;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 下载文件返回信息.
|
||||
*
|
||||
* @author Wang_Wong
|
||||
*/
|
||||
@Data
|
||||
public class WxCpFileDownload extends WxCpBaseResp implements Serializable {
|
||||
private static final long serialVersionUID = -5028321625142879581L;
|
||||
|
||||
@SerializedName("download_url")
|
||||
private String downloadUrl;
|
||||
|
||||
@SerializedName("cookie_name")
|
||||
private String cookieName;
|
||||
|
||||
@SerializedName("cookie_value")
|
||||
private String cookieValue;
|
||||
|
||||
public static WxCpFileDownload fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpFileDownload.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package me.chanjar.weixin.cp.bean.oa.wedrive;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 下载文件返回信息.
|
||||
*
|
||||
* @author Wang_Wong
|
||||
*/
|
||||
@Data
|
||||
public class WxCpFileRename extends WxCpBaseResp implements Serializable {
|
||||
private static final long serialVersionUID = -5028321625142879581L;
|
||||
|
||||
@SerializedName("file")
|
||||
private File file;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class File implements Serializable {
|
||||
private static final long serialVersionUID = -4960239393895754598L;
|
||||
|
||||
@SerializedName("fileid")
|
||||
private String fileId;
|
||||
|
||||
@SerializedName("file_name")
|
||||
private String fileName;
|
||||
|
||||
@SerializedName("spaceid")
|
||||
private String spaceId;
|
||||
|
||||
@SerializedName("fatherid")
|
||||
private String fatherId;
|
||||
|
||||
@SerializedName("file_size")
|
||||
private Long fileSize;
|
||||
|
||||
@SerializedName("ctime")
|
||||
private Long cTime;
|
||||
|
||||
@SerializedName("mtime")
|
||||
private Long mTime;
|
||||
|
||||
@SerializedName("file_type")
|
||||
private Integer fileType;
|
||||
|
||||
@SerializedName("file_status")
|
||||
private Integer fileStatus;
|
||||
|
||||
@SerializedName("create_userid")
|
||||
private String createUserId;
|
||||
|
||||
@SerializedName("update_userid")
|
||||
private String updateUserId;
|
||||
|
||||
@SerializedName("sha")
|
||||
private String sha;
|
||||
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
|
||||
@SerializedName("md5")
|
||||
private String md5;
|
||||
|
||||
public static File fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, File.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static WxCpFileRename fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpFileRename.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user