自动贴标签功能

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
	}
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值