优化订单通知显示

This commit is contained in:
hahwu 2026-02-28 18:43:12 +08:00
parent b3689ca93d
commit ed57b527a3

View File

@ -64,11 +64,11 @@ func SendFeishuOrder(PlayerId int, OrderId string, Price float64, ProductName st
payload := map[string]interface{}{ payload := map[string]interface{}{
"UID": PlayerId, "UID": PlayerId,
"OrderId": OrderId, "OrderId": OrderId,
"Product": String(Price), "Product": fmt.Sprintf("%.2f", Price),
"ProductName": ProductName, "ProductName": ProductName,
"EventRecovery": time.Unix(PayTime, 0).Format("2006-01-02 15:04:05"), "EventRecovery": time.Unix(PayTime, 0).Format("2006-01-02 15:04:05"),
"EventAge": time.Unix(VerityTime, 0).Format("2006-01-02 15:04:05"), "EventAge": time.Unix(VerityTime, 0).Format("2006-01-02 15:04:05"),
"TotalCharge": String(Charge), "TotalCharge": fmt.Sprintf("%.2f", Charge),
} }
payloadBytes, err := json.Marshal(payload) payloadBytes, err := json.Marshal(payload)