From 26fa06ace46180327616180de0643b9aab1965ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 18 Aug 2020 14:25:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=98=E6=89=A3=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 2ee68353f..12f753e7d 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -238,7 +238,11 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac if storeSkuInfo != nil { jxPrice := storeSkuInfo.Price actSkuMap.VendorPrice = int64(getVendorPriceFromStoreSkuBind(storeSkuInfo, vendorID)) - v.OriginalPrice = int64(jxPrice) + if act.Type == model.ActSkuDiscount { + v.OriginalPrice = int64(storeSkuInfo.JxPrice) + } else { + v.OriginalPrice = int64(jxPrice) + } } var err2 error if act.Type != model.ActSkuFake { // 非结算,要计算实际活动价格 @@ -1510,6 +1514,8 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { db = dao.GetDB() pageSize = 9999 ) + globals.SugarLogger.Debug("ChangeJxPriceByDiscountAct begin:") + fmt.Println("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111") page, err := dao.QueryActs(db, 0, 0, pageSize, -1, "", model.VendorIDJX, []int{model.YES}, []int{model.ActSkuDiscount}, nil, 0, nil, 0, utils.ZeroTimeValue, utils.ZeroTimeValue, time.Now().AddDate(0, -3, 0), time.Now()) if err != nil { return @@ -1517,6 +1523,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { if len(page.Data) == 0 { return } + fmt.Println("122222222222222222222222222222222222222222222222222222222222222222222222222222", utils.Format4Output(page.Data, false)) for _, act := range page.Data { _, actStoreSkus, _ := dao.GetActStoreSkuVendorList(db, act.ID, nil, nil, nil, "", 0, pageSize) if len(actStoreSkus) == 0 { @@ -1538,6 +1545,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { if storeSku.Stock == 0 { continue } + fmt.Println("33333333333333333333333333333333333333333333333333333333333333", utils.Format4Output(actStoreSku, false)) actualStockOut, err = dao.GetOrderStoreSkusCount(db, actStoreSku.StoreID, actStoreSku.SkuID, time.Now().Add(-time.Minute*10), time.Now()) dao.Begin(db) defer func() {