实现外部商品调价

This commit is contained in:
yml2213
2026-07-26 19:17:09 +08:00
parent 6b44ab599d
commit 99e8eb28af
14 changed files with 1163 additions and 17 deletions
@@ -142,6 +142,29 @@ func (h *Handler) AdjustReviewPrice(c *gin.Context) {
response.OK(c, item)
}
func (h *Handler) AdjustExternalListing(c *gin.Context) {
adminID, ok := currentAdminID(c)
if !ok {
response.Unauthorized(c, "缺少管理员上下文")
return
}
id, ok := parseID(c)
if !ok {
return
}
var req AdminExternalListingAdjustRequest
if err := c.ShouldBindJSON(&req); err != nil {
response.BadRequest(c, "外部商品调整参数不正确")
return
}
item, err := h.service.AdjustExternalListing(c.Request.Context(), adminID, id, req, auditMeta(c))
if err != nil {
writeListingError(c, err)
return
}
response.OK(c, item)
}
func (h *Handler) Reject(c *gin.Context) {
id, ok := parseID(c)
if !ok {