- 京东到家活动信息中,单个Sku上的活动时间更准确,

This commit is contained in:
gazebo
2019-07-09 14:58:33 +08:00
parent c30329ecea
commit e04e09692c
2 changed files with 10 additions and 4 deletions

View File

@@ -398,8 +398,8 @@ func vendorActInfo2Model(ctx *jxcontext.Context, db *dao.DaoDB, act2 *model.Act2
vendorStoreIDMap[v.VendorStoreID] = 1
vendorSkuIDMap[v.VendorSkuID] = 1
}
globals.SugarLogger.Debug(utils.Format4Output(vendorStoreIDMap, false))
globals.SugarLogger.Debug(utils.Format4Output(vendorSkuIDMap, false))
// globals.SugarLogger.Debug(utils.Format4Output(vendorStoreIDMap, false))
// globals.SugarLogger.Debug(utils.Format4Output(vendorSkuIDMap, false))
vendorID := act2.VendorID
storeSkuList, err2 := dao.GetStoresSkusInfoByVendorInfo(db, vendorID, jxutils.StringMap2List(vendorStoreIDMap), jxutils.StringMap2List(vendorSkuIDMap))

View File

@@ -325,8 +325,8 @@ func getActFromJD(promotionID string) (act *model.Act2, actStoreSkuList []*model
Act: model.Act{Name: result.Source + "-" + utils.Int64ToStr(result.PromotionInfoID),
Type: jdSkuActType2Jx(result.PromotionType),
Status: jdSkuActStatus2Jx(result.PromotionState),
BeginAt: result.BeginTime.GoTime(),
EndAt: result.EndTime.GoTime(),
BeginAt: result.SkuResultList[0].BeginTime.GoTime(),
EndAt: result.SkuResultList[0].EndTime.GoTime(),
Source: result.Source,
CreateType: model.ActCreateTypeCallback,
PricePercentage: 0,
@@ -336,6 +336,12 @@ func getActFromJD(promotionID string) (act *model.Act2, actStoreSkuList []*model
VendorID: model.VendorIDJD,
VendorActID: promotionID,
}
if utils.IsTimeZero(act.BeginAt) {
act.BeginAt = result.BeginTime.GoTime()
}
if utils.IsTimeZero(act.EndAt) {
act.BeginAt = result.EndTime.GoTime()
}
if result.SkuResultList[0].LimitPin == 1 || result.SkuResultList[0].LimitDevice == 1 {
act.LimitUser = 1
}