- 京东到家活动信息中,单个Sku上的活动时间更准确,
This commit is contained in:
@@ -398,8 +398,8 @@ func vendorActInfo2Model(ctx *jxcontext.Context, db *dao.DaoDB, act2 *model.Act2
|
|||||||
vendorStoreIDMap[v.VendorStoreID] = 1
|
vendorStoreIDMap[v.VendorStoreID] = 1
|
||||||
vendorSkuIDMap[v.VendorSkuID] = 1
|
vendorSkuIDMap[v.VendorSkuID] = 1
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug(utils.Format4Output(vendorStoreIDMap, false))
|
// globals.SugarLogger.Debug(utils.Format4Output(vendorStoreIDMap, false))
|
||||||
globals.SugarLogger.Debug(utils.Format4Output(vendorSkuIDMap, false))
|
// globals.SugarLogger.Debug(utils.Format4Output(vendorSkuIDMap, false))
|
||||||
|
|
||||||
vendorID := act2.VendorID
|
vendorID := act2.VendorID
|
||||||
storeSkuList, err2 := dao.GetStoresSkusInfoByVendorInfo(db, vendorID, jxutils.StringMap2List(vendorStoreIDMap), jxutils.StringMap2List(vendorSkuIDMap))
|
storeSkuList, err2 := dao.GetStoresSkusInfoByVendorInfo(db, vendorID, jxutils.StringMap2List(vendorStoreIDMap), jxutils.StringMap2List(vendorSkuIDMap))
|
||||||
|
|||||||
@@ -325,8 +325,8 @@ func getActFromJD(promotionID string) (act *model.Act2, actStoreSkuList []*model
|
|||||||
Act: model.Act{Name: result.Source + "-" + utils.Int64ToStr(result.PromotionInfoID),
|
Act: model.Act{Name: result.Source + "-" + utils.Int64ToStr(result.PromotionInfoID),
|
||||||
Type: jdSkuActType2Jx(result.PromotionType),
|
Type: jdSkuActType2Jx(result.PromotionType),
|
||||||
Status: jdSkuActStatus2Jx(result.PromotionState),
|
Status: jdSkuActStatus2Jx(result.PromotionState),
|
||||||
BeginAt: result.BeginTime.GoTime(),
|
BeginAt: result.SkuResultList[0].BeginTime.GoTime(),
|
||||||
EndAt: result.EndTime.GoTime(),
|
EndAt: result.SkuResultList[0].EndTime.GoTime(),
|
||||||
Source: result.Source,
|
Source: result.Source,
|
||||||
CreateType: model.ActCreateTypeCallback,
|
CreateType: model.ActCreateTypeCallback,
|
||||||
PricePercentage: 0,
|
PricePercentage: 0,
|
||||||
@@ -336,6 +336,12 @@ func getActFromJD(promotionID string) (act *model.Act2, actStoreSkuList []*model
|
|||||||
VendorID: model.VendorIDJD,
|
VendorID: model.VendorIDJD,
|
||||||
VendorActID: promotionID,
|
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 {
|
if result.SkuResultList[0].LimitPin == 1 || result.SkuResultList[0].LimitDevice == 1 {
|
||||||
act.LimitUser = 1
|
act.LimitUser = 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user