|
@@ -0,0 +1,329 @@
|
|
|
+
|
|
|
+
|
|
|
+#工单图片接口
|
|
|
+
|
|
|
+##工单图片上传接口
|
|
|
+
|
|
|
+url:image-service/work_order/upload?projectId=Pj1101080001&secret=***&workOrderId=12345&key=www
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ 图片文件输入流
|
|
|
+
|
|
|
+返回:
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "ResultMsg":""
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+##工单图片超链接
|
|
|
+
|
|
|
+url:image-service/work_order/get?projectId=Pj1101080001&workOrderId=12345&key=www
|
|
|
+
|
|
|
+
|
|
|
+#图片接口
|
|
|
+
|
|
|
+##图片上传接口
|
|
|
+
|
|
|
+url:image-service/common/image_upload?systemId=dev&secret=***&key=www
|
|
|
+
|
|
|
+如果key已存在,url加入参数overwrite=true可以强制覆盖,比如:image-service/common/image_upload?systemId=dev&secret=***&key=www&overwrite=true
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ 图片文件输入流
|
|
|
+
|
|
|
+返回:
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "ResultMsg":""
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+##图片超链接
|
|
|
+
|
|
|
+url:image-service/common/image_get?systemId=dev&key=www&width=1000&height=1000
|
|
|
+
|
|
|
+参数width和height可选,不填则按图片原尺寸返回
|
|
|
+
|
|
|
+##图片key更新接口
|
|
|
+ 更新key
|
|
|
+
|
|
|
+url:image-service/common/image\_key\_change?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "from":"150789951269381626421795226631123123.jpg",
|
|
|
+ "to":"150794642806010256531555205584Koala.jpg"
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+##图片文件列表浏览接口
|
|
|
+ 浏览已上传的文件
|
|
|
+
|
|
|
+url:image-service/common/images_list?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "prefix":"15", //选填,key的前缀
|
|
|
+ "maxCount":200, //选填,最多返回记录数,默认为100
|
|
|
+ "from":"150789948131164438721002079551123123" //选填,从该记录开始返回,但不包含该记录
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "Count": 10,
|
|
|
+ "Content": [
|
|
|
+ "150789951269381626421795226631123123",
|
|
|
+ "150789990060258615284902043641123123",
|
|
|
+ "150794642806010256531555205584Koala",
|
|
|
+ "150794642806887429525866173211Lighthouse",
|
|
|
+ "150794664351711935679288581014Desert",
|
|
|
+ "150797627222133136666356585921设备管理7",
|
|
|
+ "150797628977096943998988717791设备管理7",
|
|
|
+ "150812247843304793838365003466保险公司名录保存成功",
|
|
|
+ "150812247843680967023875564341供应商名录",
|
|
|
+ "150812247844007977657392621041供应商名录滚动条回滚"
|
|
|
+ ],
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+##图片文件删除接口
|
|
|
+ 删除已上传的图片文件
|
|
|
+
|
|
|
+url:image-service/common/images_delete?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "keys":[ //要删除key列表
|
|
|
+ "150789951269381626421795226631123123",
|
|
|
+ "150794642806010256531555205584Koala"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "Count": 2,
|
|
|
+ "Content": [ //成功删除的key列表
|
|
|
+ "150789951269381626421795226631123123",
|
|
|
+ "150794642806010256531555205584Koala"
|
|
|
+ ],
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+#文件接口
|
|
|
+
|
|
|
+##文件上传接口
|
|
|
+
|
|
|
+url:image-service/common/file_upload?systemId=dev&secret=***&key=www
|
|
|
+
|
|
|
+如果key已存在,url加入参数overwrite=true可以强制覆盖,比如:image-service/common/file_upload?systemId=dev&secret=***&key=www&overwrite=true
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ 图片文件输入流
|
|
|
+
|
|
|
+返回:
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "ResultMsg":""
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+##文件下载接口
|
|
|
+
|
|
|
+url:
|
|
|
+
|
|
|
+ image-service/common/file_get/{key}?systemId=dev
|
|
|
+
|
|
|
+ 或:
|
|
|
+
|
|
|
+ image-service/common/file_get?systemId=dev&key=www
|
|
|
+
|
|
|
+例子:
|
|
|
+
|
|
|
+ image-service/common/file_get/www?systemId=dev, 其中key为www;
|
|
|
+
|
|
|
+ 或:
|
|
|
+
|
|
|
+ image-service/common/file_get?systemId=dev&key=www
|
|
|
+
|
|
|
+
|
|
|
+##文件列表浏览接口
|
|
|
+ 浏览已上传的文件
|
|
|
+
|
|
|
+url:image-service/common/files_list?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "prefix":"15", //选填,key的前缀
|
|
|
+ "maxCount":200, //选填,最多返回记录数,默认为100
|
|
|
+ "from":"150789948131164438721002079551123123.jpg" //选填,从该记录开始返回,但不包含该记录
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "Count": 10,
|
|
|
+ "Content": [
|
|
|
+ "150789951269381626421795226631123123.jpg",
|
|
|
+ "150789990060258615284902043641123123.jpg",
|
|
|
+ "150794642806010256531555205584Koala.jpg",
|
|
|
+ "150794642806887429525866173211Lighthouse.jpg",
|
|
|
+ "150794664351711935679288581014Desert.jpg",
|
|
|
+ "150797627222133136666356585921设备管理7.png",
|
|
|
+ "150797628977096943998988717791设备管理7.png",
|
|
|
+ "150812247843304793838365003466保险公司名录保存成功,无数据.png",
|
|
|
+ "150812247843680967023875564341供应商名录.png",
|
|
|
+ "150812247844007977657392621041供应商名录滚动条回滚.png"
|
|
|
+ ],
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+##文件删除接口
|
|
|
+ 删除已上传的文件
|
|
|
+
|
|
|
+url:image-service/common/files_delete?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "keys":[ //要删除key列表
|
|
|
+ "150789951269381626421795226631123123.jpg",
|
|
|
+ "150794642806010256531555205584Koala.jpg"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "Count": 2,
|
|
|
+ "Content": [ //成功删除的key列表
|
|
|
+ "150789951269381626421795226631123123.jpg",
|
|
|
+ "150794642806010256531555205584Koala.jpg"
|
|
|
+ ],
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+##文件key更新接口
|
|
|
+ 更新key,只支持小于1G的文件
|
|
|
+
|
|
|
+url:image-service/common/file\_key\_change?systemId=dev&secret=***
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ {
|
|
|
+ "from":"150789951269381626421795226631123123.jpg",
|
|
|
+ "to":"150794642806010256531555205584Koala.jpg"
|
|
|
+ }
|
|
|
+
|
|
|
+返回
|
|
|
+
|
|
|
+ {
|
|
|
+ "result": "success",
|
|
|
+ "ResultMsg": ""
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+# 分片上传文件接口
|
|
|
+
|
|
|
+## 申请分片上传接口(获取上传UploadId)
|
|
|
+url: image-service/common/register\_multipart\_upload?systemId=dev&secret=***&key=dir1/dir2/abc.txt&overwrite=true
|
|
|
+
|
|
|
+注册分片上传, 获取一个上传id(UploadId), 需要secret, key表示上传的文件名, 可以包含文件路径, overwrite表示是否覆盖已有的文件(如果存在)
|
|
|
+
|
|
|
+overwrite有一定风险, 只在注册分片时校验, 合并时候如果key被占用, 会覆盖掉之前文件
|
|
|
+
|
|
|
+post体
|
|
|
+
|
|
|
+ 无
|
|
|
+
|
|
|
+返回成功
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "ResultMsg":"*****",
|
|
|
+ "UploadId":"***************"
|
|
|
+ }
|
|
|
+返回失败
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"failure",
|
|
|
+ "ResultMsg":"*****"
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+## 上传分片接口
|
|
|
+url: image-service/common/multipart_upload
|
|
|
+
|
|
|
+上传分片
|
|
|
+
|
|
|
+post请求, form-data方式
|
|
|
+
|
|
|
+|key名称 |类型|说明 |
|
|
|
+|--------------|----|-----------------------------|
|
|
|
+|file |File|上传的分片文件内容 |
|
|
|
+|uploadId |Text|UploadId |
|
|
|
+|chunkNumber |Text|当前上传分片的顺序号, 从1开始|
|
|
|
+|chunkSize |Text|分片的长度 |
|
|
|
+|md5 |Text|分片文件的MD5值(选填) |
|
|
|
+
|
|
|
+返回成功
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "TotalCount":11, // 已经完成的块数量
|
|
|
+ "MD5":"", // 服务器计算分片的MD5值
|
|
|
+ "ResultMsg":"*****"
|
|
|
+ }
|
|
|
+返回失败
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"failure",
|
|
|
+ "ResultMsg":"*****"
|
|
|
+ }
|
|
|
+
|
|
|
+## 合并分片接口
|
|
|
+
|
|
|
+url: image-service/common/merge_multipart?systemId=dev&secret=***&uploadId=***
|
|
|
+
|
|
|
+合并分片, 需要secret
|
|
|
+
|
|
|
+post请求
|
|
|
+
|
|
|
+
|
|
|
+返回成功
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"success",
|
|
|
+ "ResultMsg":"*****"
|
|
|
+ }
|
|
|
+返回失败
|
|
|
+
|
|
|
+ {
|
|
|
+ "Result":"failure",
|
|
|
+ "ResultMsg":"*****"
|
|
|
+ }
|