From 53c4450d586cef0edeb314862cfe9862824d4c02 Mon Sep 17 00:00:00 2001 From: vipg Date: Mon, 17 Nov 2025 18:11:57 +0800 Subject: [PATCH] add --- backend/src/logic4currency/update.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/logic4currency/update.go b/backend/src/logic4currency/update.go index a414f87..6f9f4b9 100644 --- a/backend/src/logic4currency/update.go +++ b/backend/src/logic4currency/update.go @@ -12,9 +12,9 @@ import ( // UpdateRequest 更新请求参数结构 type UpdateRequest struct { - CountryID string `json:"currency_id" binding:"required"` // 国家ID,必填 - Name string `json:"name"` // 国家名称,可选 - Code string `json:"code"` // 国家代码,可选 + CountryID string `json:"currency_id" binding:"required"` // 货币ID,必填 + Name string `json:"name"` // 货币名称,可选 + Code string `json:"code"` // 货币代码,可选 } // UpdateResponse 更新响应结构 @@ -23,7 +23,7 @@ type UpdateResponse struct { Message string `json:"message"` // 提示信息 } -// UpdateHandler 处理国家信息更新逻辑 +// UpdateHandler 处理货币信息更新逻辑 func UpdateHandler(c *gin.Context) { startTime := time.Now() // 获取或生成请求ID @@ -34,7 +34,7 @@ func UpdateHandler(c *gin.Context) { } // 记录请求接收日志 - zap.L().Info("📥 收到国家更新请求", + zap.L().Info("📥 收到货币更新请求", zap.String("req_id", reqID), zap.String("path", c.Request.URL.Path), zap.String("method", c.Request.Method), @@ -170,7 +170,7 @@ func UpdateHandler(c *gin.Context) { // 记录请求处理耗时 duration := time.Since(startTime) - zap.L().Info("✅ 国家更新请求处理完成", + zap.L().Info("✅ 货币更新请求处理完成", zap.String("req_id", reqID), zap.String("currency_id", req.CountryID), zap.Duration("duration", duration),