fix: resolve frontend build error and order refund bug, add member price filter

This commit is contained in:
2026-01-07 21:49:04 +08:00
parent 5b45f7d5c4
commit a1de16bc01
18 changed files with 772 additions and 282 deletions

View File

@@ -260,6 +260,34 @@ func (u *User) Notifications(ctx fiber.Ctx, user *models.User, typeArg string, p
return services.Notification.List(ctx, user.ID, page, typeArg)
}
// Mark notification as read
//
// @Router /v1/me/notifications/:id/read [post]
// @Summary Mark as read
// @Tags UserCenter
// @Accept json
// @Produce json
// @Param id path string true "Notification ID"
// @Success 200 {string} string "OK"
// @Bind user local key(__ctx_user)
// @Bind id path
func (u *User) MarkNotificationRead(ctx fiber.Ctx, user *models.User, id string) error {
return services.Notification.MarkRead(ctx, user.ID, id)
}
// Mark all notifications as read
//
// @Router /v1/me/notifications/read-all [post]
// @Summary Mark all as read
// @Tags UserCenter
// @Accept json
// @Produce json
// @Success 200 {string} string "OK"
// @Bind user local key(__ctx_user)
func (u *User) MarkAllNotificationsRead(ctx fiber.Ctx, user *models.User) error {
return services.Notification.MarkAllRead(ctx, user.ID)
}
// List my coupons
//
// @Router /v1/me/coupons [get]