seller id deadlock and delete elapsed time

This commit is contained in:
merdan 2022-09-21 13:04:46 +05:00
parent e5015c2c66
commit 190306d902
2 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
flatVariant.MaxPrice = sizeVariant.Price.DiscountedPrice.Value
}
if mainProductFlat.MinPrice > flatVariant.MinPrice || mainProductFlat.MinPrice == 0 {
if mainProductFlat.MinPrice > flatVariant.MinPrice || mainProductFlat.MinPrice == 0.0 {
mainProductFlat.MinPrice = flatVariant.MinPrice
}

View File

@ -37,7 +37,7 @@ type ProductFlat struct {
Price float64 `gorm:"type:decimal(12,4)"`
MinPrice float64 `gorm:"type:decimal(12,4)"`
MaxPrice float64 `gorm:"type:decimal(12,4)"`
SpecialPrice float64 `gorm:"type:decimal(12,4)"`
SpecialPrice float64 `sql:"DEFAULT:NULL" gorm:"type:decimal(12,4);default:null"`
UrlKey string `sql:"DEFAULT:NULL" gorm:"default:null"`
ShortDescription string `sql:"DEFAULT:NULL" gorm:"default:null"`
Description string `sql:"DEFAULT:NULL" gorm:"default:null"`