This commit is contained in:
suyl
2021-07-19 16:48:44 +08:00
parent 145211bbe2
commit 38891c676a
3 changed files with 41 additions and 43 deletions

View File

@@ -389,7 +389,7 @@ func GetManageState(ctx *jxcontext.Context, cityCodes []int, vendorID int) (getM
return getManageStateResult, err
}
func RefreshStoreManageState(ctx *jxcontext.Context) {
func RefreshStoreManageState(ctx *jxcontext.Context, storeIDs []int) {
var (
db = dao.GetDB()
vendorIDs = []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI}
@@ -398,8 +398,8 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
task := tasksch.NewParallelTask("RefreshStoreManageState", tasksch.NewParallelConfig().SetParallelCount(3).SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
vendorID := batchItemList[0].(int)
storeMaps, err := dao.GetStoresMapList(db, []int{vendorID}, nil, []int{model.StoreStatusOpened, model.StoreStatusClosed, model.StoreStatusHaveRest}, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
storeManageStates, err := dao.GetStoreManageStateSimple(db, nil, nil, vendorID)
storeMaps, err := dao.GetStoresMapList(db, []int{vendorID}, storeIDs, []int{model.StoreStatusOpened, model.StoreStatusClosed, model.StoreStatusHaveRest}, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
storeManageStates, err := dao.GetStoreManageStateSimple(db, storeIDs, nil, vendorID)
var (
storeMapsMap = make(map[int]*model.StoreMap)
storeManagesMap = make(map[int]*model.StoreManageState)