移动端弹幕优化

This commit is contained in:
2025-12-09 16:42:37 +08:00
parent c68ece5bea
commit 9b2bffae15
4 changed files with 19 additions and 9 deletions

View File

@@ -73,13 +73,14 @@ func (h *ProductAdminHandler) CreateProduct(c *gin.Context) {
return
}
if err := h.productAppService.CreateProduct(c.Request.Context(), &cmd); err != nil {
result, err := h.productAppService.CreateProduct(c.Request.Context(), &cmd)
if err != nil {
h.logger.Error("创建产品失败", zap.Error(err))
h.responseBuilder.BadRequest(c, err.Error())
return
}
h.responseBuilder.Created(c, nil, "产品创建成功")
h.responseBuilder.Created(c, result, "产品创建成功")
}
// UpdateProduct 更新产品