controller
获取该文件的自动标签
请求:get
/files/{fileId}/auto/categorys
参数说明
fileId 文件id
传给前台的json格式大致如下:
{
"errcode": 0,
"errmsg": "ok",
"data": {
"categorys": [{
"isAuto": true,
"categoryName": "d",
"categoryId": "0c3e9d5c-dedf-43e0-83b6-a930de389a34",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}, {
"isAuto": true,
"categoryName": "3",
"categoryId": "26c131fd-7447-4bd7-91b3-f05a5ea4d058",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}, {
"isAuto": true,
"categoryName": "2",
"categoryId": "4e8278fe-df5d-4542-b044-5f9673fd5d4a",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}, {
"isAuto": true,
"categoryName": "单位",
"categoryId": "aedfc0ae-729b-49a5-b8cc-3c1471856054",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}, {
"isAuto": true,
"categoryName": "广州市",
"categoryId": "d0afdbdc-ea28-4dd1-b3e8-54a14e2e0071",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}],
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056"
}
}
参数 | 说明 |
---|---|
fileId | 文件id |
json格式里的参数说明
参数 | 说明 |
---|---|
isAuto | 是否为自动贴标签 true/false |
categoryName | 标签名 |
categoryId | 标签id |
批量对文件贴标签
请求:put
请求连接
/kms//files/categorys/paste
[{
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"categorys": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}]
}, {
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"categorys": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}]
}]
后台返回的json格式
{
"errcode": 0,
"errmsg": "ok",
"data": [{
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"categorys": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}]
}, {
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"categorys": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}]
}]
}
单个对文件贴标签
请求:put
/kms/file/categorys/paste
{
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"categorys": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}]
}
后台返回格式
{
"errcode": 0,
"errmsg": "ok",
"data": {
"id": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"name": "2018.09.05 温国辉 在全市治理违法建设工作会议上的讲话.docx",
"creatorId": "zPsp2hk7CEwtqeMCwtj",
"creator": "管理员",
"createDate": "2020-05-29",
"lastModifyDate": "2020-05-29T08:32:12.000+0000",
"diskId": "0dd1e1c1-b5dd-41f4-8e3e-c0479448faf9",
"folderId": "a56f8f78-52b4-44ef-af2e-fe4136974500",
"folder": false,
"size": 31383,
"path": "0dd1e1c1-b5dd-41f4-8e3e-c0479448faf9/a56f8f78-52b4-44ef-af2e-fe4136974500",
"type": "docx",
"url": "0dd1e1c1-b5dd-41f4-8e3e-c0479448faf9/202005/59c07a5a-d323-4fb0-a0f5-4aaa1e774056.docx",
"originType": 1,
"originId": null,
"categorys": "知识文档,广州市",
"categorysJson": [{
"categoryId": "123456",
"categoryName": "知识文档",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}, {
"categoryId": "123456",
"categoryName": "广州市",
"fileId": "59c07a5a-d323-4fb0-a0f5-4aaa1e774056",
"isAuto": true
}],
"views": 0,
"lastViewDate": null,
"downloads": 0,
"lastDownloadDate": null,
"shares": 0,
"lastShareDate": null,
"collects": 0,
"lastCollectDate": null,
"lastEditDate": null,
"good": 0,
"bad": 0
}
}