wishlist fix

This commit is contained in:
merdan 2023-01-19 16:40:18 +05:00
parent 14d0ca81cb
commit 12621e9c14
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ func DeleteProducts(db *gorm.DB) error {
"LEFT JOIN order_items oi ON p.id = oi.product_id " +
"LEFT JOIN order_items op ON p.id = op.parent_id " +
"LEFT JOIN wishlist wp ON p.id = wp.product_id " +
"WHERE oi.id IS NULL AND op.id IS NULL AND wp.id IS NULL AND product_id IN (SELECT product_id from marketplace_products where marketplace_seller_id=1);"
"WHERE oi.id IS NULL AND op.id IS NULL AND wp.id IS NULL AND p.id IN (SELECT product_id from marketplace_products where marketplace_seller_id=1);"
db.WithContext(ctx).Exec(qb)
db.WithContext(ctx).Exec("UPDATE product_flat set sku=concat(id,\"-ordered\"), status=0 where status=1 AND product_id IN (SELECT product_id from marketplace_products where marketplace_seller_id=1)" )
db.WithContext(ctx).Exec("UPDATE products set sku=concat(id,\"-ordered\") WHERE id IN (SELECT product_id from marketplace_products where marketplace_seller_id=1)")