feat(log): 添加客户端错误日志采集功能
Build docker and publish / build (20.15.1) (push) Successful in 7m17s

新增 log_message 表用于存储客户端错误日志,包含平台、设备信息、错误详情等字段
添加客户端上报接口和管理端查询接口
实现日志去重、限流和安全防护机制
This commit is contained in:
2025-12-02 19:34:43 -08:00
parent d1a620f939
commit 61cdc0ce23
2 changed files with 153 additions and 1 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package order
import (
"context"
"encoding/json"
"math"
"time"
"github.com/perfect-panel/server/internal/model/log"
@@ -73,7 +74,7 @@ func (l *RenewalLogic) Renewal(req *types.RenewalOrderRequest) (resp *types.Rene
discount = getDiscount(dis, req.Quantity)
}
price := sub.UnitPrice * req.Quantity
amount := int64(float64(price) * discount)
amount := int64(math.Round(float64(price) * discount))
discountAmount := price - amount
var coupon int64 = 0
if req.Coupon != "" {