From acb75f1e1f57b2054b87bab110051f12a7b8ff31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 12 Mar 2021 10:50:38 +0800 Subject: [PATCH] aa --- business/jxstore/report/report.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/business/jxstore/report/report.go b/business/jxstore/report/report.go index 21c501fab..f5e31daa6 100644 --- a/business/jxstore/report/report.go +++ b/business/jxstore/report/report.go @@ -415,16 +415,17 @@ func RefreshStoreManageState(ctx *jxcontext.Context) { VendorID: storeMap.VendorID, } dao.WrapAddIDCULEntity(storeManage, ctx.GetUserName()) + handler := partner.GetPurchasePlatformFromVendorID(vendorID) + store, err := handler.ReadStore(ctx, storeDetail.VendorOrgCode, storeDetail.VendorStoreID) if coverAreaFlag { - handler := partner.GetPurchasePlatformFromVendorID(vendorID) - if store, err := handler.ReadStore(ctx, storeDetail.VendorOrgCode, storeDetail.VendorStoreID); err == nil { - if vendorID == model.VendorIDJD && store.DeliveryRangeType != model.DeliveryRangeTypePolygon { - storeManage.CoverArea = math.Pi * utils.Str2Float64WithDefault(store.DeliveryRange, 0) * utils.Str2Float64WithDefault(store.DeliveryRange, 0) / float64(10000) - } else { - storeManage.CoverArea = CalculateCoverArea(strings.Split(store.DeliveryRange, ";"), vendorID) - } + if vendorID == model.VendorIDJD && store.DeliveryRangeType != model.DeliveryRangeTypePolygon { + storeManage.CoverArea = math.Pi * utils.Str2Float64WithDefault(store.DeliveryRange, 0) * utils.Str2Float64WithDefault(store.DeliveryRange, 0) / float64(10000) + } else { + storeManage.CoverArea = CalculateCoverArea(strings.Split(store.DeliveryRange, ";"), vendorID) } } + //营业状态 + storeManage.VendorStatus = store.Status //营业时长 optime := jxutils.JxOperationTime2TimeByDate(storeDetail.CloseTime1, time.Now()).Sub(jxutils.JxOperationTime2TimeByDate(storeDetail.OpenTime1, time.Now())).Hours() if storeDetail.CloseTime2 != 0 && storeDetail.OpenTime2 != 0 { @@ -441,7 +442,6 @@ func RefreshStoreManageState(ctx *jxcontext.Context) { } storeManage.SkuCount, storeManage.HighSkuCount = len(storeSkus), highSkuCount //活动丰富度 - handler := partner.GetPurchasePlatformFromVendorID(vendorID) ample, _ := handler.GetActAmple(ctx, storeDetail.VendorStoreID, storeDetail.VendorStoreID) storeManage.ActAmple = ample //订单