温馨提示模版模版

列表: /tipsTemplates GET

请求参数

参数名 示列值 类型 必须 说明 默认值
page 1 number 当前页数 1
pageSize 10 number 每页条数 10
sort -submitAt string 排序。多个排序字段用,号隔开。sort=-a,b
expand 'organization' string 获取指定子资源数据: 'organization,creator'
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段
organizationId 1 number 组织 id
title "xxx" string 标题搜索
createdAt "[1650160322,1650160322]" string 创建时间搜索

返回参数

参数名 示列值 说明
page 1 当前页数
pageSize 10 每页条数
limit 10 同 pageSize
offset 2 起始条数
total 3231 符合条件的总数量
items [{},{}] 返回数据项(温馨提示模版)
参数名 示列值 说明
id 1 id
organizationId 1 组织 id
title "demo" 标题
content "xxxx" 内容
creatorId 1 创建者 id
createdAt 1650160322 创建时间
updatedAt 1650160322 更新时间
creator { } 【扩展资源】创建者信息
organization { } 【扩展资源】组织信息

返回示列

HTTP/1.1 200 OK
{
    "items": [
    {
      "id": 1,
      "title": "名称",
      "content": "内容",
      "creatorId": 1,
      "createdAt": 1650160322,
      "updatedAt": 1650160322,
    },
  ],
  "page": 1,
  "pageSize": 10,
  "limit": 10,
  "offset": 2,
  "total": 15
}

详情: /tipsTemplates/:id GET

请求参数

参数名 示列值 类型 必须 说明 默认值
id 1 number id
expand "organization" string 获取指定子资源数据: 'organization,creator'
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段

返回结果: 温馨提示模版信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
  "title": "名称",
  "content": "内容",
  "creatorId": 1,
  "createdAt": 1650160322,
  "updatedAt": 1650160322,
}

新建: /tipsTemplates POST

请求参数

参数名 示列值 类型 必须 说明 默认值
title "名称" string 名称
content "xxxxx" string 内容

返回结果: 温馨提示模版信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
  "title": "名称",
  "content": "内容",
  "creatorId": 1,
  "createdAt": 1650160322,
  "updatedAt": 1650160322,
}

编辑: /tipsTemplates/:id PUT

请求参数

参数名 示列值 类型 必须 说明 默认值
title "名称" string 名称
content "xxxxx" string 内容

返回结果: 温馨提示模版信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
  "title": "名称",
  "content": "内容",
  "creatorId": 1,
  "createdAt": 1650160322,
  "updatedAt": 1650160322,
}

入库: librarySetting/tipsTemplates POST

请求参数

参数名 示列值 类型 必须 说明
ids [1] array Y 方案 id 数组
orgIds [1,2] array Y 组织 id 数组
bulk true boolean 是否是批量入库(true:是)

返回示列

HTTP/1.1 200