PUT /admin/notifications/preferences/{user_id}
管理员为指定用户设置通知渠道偏好(邮件/短信/Push等)
通知服务 `bearerAuth` application/json
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
user_id |
path |
string |
是 |
|
|
|
用户ID |
引用的 Schema
dto.DataResponse-service-notification/internal/handler/dto/NotificationPreferencesResponse
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
code |
integer |
否 |
|
|
|
message |
string |
否 |
|
|
|
timestamp |
string |
否 |
|
|
|
service-notification/internal/handler/dto.NotificationPreferencesResponse
用户通知偏好设置
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
channels |
object |
否 |
|
|
渠道设置 |
email_enabled |
boolean |
否 |
True |
|
邮件启用 |
push_enabled |
boolean |
否 |
True |
|
推送启用 |
quiet_hours |
object |
否 |
|
|
免打扰时段 |
sms_enabled |
boolean |
否 |
False |
|
短信启用 |
type_prefs |
object |
否 |
|
|
通知类型偏好 |
updated_at |
string |
否 |
2026-04-15T10:30:00Z |
|
更新时间 |
user_id |
string |
否 |
usr_abc123 |
|
用户ID |