Browse Source

增加系统配置接口

kobe6258 4 months ago
parent
commit
1656bd8f19
3 changed files with 2 additions and 1 deletions
  1. 1 0
      controllers/product.go
  2. 0 1
      models/merchant_product.go
  3. 1 0
      models/request/product.go

+ 1 - 0
controllers/product.go

@@ -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

+ 0 - 1
models/merchant_product.go

@@ -89,7 +89,6 @@ func (mp *MerchantProduct) EditProduct() (err error) {
 	} else {
 		_, err = o.Update(mp, "updated_time", "price")
 	}
-
 	return
 }
 func (mp *MerchantProduct) UpdateProductSaleStatus() (err error) {

+ 1 - 0
models/request/product.go

@@ -1,6 +1,7 @@
 package request
 
 type ProductReq struct {
+	ProductId   int
 	ProductName string
 	SourceId    int
 	Type        string