mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #1214 小程序模块实现云开发的所有相关接口
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件删除结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-27
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudBatchDeleteFileResult implements Serializable {
|
||||
private static final long serialVersionUID = -1133274298839868115L;
|
||||
|
||||
@SerializedName("delete_list")
|
||||
private List<FileDownloadInfo> fileList;
|
||||
|
||||
@Data
|
||||
public static class FileDownloadInfo implements Serializable {
|
||||
private static final long serialVersionUID = 5812969045277862211L;
|
||||
|
||||
/**
|
||||
* fileid string 文件ID
|
||||
*/
|
||||
@SerializedName("fileid")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* status number 状态码
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* errmsg string 该文件错误信息
|
||||
*/
|
||||
@SerializedName("errmsg")
|
||||
private String errMsg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 获取文件下载链接结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-27
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudBatchDownloadFileResult implements Serializable {
|
||||
private static final long serialVersionUID = 646423661372964402L;
|
||||
|
||||
@SerializedName("file_list")
|
||||
private List<FileDownloadInfo> fileList;
|
||||
|
||||
@Data
|
||||
public static class FileDownloadInfo implements Serializable {
|
||||
private static final long serialVersionUID = 5812969045277862211L;
|
||||
|
||||
/**
|
||||
* fileid string 文件ID
|
||||
*/
|
||||
@SerializedName("fileid")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* download_url string 下载链接
|
||||
*/
|
||||
@SerializedName("download_url")
|
||||
private String downloadUrl;
|
||||
|
||||
/**
|
||||
* status number 状态码
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* errmsg string 该文件错误信息
|
||||
*/
|
||||
@SerializedName("errmsg")
|
||||
private String errMsg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 云开发数据库迁移状态查询结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-26
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudCloudDatabaseMigrateQueryInfoResult implements Serializable {
|
||||
private static final long serialVersionUID = 2014197503355968243L;
|
||||
|
||||
/**
|
||||
* status string 导出状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* record_success number 导出成功记录数
|
||||
*/
|
||||
@SerializedName("record_success")
|
||||
private Integer recordSuccess;
|
||||
|
||||
/**
|
||||
* record_fail number 导出失败记录数
|
||||
*/
|
||||
@SerializedName("record_fail")
|
||||
private Integer recordFail;
|
||||
|
||||
/**
|
||||
* err_msg string 导出错误信息
|
||||
*/
|
||||
@SerializedName("err_msg")
|
||||
private String errMsg;
|
||||
|
||||
/**
|
||||
* file_url string 导出文件下载地址
|
||||
*/
|
||||
@SerializedName("file_url")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 云开发获取集合接口的结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-28
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudDatabaseCollectionGetResult implements Serializable {
|
||||
private static final long serialVersionUID = 3702855196387039823L;
|
||||
|
||||
/**
|
||||
* 分页信息
|
||||
*/
|
||||
private WxCloudDatabaseQueryResult.Pager pager;
|
||||
|
||||
/**
|
||||
* 查询结果
|
||||
*/
|
||||
private CollectionInfo[] collections;
|
||||
|
||||
@Data
|
||||
public static class CollectionInfo implements Serializable {
|
||||
private static final long serialVersionUID = -3280126948752330438L;
|
||||
|
||||
/**
|
||||
* name string 集合名
|
||||
*/
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* count number 表中文档数量
|
||||
*/
|
||||
@SerializedName("count")
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* size number 表的大小(即表中文档总大小),单位:字节
|
||||
*/
|
||||
@SerializedName("size")
|
||||
private Long size;
|
||||
|
||||
/**
|
||||
* index_count number 索引数量
|
||||
*/
|
||||
@SerializedName("index_count")
|
||||
private Long indexCount;
|
||||
|
||||
/**
|
||||
* index_size number 索引占用大小,单位:字节
|
||||
*/
|
||||
@SerializedName("index_size")
|
||||
private Long indexSize;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Pager implements Serializable {
|
||||
private static final long serialVersionUID = 5045727687673687839L;
|
||||
|
||||
/**
|
||||
* Offset number 偏移
|
||||
*/
|
||||
@SerializedName("Offset")
|
||||
private Long offset;
|
||||
|
||||
/**
|
||||
* Limit number 单次查询限制
|
||||
*/
|
||||
@SerializedName("Limit")
|
||||
private Long limit;
|
||||
|
||||
/**
|
||||
* Total number 符合查询条件的记录总数
|
||||
*/
|
||||
@SerializedName("Total")
|
||||
private Long total;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 云开发新增索引的请求对象.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-26
|
||||
*/
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
public class WxCloudDatabaseCreateIndexRequest implements Serializable {
|
||||
private static final long serialVersionUID = -8308393731157121109L;
|
||||
|
||||
/**
|
||||
* name string 是 索引名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* unique boolean 是 是否唯一
|
||||
*/
|
||||
private boolean unique;
|
||||
|
||||
/**
|
||||
* keys Array.<Object> 是 索引字段
|
||||
*/
|
||||
private List<IndexKey> keys;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class IndexKey implements Serializable {
|
||||
private static final long serialVersionUID = -252641130547960325L;
|
||||
|
||||
/**
|
||||
* name string 是 字段名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* direction string 是 字段排序
|
||||
* <pre>
|
||||
* direction 的合法值
|
||||
* 值 说明
|
||||
* "1" 升序
|
||||
* "-1" 降序
|
||||
* "2dsphere" 地理位置
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
private String direction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 云开发数据库查询记录接口请求结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-26
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudDatabaseQueryResult implements Serializable {
|
||||
private static final long serialVersionUID = 8291820029137872536L;
|
||||
|
||||
/**
|
||||
* 分页信息
|
||||
*/
|
||||
private Pager pager;
|
||||
|
||||
/**
|
||||
* 查询结果
|
||||
*/
|
||||
private String[] data;
|
||||
|
||||
@Data
|
||||
public static class Pager implements Serializable{
|
||||
private static final long serialVersionUID = 8556239063823985674L;
|
||||
|
||||
/**
|
||||
* Offset number 偏移
|
||||
*/
|
||||
@SerializedName("Offset")
|
||||
private Long offset;
|
||||
|
||||
/**
|
||||
* Limit number 单次查询限制
|
||||
*/
|
||||
@SerializedName("Limit")
|
||||
private Long limit;
|
||||
|
||||
/**
|
||||
* Total number 符合查询条件的记录总数
|
||||
*/
|
||||
@SerializedName("Total")
|
||||
private Long total;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 云开发数据库更新记录接口请求结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-26
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudDatabaseUpdateResult implements Serializable {
|
||||
private static final long serialVersionUID = -3905429931117999004L;
|
||||
|
||||
/**
|
||||
* matched number 更新条件匹配到的结果数
|
||||
*/
|
||||
private Long matched;
|
||||
|
||||
/**
|
||||
* modified number 修改的记录数,注意:使用set操作新插入的数据不计入修改数目
|
||||
*/
|
||||
private Long modified;
|
||||
|
||||
/**
|
||||
* id string 新插入记录的id,注意:只有使用set操作新插入数据时这个字段会有值
|
||||
*/
|
||||
private String id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 获取腾讯云API调用凭证结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-27
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudGetQcloudTokenResult implements Serializable {
|
||||
private static final long serialVersionUID = -1505786395531138286L;
|
||||
|
||||
/**
|
||||
* secretid
|
||||
*/
|
||||
@SerializedName("secretid")
|
||||
private String secretId;
|
||||
|
||||
/**
|
||||
* secretkey
|
||||
*/
|
||||
@SerializedName("secretkey")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
@SerializedName("token")
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 过期时间戳
|
||||
*/
|
||||
@SerializedName("expired_time")
|
||||
private Long expiredTime;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.binarywang.wx.miniapp.bean.cloud;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 云开发文件上传接口响应结果.
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* @date 2020-01-27
|
||||
*/
|
||||
@Data
|
||||
public class WxCloudUploadFileResult implements Serializable {
|
||||
private static final long serialVersionUID = 787346474470048318L;
|
||||
|
||||
/**
|
||||
* 上传url
|
||||
*/
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
@SerializedName("token")
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* authorization
|
||||
*/
|
||||
@SerializedName("authorization")
|
||||
private String authorization;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@SerializedName("file_id")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* cos文件ID
|
||||
*/
|
||||
@SerializedName("cos_file_id")
|
||||
private String cosFileId;
|
||||
}
|
||||
Reference in New Issue
Block a user