日志发送逻辑及测试消息发送接口

This commit is contained in:
2025-10-24 21:24:48 +08:00
parent 9d6876684b
commit 3fd97aa43f
14 changed files with 576 additions and 9 deletions

View File

@@ -1125,6 +1125,17 @@ definitions:
- traderName
- unitPrice
type: object
dto.SendTestNotificationRequest:
properties:
type:
allOf:
- $ref: '#/definitions/notify.NotifierType'
description: |-
Type 指定要测试的通知渠道
@enum(smtp, wechat, lark, log)
required:
- type
type: object
dto.SensorDataDTO:
properties:
data:
@@ -1816,6 +1827,20 @@ definitions:
type:
$ref: '#/definitions/models.SensorType'
type: object
notify.NotifierType:
enum:
- smtp
- wechat
- lark
- sms
- log
type: string
x-enum-varnames:
- NotifierTypeSMTP
- NotifierTypeWeChat
- NotifierTypeLark
- NotifierTypeSMS
- NotifierTypeLog
info:
contact:
email: divano@example.com
@@ -4086,6 +4111,40 @@ paths:
summary: 获取指定用户的操作历史
tags:
- 用户管理
/api/v1/users/{id}/notifications/test:
post:
consumes:
- application/json
description: 为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。
parameters:
- description: 用户ID
in: path
name: id
required: true
type: integer
- description: 请求体
in: body
name: body
required: true
schema:
$ref: '#/definitions/dto.SendTestNotificationRequest'
produces:
- application/json
responses:
"200":
description: 成功响应
schema:
allOf:
- $ref: '#/definitions/controller.Response'
- properties:
data:
type: string
type: object
security:
- BearerAuth: []
summary: 发送测试通知
tags:
- 用户管理
/api/v1/users/login:
post:
consumes: