忧虑时间

获取忧虑详情列表: /worryTimeDetails GET

请求参数

参数名 示例值 类型 说明 默认值
memberId 1 number 用户id
organizationId 1 number 机构id
date 1680451200 number 日期

返回参数

参数名 示列值 说明
page 1 当前页数
pageSize 10 每页条数
limit 10 同 pageSize
offset 2 起始条数
total 3231 符合条件的总数量
items [{},{}] 返回数据项
参数名 示例值 说明
id 1 id
memberId 1 用户id
organizationId 1 机构id
startDegree 80 忧虑开始程度
endDegree 20 忧虑最后程度
date 1680796800 日期
duration 900 持续时间
createdAt 1680850744 创建时间

返回示例

{
    "items": [
        {
            "createdAt": 1680850744,
            "id": 1,
            "memberId": 14,
            "organizationId": 1,
            "startDegree": 80,
            "endDegree": 20,
            "date": 1680796800,
            "duration": 900,
        }
    ],
    "limit": 10,
    "offset": 0,
    "page": 1,
    "pageSize": 10,
    "total": 1
}

获取忧虑清单: /worryTimeLists GET

请求参数

参数名 示例值 类型 说明 默认值
memberId 1 number 用户id
organizationId 1 number 机构id
date 1680451200 number 日期

返回参数

参数名 示列值 说明
page 1 当前页数
pageSize 10 每页条数
limit 10 同 pageSize
offset 2 起始条数
total 3231 符合条件的总数量
items [{},{}] 返回数据项
参数名 示例值 说明
id 1 id
memberId 1 用户id
organizationId 1 机构id
content xxx 忧虑内容
date 1680796800 日期
createdAt 1680850867 创建时间
updatedAt 1680850867 更新时间

返回示例

{
    "items": [
        {
            "createdAt": 1680850867,
            "updatedAt": 1680850867,
            "id": 3,
            "organizationId": 1,
            "memberId": 14,
            "content": "赖床",
            "date": 1680796800
        },
        {
            "createdAt": 1680850867,
            "updatedAt": 1680850867,
            "id": 2,
            "organizationId": 1,
            "memberId": 14,
            "content": "下雨",
            "date": 1680796800
        },
        {
            "createdAt": 1680850867,
            "updatedAt": 1680850867,
            "id": 1,
            "organizationId": 1,
            "memberId": 14,
            "content": "被上级批评",
            "date": 1680796800
        }
    ],
    "limit": 10,
    "offset": 0,
    "page": 1,
    "pageSize": 10,
    "total": 3
}

忧虑清单列表(含次数): /worryTimeLists/groupByCount GET

请求参数

参数名 示例值 类型 说明 默认值
memberId 1 number 用户id
organizationId 1 number 机构id
expand "data" string 扩展

返回参数

参数名 示例值 说明
content xxx 忧虑内容
count 1 次数
data [{},{}] 相关内容统计
参数名 示例值 说明
id 1 id
content xxx 忧虑内容
date 1680796800 记录日期

返回示例

{
    "code": 0,
    "data": [
        {
            "content": "赖床",
            "count": 2,
            "data": [
                {
                    "id": 3,
                    "content": "赖床",
                    "date": 1680796800
                },
                {
                    "id": 4,
                    "content": "赖床",
                    "date": 1680710400
                }
            ]
        },
        {
            "content": "被上级批评",
            "count": 1,
            "data": [
                {
                    "id": 1,
                    "content": "被上级批评",
                    "date": 1680796800
                }
            ]
        },
        {
            "content": "下雨",
            "count": 1,
            "data": [
                {
                    "id": 2,
                    "content": "下雨",
                    "date": 1680796800
                }
            ]
        }
    ],
    "message": "success"
}

获取忧虑详情: /worryTimeDetails/:id GET

请求参数

参数名 示例值 类型 必须 说明
id 1 number id
expand "worryTime,worryLists" string 扩展

返回参数

参数名 示例值 说明
id 1 id
memberId 1 用户id
organizationId 1 机构id
startDegree 80 开始程度
endDegree 20 结束程度
date 1680796800 记录日期
worryTIme {} 用户忧虑信息
worryLists [{},{}] 忧虑清单
参数名 示例值 说明
id 1 id
memberId 1 用户id
organizationId 1 机构id
time 75449 提醒时间(距当日0点的时间间隔)
place "客厅" 忧虑地点
date 1680710400 上一次登录的日期
intervalTime 3 间隔时间(3、4、5天)
remindTimes "300,600" 提醒时间(提前5分钟为300秒)
createdAt 创建时间
updateAt 更新时间

返回示例

{
    "createdAt": 1681112596,
    "id": 1,
    "memberId": 1,
    "organizationId": 1,
    "startDegree": 80,
    "endDegree": 20,
    "date": 1680796800,
    "worryTime": {
        "id": 2,
        "memberId": 1,
        "organizationId": 1,
        "time": 75449,
        "place": "客厅",
        "date": 1680710400,
        "intervalTime": 3,
        "remindTimes": "2,3,4,5,6",
        "createdAt": "2023-04-06T12:06:41.000Z",
        "updatedAt": "2023-04-06T12:06:41.000Z",
        "deletedAt": null
    },
    "worryLists": [
        {
            "createdAt": 1680744798,
            "updatedAt": 1680744798,
            "id": 2,
            "organizationId": 1,
            "memberId": 1,
            "content": "b",
            "date": 1680796800,
            "deletedAt": null
        },
        {
            "createdAt": 1680744798,
            "updatedAt": 1680744798,
            "id": 3,
            "organizationId": 1,
            "memberId": 1,
            "content": "c",
            "date": 1680796800,
            "deletedAt": null
        },
        {
            "createdAt": 1680744798,
            "updatedAt": 1680744798,
            "id": 4,
            "organizationId": 1,
            "memberId": 1,
            "content": "d",
            "date": 1680796800,
            "deletedAt": null
        }
    ]
}

获取所有忧虑清单: /listAll/worryTimeLists GET

请求参数

参数名 示例值 类型 说明 默认值
memberId 1 number 用户id
organizationId 1 number 机构id
date 1680451200 number 日期

返回参数: 忧虑清单参数

返回示例

[
    {
        "createdAt": 1680852016,
        "updatedAt": 1680852016,
        "id": 4,
        "organizationId": 1,
        "memberId": 14,
        "content": "赖床",
        "date": 1680710400
    }
]