Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2020-01-08 10:03:19 +08:00
6 changed files with 18 additions and 11 deletions

View File

@@ -2974,6 +2974,7 @@ func FocusStoreSkusBySku(ctx *jxcontext.Context, skuIDs []int, isAsync, isContin
}
}
skuBindInfo := &StoreSkuBindInfo{
StoreID: store.ID,
NameID: k,
UnitPrice: price,
IsFocus: 1,
@@ -2994,7 +2995,7 @@ func FocusStoreSkusBySku(ctx *jxcontext.Context, skuIDs []int, isAsync, isContin
case 2:
for _, v := range result1 {
tUpdate := v.(*tUpdateStoresSkus)
UpdateStoresSkus(ctx, []int{tUpdate.StoreID}, tUpdate.SkuBindInfos, false, isAsync, isContinueWhenError)
UpdateStoresSkusByBind(ctx, tUpdate.SkuBindInfos, isAsync, isContinueWhenError)
}
}
return result, err

View File

@@ -1,9 +1,11 @@
package event
func AddOperateEvent() {
import "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
func AddOperateEvent(ctx *jxcontext.Context) {
}
func AddOperateEventDetail() {
func AddOperateEventDetail(ctx *jxcontext.Context) {
}

View File

@@ -65,6 +65,9 @@ func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int, isAsyn
var priceReferSnapshotList []*model.PriceReferSnapshot
db := dao.GetDB()
snapshotAt := utils.Time2Date(time.Now().AddDate(0, 0, -1))
dao.DeletePriceReferHistory(db, utils.Time2Date(snapshotAt.AddDate(0, 0, -7)))
priceReferSnapshotDelete := &model.PriceReferSnapshot{SnapshotAt: snapshotAt}
dao.DeleteEntity(db, priceReferSnapshotDelete, "SnapshotAt")
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
switch step {
case 0:
@@ -79,9 +82,6 @@ func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int, isAsyn
}
}
}()
dao.DeletePriceReferHistory(db, utils.Time2Date(snapshotAt.AddDate(0, 0, -7)))
priceReferSnapshotDelete := &model.PriceReferSnapshot{SnapshotAt: snapshotAt}
dao.DeleteEntity(db, priceReferSnapshotDelete, "SnapshotAt")
taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
v := batchItemList[0].(*model.PriceReferSnapshot)
dao.WrapAddIDCULDEntity(v, ctx.GetUserName())