feat(topup): add admin-only audit info to top-up logs
Thread caller IP from webhook/admin controllers through model recharge functions and record a new RecordTopupLog entry with admin_info (server IP, caller IP, order payment method, callback payment method, system version). Frontend shows these fields in the expanded log row and the IP column for admins on top-up logs, while non-admins continue to see admin_info stripped by formatUserLogs.
This commit is contained in:
@@ -353,7 +353,7 @@ func handleCheckoutCompleted(c *gin.Context, event *CreemWebhookEvent) {
|
||||
log.Printf("警告:Creem回调中客户姓名为空 - 订单号: %s", referenceId)
|
||||
}
|
||||
|
||||
err := model.RechargeCreem(referenceId, customerEmail, customerName)
|
||||
err := model.RechargeCreem(referenceId, customerEmail, customerName, c.ClientIP())
|
||||
if err != nil {
|
||||
log.Printf("Creem充值处理失败: %s, 订单号: %s", err.Error(), referenceId)
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user