@@ -671,6 +671,7 @@ func (this *ProductController) EditProduct() {
br.ErrMsg = "产品价格不能小于0"
return
}
+ product.Id = req.ProductId
product.SaleStatus = models.OnSale
product.CreatedTime = time.Now()
product.Price = req.Price
@@ -89,7 +89,6 @@ func (mp *MerchantProduct) EditProduct() (err error) {
} else {
_, err = o.Update(mp, "updated_time", "price")
-
func (mp *MerchantProduct) UpdateProductSaleStatus() (err error) {
@@ -1,6 +1,7 @@
package request
type ProductReq struct {
+ ProductId int
ProductName string
SourceId int
Type string