From dc4da12e73290dac1a981c304a8d8696a507c18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 18 May 2020 10:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=88=B7=E6=96=B0=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E7=BB=93=E7=AE=97=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 3 +++ business/jxstore/tempop/tempop.go | 39 +++++++++++++-------------- business/model/dao/act.go | 4 +-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 379fe52eb..6848b520c 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -423,6 +423,9 @@ func updateSingleOrderEarningPrice(order *model.GoodsOrder, db *dao.DaoDB) { } } if len(skuIDMap) > 0 { + if order.VendorOrderID == "5000356075877900459" { + fmt.Println("testupdateSingleOrderEarningPrice", order.VendorOrderID) + } actStoreSkuList, err := dao.GetEffectiveActStoreSkuInfo(db, 0, []int{order.VendorID}, model.ActTypeAll, []int{jxStoreID}, jxutils.IntMap2List(skuIDMap), order.OrderCreatedAt, order.OrderCreatedAt) if err != nil { globals.SugarLogger.Errorf("updateOrderSkuOtherInfo can not get sku promotion info for error:%v", err) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index a9aec6206..bd170cf6f 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1498,26 +1498,25 @@ func addSku(outSkuId string, cagtegoryId int, shopCategories []int64, brandId in } func UploadJdsImage(ctx *jxcontext.Context) (err error) { - fmt.Println("test11111111111111111", partner.GetMultiStoreVendorIDs()) - // db := dao.GetDB() - // result1, _ := api.JdShopAPI.GetProvince() - // for _, v := range result1 { - // place1, _ := dao.GetPlaceByName(db, v.AreaName, 1, 0) - // place1.JdsCode = v.AreaID - // dao.UpdateEntity(db, place1, "JdsCode") - // result2, _ := api.JdShopAPI.GetCity(v.AreaID) - // for _, vv := range result2 { - // place2, _ := dao.GetPlaceByName(db, vv.AreaName, 2, 0) - // place2.JdsCode = vv.AreaID - // dao.UpdateEntity(db, place2, "JdsCode") - // result3, _ := api.JdShopAPI.GetCounty(vv.AreaID) - // for _, vvv := range result3 { - // place3, _ := dao.GetPlaceByName(db, vvv.AreaName, 3, 0) - // place3.JdsCode = vvv.AreaID - // dao.UpdateEntity(db, place3, "JdsCode") - // } - // } - // } + db := dao.GetDB() + result1, _ := api.JdShopAPI.GetProvince() + for _, v := range result1 { + place1, _ := dao.GetPlaceByName(db, v.AreaName, 1, 0) + place1.JdsCode = v.AreaID + dao.UpdateEntity(db, place1, "JdsCode") + result2, _ := api.JdShopAPI.GetCity(v.AreaID) + for _, vv := range result2 { + place2, _ := dao.GetPlaceByName(db, vv.AreaName, 2, 0) + place2.JdsCode = vv.AreaID + dao.UpdateEntity(db, place2, "JdsCode") + result3, _ := api.JdShopAPI.GetCounty(vv.AreaID) + for _, vvv := range result3 { + place3, _ := dao.GetPlaceByName(db, vvv.AreaName, 3, 0) + place3.JdsCode = vvv.AreaID + dao.UpdateEntity(db, place3, "JdsCode") + } + } + } // var ( // skuNames []*model.SkuName // db = dao.GetDB() diff --git a/business/model/dao/act.go b/business/model/dao/act.go index ff5049cf4..313e6eae2 100644 --- a/business/model/dao/act.go +++ b/business/model/dao/act.go @@ -413,8 +413,8 @@ func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, actType if globals.IsStoreSkuAct { sql += " AND t1.is_special = 0" } - // globals.SugarLogger.Debug(sql) - // globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false)) + fmt.Println(sql) + fmt.Println(sqlParams) err = GetRows(db, &actStoreSkuList, sql, sqlParams...) return actStoreSkuList, err }