search_words.md 8.06 KB

搜索词管理


新增默认搜索词

接口名:searchWords/addSearchWords

入参


属性名称 类型 例子 说明
type int 1 搜索词类型:1默认搜索词
content String 内容实得分 内容
channelIds String 1,2,3 频道类型 多个用逗号隔开 默认搜索词专用
url String https://pandao.github.io/editor.md/examples/simple.html 链接
startTime int 1449504000 开始时间,时间的秒数
endTime int 1449504000 结束时间,时间的秒数
creatorUid int 2323 添加人id
creatorUsrname String zhangsan 添加人名称

返回

请求样例:
{
    "channelIds": "2,3",
    "content": "2342",
    "creatorUid": 3,
    "creatorUsrname": "zhangsan",
    "endTime": 1449504000,
    "modifyUid": 3,
    "modifyUsrname": "zhangsan",
    "startTime": 1449504000,
    "type": 1,
    "url": "https://pandao.github.io/editor.md/examples/simple.html"
}
正常返回:
{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "添加成功"
}
异常返回:
{
  "code": 405,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "频道不能为空"
}

修改默认搜索词

接口名:searchWords/updateSearchWords

入参


属性名称 类型 例子 说明
id int 1 主键
type int 1 搜索词类型:1默认搜索词
channelIds String 1,2,3 频道类型 多个用逗号隔开 默认搜索词专用
url String https://pandao.github.io/editor.md/examples/simple.html 链接
startTime int 1449504000 开始时间,时间的秒数
endTime int 1449504000 结束时间,时间的秒数
status int 1 状态 2 开启 1 禁用
modifyUid int 2323 修改人id
modifyUsrname String zhangsan 修改人名称

样例

请求样例:
{
    "channelIds": "2,3",
    "content": "2342",
    "creatorUid": 3,
    "creatorUsrname": "zhangsan",
    "endTime": 1449504000,
    "modifyUid": 3,
    "modifyUsrname": "zhangsan",
    "startTime": 1449504000,
    "type": 1,
    "status": 1,
    "id": 111,
    "url": "https://pandao.github.io/editor.md/examples/simple.html"
}
正常返回:
{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "修改成功"
}
异常返回:
{
  "code": 405,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "内容不能为空"
}

查询默认搜索词

接口名: /searchWords/querySearchWords

入参


属性名称 类型 例子 说明
page int 2 第几页
size int 50 每页条数
type int 1 搜索词类型:1默认搜索词
channelIds String 3 频道类型
startTime int 1449504000 开始时间,时间的秒数
endTime int 1449504000 结束时间,时间的秒数
status int 1 状态 2 开启 1 禁用

返回

请求
{
"page":0,
"size":3,
"content":"哈哈",
"type":2,
"channelIds":1
}
返回:
{
  "code": 200,
  "data": {
    "list": [
      {
        "channelIds": "",
        "content": "呵呵哈哈",
        "createdTime": 1451290193,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 0,
        "goodsNum": 0,
        "id": 99,
        "modifyTime": 0,
        "modifyUid": 0,
        "sort": 7,
        "startTime": 0,
        "status": 2,
        "type": 3,
        "url": ""
      },
      {
        "channelIds": "",
        "content": "哈哈哈",
        "createdTime": 1451290166,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 0,
        "goodsNum": 4,
        "id": 97,
        "modifyTime": 1451326921,
        "modifyUid": 100019,
        "modifyUsrname": "zhipeng.wei",
        "sort": 4,
        "startTime": 0,
        "status": 2,
        "type": 2,
        "url": ""
      },
      {
        "channelIds": "",
        "content": "呵呵哈哈",
        "createdTime": 1451290085,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 1451577600,
        "goodsNum": 0,
        "id": 96,
        "modifyTime": 0,
        "modifyUid": 0,
        "sort": 0,
        "startTime": 1451232000,
        "status": 2,
        "type": 1,
        "url": ""
      }
    ],
    "page": 1,
    "size": 3,
    "total": 3,
    "totalPage": 1
  },
  "md5": "01acb7689ad5d33bb49613d9d3a4cbb1",
  "message": "查询搜索词列表"
}

新增下拉词

接口名:searchWords/addSearchWords

入参


属性名称 类型 例子 说明
type int 2 搜索词类型:2默认搜索词
content String 内容实得分 内容
goodsNum int 4 商品数
sort int 12 排序
creatorUid int 2323 添加人id
creatorUsrname String zhangsan 添加人名称

返回

请求样例:
{
    "content": "2342",
    "creatorUid": 3,
    "creatorUsrname": "zhangsan",
    "goodsNum": 1,
    "sort": "32"
}
正常返回:
{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "添加成功"
}
异常返回:
{
  "code": 405,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "频道不能为空"
}

修改下拉词

接口名:searchWords/updateSearchWords

入参


属性名称 类型 例子 说明
id int 1 主键
type int 2 搜索词类型:2 下拉词
goodsNum int 4 商品数
sort int 12 排序
status int 1 状态 2 开启 1 禁用
modifyUid int 2323 修改人id
modifyUsrname String zhangsan 修改人名称

样例

请求样例:
{
    "content": "2342",
    "endTime": 1449504000,
    "modifyUid": 3,
    "modifyUsrname": "zhangsan",
    "type":2,
    "status": 1,
    "id": 111,
    "goodsNum": 3,
    "sort": 3
}
正常返回:
{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "修改成功"
}
异常返回:
{
  "code": 405,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": "内容不能为空"
}

查询下拉词

接口名: /searchWords/querySearchWords

入参


属性名称 类型 例子 说明
page int 2 第几页
size int 10 每页条数
type int 2 搜索词类型:2 下拉词
content String 阿迪 内容
status int 1 状态 2 开启 1 禁用

返回

请求
{
"page":0,
"size":3,
"content":"哈哈",
"type":2,
"status":1
}
返回:
{
  "code": 200,
  "data": {
    "list": [
      {
        "channelIds": "",
        "content": "呵呵哈哈",
        "createdTime": 1451290193,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 0,
        "goodsNum": 0,
        "id": 99,
        "modifyTime": 0,
        "modifyUid": 0,
        "sort": 7,
        "startTime": 0,
        "status": 2,
        "type": 3,
        "url": ""
      },
      {
        "channelIds": "",
        "content": "哈哈哈",
        "createdTime": 1451290166,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 0,
        "goodsNum": 4,
        "id": 97,
        "modifyTime": 1451326921,
        "modifyUid": 100019,
        "modifyUsrname": "zhipeng.wei",
        "sort": 4,
        "startTime": 0,
        "status": 2,
        "type": 2,
        "url": ""
      },
      {
        "channelIds": "",
        "content": "呵呵哈哈",
        "createdTime": 1451290085,
        "creatorUid": 2799,
        "creatorUsrname": "gaoshang",
        "endTime": 1451577600,
        "goodsNum": 0,
        "id": 96,
        "modifyTime": 0,
        "modifyUid": 0,
        "sort": 0,
        "startTime": 1451232000,
        "status": 2,
        "type": 1,
        "url": ""
      }
    ],
    "page": 1,
    "size": 3,
    "total": 3,
    "totalPage": 1
  },
  "md5": "01acb7689ad5d33bb49613d9d3a4cbb1",
  "message": "查询搜索词列表"
}