This commit is contained in:
邹宗楠
2025-10-23 15:45:38 +08:00
parent 2a7cf7e364
commit ab98ad1cd0
2 changed files with 2 additions and 33 deletions

View File

@@ -405,34 +405,3 @@ func TestCreateCouponAct(t *testing.T) {
}
}
func TestCcc(t *testing.T) {
sLng := 104.037176
sLat := 30.686648
uLng := 103.997132
uLat := 30.666474
lng := utils.Str2Float64(fmt.Sprintf("%0.6f", (sLng-uLng)/float64(300)))
lat := utils.Str2Float64(fmt.Sprintf("%0.6f", (sLat-uLat)/float64(300)))
originalData := make([]string, 0, 0)
originalData = append(originalData, fmt.Sprintf("%.6f,%.6f", sLng, sLat))
var nLng float64
var nLat float64
for i := 1; i <= 300; i++ {
if sLng > uLng {
nLng = sLng - (lng * float64(i))
} else {
nLng = sLng + (lng * float64(i))
}
if sLat > uLat {
nLat = sLat - (lat * float64(i))
} else {
nLat = sLat + (lat * float64(i))
}
fakeCourier := fmt.Sprintf("%.6f,%.6f", nLng, nLat)
originalData = append(originalData, fakeCourier)
}
originalData = append(originalData, fmt.Sprintf("%.6f,%.6f", uLng, uLat))
fmt.Println(originalData[301])
fmt.Println(originalData[302])
}

View File

@@ -7,13 +7,13 @@ import (
)
type InvoiceCallback struct {
Timestamp int64 `json:"timestamp"` // 时间戳
Timestamp string `json:"timestamp"` // 时间戳
AppId string `json:"app_id"` // 美团分配给APP方的id
Sig string `json:"sig"` // 输入参数计算后的签名结果
MtRequestId string `json:"mt_request_id"` // 平台请求id由平台自动生成并保证唯一性不参与业务逻辑在接口响应时返回给商家系统
OrderId string `json:"order_id"` // 订单ID
InvoiceTaskId string `json:"invoice_task_id"` // 开票任务id
PushType int `json:"push_type"` // 消息类型1-开发票3-催发票
PushType string `json:"push_type"` // 消息类型1-开发票3-催发票
InvoiceTitle string `json:"invoice_title"` // 发票的抬头。
TaxpayerId string `json:"taxpayer_id"` // 纳税人识别号
NeedInvoiceByCategory int `json:"need_invoice_by_category"` // 1-需要按大类开票2-需要商品明细开