POINTS_CONFIG_API.md 2.4 KB

积分来源配置 API 文档

本文档专门描述积分来源配置相关的接口。

1. 基础信息

  • URL 前缀: /v2/points/config
  • 响应格式: 统一使用 GlobalResponseWrapper

2. 接口列表

2.1 获取配置列表

  • URL: /list
  • Method: GET
  • 描述: 查询积分来源配置列表。

请求参数

无

响应参数 (data 字段)

返回 PointsConfigVO 对象列表,元素结构如下:

字段名 类型 说明
id integer 主键ID
code integer 来源代码
points integer 积分数量
expireDays integer 有效期天数
desc string 描述

示例响应

{
  "code": 200,
  "message": "success",
  "data": [
    {
      "id": 1,
      "code": 3,
      "points": 10,
      "expireDays": 7,
      "desc": "每日签到奖励"
    }
  ]
}

2.2 新增配置

  • URL: /add
  • Method: POST
  • Content-Type: application/json
  • 描述: 新增一条积分来源配置。

请求参数 (Body)

字段名 类型 必填 说明
code integer 是 来源代码 (1-8)
points integer 是 积分数量
expireDays integer 是 有效期天数
desc string 否 描述

响应参数

类型 说明
boolean 操作结果 (true/false)

2.3 更新配置

  • URL: /update
  • Method: PUT
  • Content-Type: application/json
  • 描述: 更新已存在的积分来源配置。

请求参数 (Body)

字段名 类型 必填 说明
id integer 是 主键ID
code integer 否 来源代码
points integer 否 积分数量
expireDays integer 否 有效期天数
desc string 否 描述

响应参数

类型 说明
boolean 操作结果 (true/false)

2.4 删除配置

  • URL: /delete
  • Method: DELETE
  • Content-Type: application/json
  • 描述: 批量删除积分来源配置。

请求参数 (Body)

类型 必填 说明
integer[] 是 主键ID数组,例如 [1, 2, 3]

响应参数

类型 说明
boolean 操作结果 (true/false)