aa
This commit is contained in:
@@ -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
|
||||
//订单
|
||||
|
||||
Reference in New Issue
Block a user