Quellcode durchsuchen

conversrc->converUrl

kobe6258 vor 4 Monaten
Ursprung
Commit
f64bd09e7b
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      domian/merchant/merchant_product.go
  2. 1 1
      models/merchant/merchant_product.go

+ 1 - 1
domian/merchant/merchant_product.go

@@ -76,7 +76,7 @@ func convertToDTO(product merchantDao.MerchantProduct) MerchantProductDTO {
 		SourceId:    product.SourceId,
 		SaleStatus:  string(product.SaleStatus),
 		CreatedTime: product.CreatedTime,
-		Deleted:     product.Deleted,
+		Deleted:     product.Deleted > 0,
 	}
 
 }

+ 1 - 1
models/merchant/merchant_product.go

@@ -42,7 +42,7 @@ type MerchantProduct struct {
 	IsPermanent bool                `gorm:"column:is_permanent;type:int(1);not null;default:0;comment:是否永久"`
 	ValidDays   int                 `gorm:"column:valid_days;type:int(11);comment:有效期天数"`
 	SaleStatus  SaleStatus          `gorm:"column:sale_status;type:enum('on_sale','off_sale');not null;default:'on_sale';comment:上架/下架状态"`
-	Deleted     bool                `gorm:"column:deleted;type:tinyint(1);not null;default:0;comment:是否删除"`
+	Deleted     int                 `gorm:"column:deleted;type:tinyint(1);not null;default:0;comment:是否删除"`
 	CreatedTime time.Time           `gorm:"column:created_time;type:datetime;comment:创建时间"`
 	UpdatedTime time.Time           `gorm:"column:updated_time;type:datetime;comment:更新时间;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP"`
 }