chore: sync local updates

This commit is contained in:
2026-05-16 19:03:36 +08:00
parent 37983f3b60
commit f1417891ac
101 changed files with 4626 additions and 307 deletions

View File

@@ -35,7 +35,8 @@ func (h *WishlistHandler) requireUser(c *gin.Context) (string, bool) {
}
// GetWishlist 当前用户收藏的商品 ID 列表。
// @Summary 收藏列表
// @Summary 获取当前用户收藏列表
// @Description 需 Bearer 登录。返回该账号已收藏的商品 ID 数组(顺序由存储实现决定)。
// @Tags 收藏
// @Produce json
// @Security BearerAuth
@@ -62,12 +63,13 @@ type WishlistItemPayload struct {
}
// AddToWishlist 添加收藏。
// @Summary 添加收藏
// @Summary 添加商品到收藏
// @Description 需 Bearer。请求体为 `{ "productId": "..." }`;幂等语义由存储层实现(重复添加可忽略或报错以实际为准)。
// @Tags 收藏
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param body body WishlistItemPayload true "商品 ID"
// @Param body body WishlistItemPayload true "包含 productId 的 JSON"
// @Success 200 {object} SwaggerWishlistWrap
// @Failure 400 {object} SwaggerErrorBody
// @Failure 401 {object} SwaggerErrorBody
@@ -92,11 +94,12 @@ func (h *WishlistHandler) AddToWishlist(c *gin.Context) {
}
// RemoveFromWishlist 按商品 ID 移除收藏。
// @Summary 移除收藏
// @Summary 从收藏中移除商品
// @Description 需 Bearer。路径参数为要移除的商品 ID。
// @Tags 收藏
// @Produce json
// @Security BearerAuth
// @Param id path string true "商品 ID"
// @Param id path string true "商品ID(路径)"
// @Success 200 {object} SwaggerWishlistWrap
// @Failure 400 {object} SwaggerErrorBody
// @Failure 401 {object} SwaggerErrorBody