diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 69d07a5de..9e034d4d2 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -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)) diff --git a/business/partner/purchase/jd/act.go b/business/partner/purchase/jd/act.go index 515ba9753..7c32df99d 100644 --- a/business/partner/purchase/jd/act.go +++ b/business/partner/purchase/jd/act.go @@ -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 }