This commit is contained in:
苏尹岚
2021-01-22 10:05:43 +08:00
parent f85fa9e12a
commit 519592bc31
14 changed files with 145 additions and 30 deletions

View File

@@ -931,7 +931,7 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
func UpdateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*StoreSkuBindInfo, isRefreshHigh bool) (err error) {
db := dao.GetDB()
if len(storeIDs) == 0 {
stores, _ := dao.GetStoreList(db, nil, nil, nil, nil, "")
stores, _ := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
for _, v := range stores {
storeIDs = append(storeIDs, v.ID)
}
@@ -3267,7 +3267,7 @@ func FocusStoreSkusByExcelBin(ctx *jxcontext.Context, reader io.Reader, isAsync,
skuIDs = append(skuIDs, k)
}
skuList, err := dao.GetSkus(db, skuIDs, nil, nil, nil, nil)
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, "")
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
if err != nil && len(skuList) == 0 {
return result, err
}
@@ -3454,7 +3454,7 @@ func AutoFocusStoreSkusForTopSkus(ctx *jxcontext.Context, isAsync, isContinueWhe
var (
result1 []interface{}
)
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, "")
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
switch step {
case 0:
@@ -3552,7 +3552,7 @@ func AutoFocusStoreSkusWithoutFocus(ctx *jxcontext.Context, skuIDs []int, isSync
nameMap = make(map[int]*StoreSkuBindInfo)
)
db := dao.GetDB()
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, "")
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
for _, v := range storeList {
storeSkuList, _ := dao.GetStoreSkusAndSkuName(db, []int{v.ID}, skuIDs, nil)
for _, vv := range storeSkuList {
@@ -4155,7 +4155,7 @@ func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError boo
SnapshotAt: snapshotAt.AddDate(0, 0, -5),
}
dao.DeleteEntity(db, storeSkuBindHis, "SnapshotAt")
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, "")
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
task := tasksch.NewParallelTask("BackUpStoreSkuBind", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
store := batchItemList[0].(*model.Store)
@@ -4701,7 +4701,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
time.Sleep(time.Second / 5)
db := dao.GetDB()
for _, storeID := range storeIDs {
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "")
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, nil, "")
//扣点的门店改价不进审核
if len(stores) > 0 {
if stores[0].PayPercentage <= 50 || stores[0].StoreLevel == "E" || stores[0].StoreLevel == "D" {