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