- 对于饿百,在设置门店状态时,判断门店状态是否一致时,要将StoreStatusClosed与StoreStatusHaveRest当成一样的
This commit is contained in:
@@ -181,7 +181,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
}
|
||||
if err == nil {
|
||||
mergeStatus := jxutils.MergeStoreStatus(store.Status, store.EbaiStoreStatus)
|
||||
if store2.Status != mergeStatus {
|
||||
if !isStoreStatusSame(store2.Status, mergeStatus) {
|
||||
if mergeStatus == model.StoreStatusOpened {
|
||||
err = api.EbaiAPI.ShopOpen("", utils.Str2Int64(store.VendorStoreID))
|
||||
} else if mergeStatus == model.StoreStatusHaveRest || mergeStatus == model.StoreStatusClosed {
|
||||
@@ -214,6 +214,16 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
return err
|
||||
}
|
||||
|
||||
func isStoreStatusSame(status1, status2 int) bool {
|
||||
if status1 == model.StoreStatusClosed {
|
||||
status1 = model.StoreStatusHaveRest
|
||||
}
|
||||
if status2 == model.StoreStatusClosed {
|
||||
status2 = model.StoreStatusHaveRest
|
||||
}
|
||||
return status1 == status2
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("ebai RefreshAllStoresID")
|
||||
const batchSize = 50
|
||||
|
||||
Reference in New Issue
Block a user