HC小区接口文档

投诉列表查询接口文档

投诉
查询投诉

一、接口名称

投诉列表查询

二、接口描述

查询小区内的投诉记录,支持分页查询,并返回投诉相关的图片和负责人员信息。

三、接口路径

http://ip:port/app/complaint.listComplaints

四、请求方法

GET

五、请求头

参数名称 必填 类型 描述
Authorization String 用户认证token,通过登录接口获取
app-id String 应用ID,系统dev账户分配
transaction-id String 请求流水号,不能重复,格式:1000000000+YYYYMMDDhhmmss+6位序列
sign String 签名
req-time String 请求时间,格式:YYYYMMDDhhmmss

六、请求参数

6.1 查询参数

参数名称 必填 类型 描述
communityId String 小区ID
page Integer 当前页码(默认1)
row Integer 每页记录数(默认10)
state String 投诉状态(可选值:待处理、处理中、已完成)
typeCd String 投诉类型编码
complaintId String 投诉单号(精确查询)
startTime String 投诉开始时间(YYYY-MM-DD)
endTime String 投诉结束时间(YYYY-MM-DD)

七、返回值

7.1 返回数据结构

参数名称 类型 描述
code String 返回码,0 表示成功,其他表示失败
msg String 返回信息
data Object 返回数据
data.total Integer 总记录数
data.records Integer 当前页记录数
data.rows List<ComplaintDto> 投诉数据列表

7.2 ComplaintDto 结构

参数名称 类型 描述
complaintId String 投诉单号
communityId String 小区ID
typeCd String 投诉类型编码
state String 投诉状态(待处理、处理中、已完成)
content String 投诉内容
createTime String 投诉时间
photos List<PhotoVo> 投诉相关图片
staffs List<ComplaintTypeUserDto> 负责处理的人员列表

7.3 PhotoVo 结构

参数名称 类型 描述
url String 图片URL

7.4 ComplaintTypeUserDto 结构

参数名称 类型 描述
userId String 员工ID
userName String 员工姓名
typeCd String 投诉类型编码

八、示例请求

GET /app/complaint.listComplaints?communityId=123456&page=1&row=10 HTTP/1.1
Authorization: Bearer xxxxxxxx
app-id: micro-community
transaction-id: 100000000020231001120000000001
sign: xxxxxxxx
req-time: 20231001120000

九、示例响应

{
  "code": "0",
  "msg": "成功",
  "data": {
    "total": 5,
    "records": 2,
    "rows": [
      {
        "complaintId": "10001",
        "communityId": "123456",
        "typeCd": "1001",
        "state": "待处理",
        "content": "楼道灯坏了",
        "createTime": "2023-10-01 10:00:00",
        "photos": [
          {
            "url": "http://xxx.com/photo1.jpg"
          }
        ],
        "staffs": [
          {
            "userId": "2001",
            "userName": "张三",
            "typeCd": "1001"
          }
        ]
      },
      {
        "complaintId": "10002",
        "communityId": "123456",
        "typeCd": "1002",
        "state": "处理中",
        "content": "电梯故障",
        "createTime": "2023-10-01 11:00:00",
        "photos": [],
        "staffs": [
          {
            "userId": "2002",
            "userName": "李四",
            "typeCd": "1002"
          }
        ]
      }
    ]
  }
}