wishlist fix
This commit is contained in:
parent
12621e9c14
commit
313b33f238
|
|
@ -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 oi ON p.id = oi.product_id " +
|
||||||
"LEFT JOIN order_items op ON p.id = op.parent_id " +
|
"LEFT JOIN order_items op ON p.id = op.parent_id " +
|
||||||
"LEFT JOIN wishlist wp ON p.id = wp.product_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(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 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)")
|
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)")
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ import (
|
||||||
|
|
||||||
func SendRequest(method string, endpoint string, values []byte, authKey string) ([]byte, error) {
|
func SendRequest(method string, endpoint string, values []byte, authKey string) ([]byte, error) {
|
||||||
|
|
||||||
const ConnectMaxWaitTime = 30 * time.Second
|
const ConnectMaxWaitTime = time.Minute
|
||||||
const RequestMaxWaitTime = 60 * time.Second
|
const RequestMaxWaitTime = 5 * time.Minute
|
||||||
|
|
||||||
client := http.Client{
|
client := http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue