GetEffectiveActStoreSkuInfo中排除绑定活动

This commit is contained in:
gazebo
2020-01-21 14:38:42 +08:00
parent 0dc7d29e61
commit 16748e7d22
2 changed files with 5 additions and 2 deletions

View File

@@ -879,7 +879,7 @@ func SyncAct(ctx *jxcontext.Context, parentTask tasksch.ITask, actID int, vendor
// 保存最后一次同步错误信息
dao.UpdateEntity(db, tmpActMap, "Remark")
} else {
SyncSpecialAct(ctx, task, actMap[vendorID], nil, actStoreSkuMap[vendorID])
err = SyncSpecialAct(ctx, task, actMap[vendorID], nil, actStoreSkuMap[vendorID])
}
} else {
globals.SugarLogger.Warnf("SyncAct strange actID:%d, vendorID:%d", actID, vendorID)

View File

@@ -410,6 +410,9 @@ func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, actType
sql += " AND t2.sku_id IN (" + GenQuestionMarks(len(skuIDs)) + ")"
sqlParams = append(sqlParams, skuIDs)
}
if globals.IsStoreSkuAct {
sql += " AND t1.is_special = 0"
}
// globals.SugarLogger.Debug(sql)
// globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false))
err = GetRows(db, &actStoreSkuList, sql, sqlParams...)
@@ -523,7 +526,7 @@ func GetStoresSkusAct(db *DaoDB, hintActID int, mustDirty bool, storeIDs, skuIDs
sqlParams = append(sqlParams, hintActID)
}
if mustDirty {
sql += " AND t1.sync_status <> 0"
sql += " AND (t1.sync_status <> 0 OR (t1.act_percentage = 0 AND t1.vendor_act_id <> '') OR (t1.act_percentage <> 0 AND t1.vendor_act_id = ''))"
}
if len(storeIDs) > 0 {
sql += " AND t1.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"