diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index f9a8b43ed..4339f379c 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -705,8 +705,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID } saleInfoMap[index] = saleInfo } + //成都菜市 if beego.BConfig.RunMode == "prod" { - if v.EarningType == model.EarningTypeQuote { + if v.EarningType == model.EarningTypeQuote && v.VendorID != model.VendorIDJD && v.CityCode != 510100 { saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count) } } else { @@ -722,7 +723,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID if k == 0 { saleInfo.EarningPrice = v.NewEarningPrice if beego.BConfig.RunMode == "prod" { - if v.EarningType == model.EarningTypePoints { + if v.EarningType == model.EarningTypePoints && v.VendorID != model.VendorIDJD && v.CityCode != 510100 { saleInfo.RealEarningPrice += v.NewEarningPrice } } else { @@ -735,7 +736,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID flagVendorOrderID = v.VendorOrderID saleInfo.EarningPrice += v.NewEarningPrice if beego.BConfig.RunMode == "prod" { - if v.EarningType == model.EarningTypePoints { + if v.EarningType == model.EarningTypePoints && v.VendorID != model.VendorIDJD && v.CityCode != 510100 { saleInfo.RealEarningPrice += v.NewEarningPrice } } else { diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 062d1e523..ac7a3db70 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1710,362 +1710,65 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { // cms.UpdateStoreSkus(ctx, 0, storeDetail.ID, skuBindInfos, true, true) // } var ( - db = dao.GetDB() - storeIDs = []int{ - 667510, - 667501, - 667493, - 667490, - 667485, - 667480, - 667479, - 667463, - 667459, - 667446, - 667445, - 667441, - 667439, - 667431, - 667429, - 667423, - 667421, - 667414, - 667413, - 667412, - 667410, - 667407, - 667401, - 667399, - 667398, - 667394, - 667385, - 667383, - 667377, - 667375, - 667365, - 667363, - 667357, - 667351, - 667349, - 667341, - 667331, - 667329, - 667317, - 667312, - 667308, - 667304, - 667302, - 667296, - 667293, - 667292, - 667284, - 667283, - 667266, - 667234, - 667231, - 667229, - 667214, - 667208, - 667198, - 667182, - 667179, - 667176, - 667158, - 667152, - 667133, - 667128, - 667125, - 667122, - 667116, - 667110, - 667101, - 667094, - 667093, - 667091, - 667067, - 667066, - 667057, - 667047, - 667044, - 667011, - 666987, - 666972, - 666963, - 666942, - 666932, - 666919, - 666918, - 666915, - 666891, - 666888, - 666879, - 666864, - 666839, - 666820, - 666800, - 666793, - 666790, - 666786, - 666767, - 666755, - 666751, - 666746, - 666678, - 666677, - 103459, - 103435, - 103433, - 103408, - 103205, - 103197, - 103194, - 103193, - 103191, - 103189, - 103182, - 103151, - 103119, - 103111, - 103090, - 103089, - 103088, - 103085, - 103084, - 103074, - 103069, - 103062, - 103055, - 103050, - 103037, - 103036, - 103035, - 103033, - 103031, - 103029, - 103027, - 103022, - 103015, - 103009, - 103006, - 103004, - 103002, - 102999, - 102997, - 102996, - 102995, - 102994, - 102992, - 102987, - 102981, - 102980, - 102978, - 102973, - 102969, - 102966, - 102963, - 102962, - 102960, - 102958, - 102956, - 102955, - 102952, - 102945, - 102935, - 102934, - 102933, - 102929, - 102926, - 102924, - 102923, - 102921, - 102920, - 102911, - 102908, - 102907, - 102902, - 102898, - 102896, - 102895, - 102894, - 102893, - 102891, - 102890, - 102888, - 102877, - 102876, - 102875, - 102865, - 102859, - 102858, - 102857, - 102851, - 102844, - 102836, - 102826, - 102824, - 102823, - 102819, - 102818, - 102812, - 102807, - 102795, - 102794, - 102790, - 102789, - 102788, - 102785, - 102784, - 102778, - 102776, - 102767, - 102756, - 102752, - 102751, - 102744, - 102742, - 102736, - 102731, - 102718, - 102713, - 102705, - 102691, - 102686, - 102676, - 102671, - 102630, - 102624, - 102596, - 102594, - 102561, - 102533, - 102530, - 102498, - 102490, - 102488, - 102482, - 102481, - 102479, - 102475, - 102433, - 102426, - 102425, - 102383, - 102379, - 102374, - 102373, - 102371, - 102364, - 102358, - 102357, - 102353, - 102304, - 102303, - 102300, - 102293, - 102280, - 102206, - 102167, - 102147, - 102126, - 102101, - 102075, - 102074, - 102068, - 102063, - 102046, - 102016, - 102014, - 101997, - 101983, - 101979, - 101956, - 101948, - 101909, - 101897, - 101763, - 101750, - 101736, - 101666, - 101176, - 101134, - 101111, - 101110, - 101099, - 101078, - 101062, - 101039, - 101036, - 101013, - 101012, - 101000, - 100988, - 100987, - 100946, - 100937, - 100920, - 100905, - 100887, - 100867, - 100849, - 100829, - 100802, - 100766, - 100720, - 100712, - 100699, - 100681, - 100670, - 100664, - 100658, - 100600, - 100548, - 100477, - 100471, - 100470, - 100463, - 100455, - 100454, - 100449, - 100444, - 100409, - 100396, - 100366, - 100361, - 100324, - 100309, - 100299, - 100292, - 100274, - 100236, - 100215, - 100206, - 100190, - 100175, - 100167, - 100157, - 100135, - 100123, - 100121, - 100115, - 100068, - 100065, - 100056, - 100032, - 100022, - 100002, - } - payload = make(map[string]interface{}) + // jdStoreIDs = []string{ + // "11734848", + // "11734850", + // "11734854", + // "11734862", + // "11734868", + // "11734873", + // "11734874", + // "11734886", + // "11748353", + // "11890095", + // "11800399", + // "11738114", + // "11857499", + // "11873440", + // "11883071", + // "11734852", + // "11886763", + // "11874614", + // "11734884", + // "11926674", + // "11929173", + // "11894144", + // "11734861", + // "11951611", + // "11800403", + // "11913597", + // "11980746", + // "11981675", + // "12011812", + // "12007545", + // "11734846", + // "12005417", + // "12005640", + // "12005682", + // "12006134", + // "11982352", + // "12007250", + // "12007560", + // "11982427", + // "12008087", + // "12035806", + // "12008160", + // "12008395", + // "12009345", + // "11940019", + // "12010237", + // "12010654", + // "12011111", + // "12006857", + // "11734851", + // "12030632", + // "12050456", + // } + jdStoreIDxipu = "11890095" ) - payload["pricePercentagePack"] = "美团菜市双11(69-25)" - task := tasksch.NewParallelTask("美团双11刷新", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, - func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { - v := batchItemList[0].(int) - cms.UpdateStoreVendorMap(ctx, db, v, model.VendorIDMTWM, payload, ctx.GetUserName()) - cms.CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, []int{model.VendorIDMTWM}, []int{v}, nil, false, true, true) - return retVal, err - }, storeIDs) - tasksch.HandleTask(task, nil, true).Run() - task.GetID() + handler := partner.GetPurchasePlatformFromVendorID(model.VendorIDJD).(partner.IPurchasePlatformStoreSkuHandler) + outStoreSkuList, err := handler.GetStoreSkusBareInfo(ctx, "320406", nil, 0, jdStoreIDxipu, nil) + fmt.Println(utils.Format4Output(outStoreSkuList, false)) return err } diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 36b6a3e10..81e83b85b 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -49,6 +49,7 @@ type OrderSkuWithActualPayPrice struct { OrderPayPercentage int `json:"orderPayPercentage"` NewEarningPrice int64 `json:"newEarningPrice"` EarningType int `json:"earningType"` + CityCode int `json:"cityCode"` } type tGoodsAndOrder struct { @@ -377,7 +378,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt sql := ` SELECT t1.*, IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.new_earning_price, - t3.pay_percentage, t2.earning_type, t2.order_pay_percentage + t3.pay_percentage, t2.earning_type, t2.order_pay_percentage, t3.city_code FROM order_sku t1 JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id LEFT JOIN store t3 ON t3.id = IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id)