wishlist fix

This commit is contained in:
merdan 2023-01-19 16:59:50 +05:00
parent 12621e9c14
commit 313b33f238
2 changed files with 4 additions and 3 deletions

View File

@ -112,7 +112,8 @@ 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 p.id IN (SELECT product_id from marketplace_products where marketplace_seller_id=1);"
"JOIN marketplace_products mp ON p.id = mp.product_id "+
"WHERE oi.id IS NULL AND op.id IS NULL AND wp.id IS NULL AND mp.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)")

View File

@ -12,8 +12,8 @@ import (
func SendRequest(method string, endpoint string, values []byte, authKey string) ([]byte, error) {
const ConnectMaxWaitTime = 30 * time.Second
const RequestMaxWaitTime = 60 * time.Second
const ConnectMaxWaitTime = time.Minute
const RequestMaxWaitTime = 5 * time.Minute
client := http.Client{
Transport: &http.Transport{