- hardcode for ebai.UpdateStore
This commit is contained in:
@@ -179,12 +179,17 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
mergeStatus := jxutils.MergeStoreStatus(store.Status, store.EbaiStoreStatus)
|
mergeStatus := jxutils.MergeStoreStatus(store.Status, store.EbaiStoreStatus)
|
||||||
if mergeStatus == model.StoreStatusOpened {
|
if store2.Status != mergeStatus {
|
||||||
err = api.EbaiAPI.ShopOnline("", utils.Str2Int64(store.VendorStoreID))
|
if mergeStatus == model.StoreStatusOpened {
|
||||||
} else if mergeStatus == model.StoreStatusClosed {
|
err = api.EbaiAPI.ShopOnline("", utils.Str2Int64(store.VendorStoreID))
|
||||||
err = api.EbaiAPI.ShopOffline("", utils.Str2Int64(store.VendorStoreID))
|
} else if mergeStatus == model.StoreStatusClosed {
|
||||||
} else if mergeStatus == model.StoreStatusClosed {
|
err = api.EbaiAPI.ShopOffline("", utils.Str2Int64(store.VendorStoreID))
|
||||||
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(store.VendorStoreID))
|
} else if mergeStatus == model.StoreStatusClosed {
|
||||||
|
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(store.VendorStoreID))
|
||||||
|
}
|
||||||
|
if intErr, ok := err.(*utils.ErrorWithCode); ok && intErr.IntCode() == 201100 {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// todo
|
// todo
|
||||||
|
|||||||
Reference in New Issue
Block a user