From e04e09692c3580d27cc9e955fa9269df91936272 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 9 Jul 2019 14:58:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BA=AC=E4=B8=9C=E5=88=B0=E5=AE=B6?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E4=BF=A1=E6=81=AF=E4=B8=AD=EF=BC=8C=E5=8D=95?= =?UTF-8?q?=E4=B8=AASku=E4=B8=8A=E7=9A=84=E6=B4=BB=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=9B=B4=E5=87=86=E7=A1=AE=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 4 ++-- business/partner/purchase/jd/act.go | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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 }