This commit is contained in:
苏尹岚
2021-03-11 10:02:32 +08:00
parent 7469a2d11f
commit 132d2780f2
2 changed files with 2 additions and 1 deletions

View File

@@ -556,7 +556,7 @@ func CalculateCoverArea(coordinate []string, vendorID int) (area float64) {
xys := jxutils.MillierConvertion(lat, lng)
xyList = append(xyList, xys)
}
var sum float64
var sum float64 = 0
for i := 0; i < len(xyList)-1; i++ {
// sum += (xyList[i+1][0] - xyList[i][0]) * (xyList[i+1][1] + xyList[i][1])
sum += (xyList[i][0]*xyList[i+1][1] - xyList[i+1][0]*xyList[i][1])

View File

@@ -234,6 +234,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
if retVal.DeliveryRange == "" {
if list, err := api.EbaiAPI.ShopDeliveryinfoGet("", utils.Str2Int64(vendorStoreID)); err == nil {
retVal.DeliveryRange = EbaiDeliveryRegion2Jx2(list[0])
fmt.Println("retVal.DeliveryRange,", retVal.DeliveryRange)
}
}
return retVal, nil