问答库标准问详情
更新时间:2024-11-04
问答库标准问详情
1、接口地址: GET {IP}:{PORT}/open/v2/faq/standard/detail
2、入参(放到Query Param中)
参数名 | 类型 | 是否可空 | 备注 |
---|---|---|---|
id | string | 否 | 标准问id |
3、返回值
参数名 | 类型 | 父节点 | 备注 |
---|---|---|---|
code | int | HTTP状态码 | |
time | long | 时间 | |
msg | string | 状态信息 | |
data | T | 返回数据 | |
id | string | data | |
question | string | data | 问题 |
answer | map | data | 答案 |
type | int | answer | 类型 0 多答案;1 单答案 |
text | string | answer | 单答案内容 |
list | list< map> | answer | 当且仅当answer.type = 0时,出现此字段 |
text | string | answer.list | 答案内容 |
type | string | answer.list | 答案类型 1文本 3富文本 4图片 |
url | string | answer.list | 图片地址,当answer.list.type=4时,出现此字段 |
status | int | data | 状态标识,0 生效,1 失效 |
dirId | string | data | 目录id |
tags | list | data | 标签信息,内容string类型 |
updated | string | data | 更新时间 "2019-09-12 16:30:15" |
created | string | data | 创建时间 "2019-09-12 16:30:15" |
editVersion | int | data | 版本号信息 |
expire | string | data | 过期时间 "2099-12-31 23:59:59" |
effect | string | data | 生效时间 "2000-12-31 23:59:59" |
channelAnswers | list | data | 渠道答案(保留字段,为兼容旧版本。如果渠道数据是由旧数据升级而来,且旧版本中的faq有旧渠道数据的,则有内容。如果不是升级来的渠道数据,则无内容。要获取faq多级渠道答案列表需调用特殊渠道答案列表接口) |
id | string | channelAnswers | 渠道答案id |
answer | map | channelAnswers | 答案 |
type | int | channelAnswers.answer | 类型 0 多答案;1 单答案 |
text | string | channelAnswers.answer | 单答案内容 |
list | list< map> | channelAnswers.answer | 当且仅当answer.type = 0时,出现此字段 |
text | string | channelAnswers.answer.list | 答案内容 |
type | string | channelAnswers.answer.list | 答案类型 1文本 3富文本 4图片 |
url | string | channelAnswers.answer.list | 图片地址,当answer.list.type=4时,出现此字段 |
channelId | string | channelAnswers | 渠道id |
channelName | string | channelAnswers | 渠道名 |
isActiveHook | int | channelAnswers | 0 未使用webhook ;1 使用webhook |
instruction | string | channelAnswers | 指令 |
suggestList | list | data | 通用答案中关联问题 |
id | string | suggestList | 关联问题ID |
score | int | suggestList | 相似度 |
question | string | suggestList | 问题 |
isActiveHook | int | data | 0 未使用webhook ;1 使用webhook |
instruction | string | data | 指令 |
lastEditUserId | string | data | 最后修改人Id |
lastEditUsername | string | Data | 最后修改人 |
示例:
{
"data":{
"id":"e3980621-748a-4714-b079-ee85a720dd05",
"question":"山东济南",
"answer":{
"list":[
{
"text":"济南是经济强省山东的省会。",
"type":1
},
{
"type":4,
"url":"http://localhost:8080/api/v2/file/download?key=Ym9zXzc5YjE1M2VhLTM5ODEtNGNkNS1iMDBmLTc5MTA0MDYwMmJjNA=="
},
{
"type":3,
"text":"l这是font-size: 18px;">富文本http://www.baidu.com" target="_blank">百度"
}
],
"type":0
},
"status":0,
"dirId":"bddc9428-01ce-45d9-9d51-7120c02a40ea",
"tags":[
"省会",
"泉城"
],
"updated":"2019-09-12 16:30:15",
"created":"2019-09-12 11:02:22",
"editVersion":2,
"expire":"2099-12-31 23:59:59",
"effect":"2000-01-01 00:00:00",
"lastEditUserId":"xxxxxx",
"lastEditUsername":"xxxxxxx",
"channelAnswers":[
{
"channelId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"channelName":"渠道2",
"answer":{
"text":"答案",
"type":1
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"isActiveHook":0,
"instruction":""
},
{
"channelDelete":0,
"channelId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"channelName":"渠道1",
"answer":{
"text":"这是font-size: 16px;">渠道1font-size: 16px;">的信息http://www.baidu.com" target="_blank">百度",
"type":3
},
"id":"34926436-6a73-4c92-b164-246359b12140",
"isActiveHook":0,
"instruction":""
}
],
"isActiveHook":1,
"instruction":"9eb5c8d6-34f8-4dba-8bcf-54c4958ff8d9",
"suggestList":[
{
"score":1,
"id": "c0eb33d8-1276-4501-9961-fd8154524940",
"question":"北京"
}
]
},
"code":200,
"time":1568605316034,
"msg":"OK"
}