生成门店商品备份表优化
This commit is contained in:
@@ -3847,9 +3847,8 @@ func getSkuNamePrice(db *dao.DaoDB, skuID int, orgPrice int64) (price int64, nam
|
||||
|
||||
func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
storeSkuBinds []*model.StoreSkuBind
|
||||
snapshotAt = time.Now()
|
||||
db = dao.GetDB()
|
||||
snapshotAt = time.Now()
|
||||
)
|
||||
storeSkuBindHis := &model.StoreSkuBindHistory{
|
||||
SnapshotAt: snapshotAt.AddDate(0, 0, -3),
|
||||
@@ -3860,9 +3859,6 @@ func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError boo
|
||||
dao.DeleteEntity(db, storeSkuBindHis, "SnapShotAt")
|
||||
dao.DeleteEntity(db, storeSkuBindHis2, "SnapShotAt")
|
||||
storeList, err := dao.GetStoreList(db, nil, nil, nil, nil, "")
|
||||
sql := `SELECT * FROM store_sku_bind WHERE deleted_at = ?`
|
||||
sqlParams := []interface{}{utils.DefaultTimeValue}
|
||||
err = dao.GetRows(db, &storeSkuBinds, sql, sqlParams)
|
||||
task := tasksch.NewParallelTask("RefreshOrdersPriceInfo", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
store := batchItemList[0].(*model.Store)
|
||||
|
||||
Reference in New Issue
Block a user