This commit is contained in:
vipg
2025-11-14 18:12:11 +08:00
parent 647e72829b
commit 396afbdb37
2 changed files with 3 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ func CreateVarietyHandler(c *gin.Context) {
var req CreateVarietyRequest
// 绑定并验证请求参数包含新增的tick和tick_price
if err := c.ShouldBindJSON(&req); err != nil {
zap.L().Warn("⚠️ 请求参数验证失败",
zap.L().Warn("🔴 请求参数验证失败",
zap.String("req_id", reqID),
zap.Error(err),
zap.Any("request_body", c.Request.Body),

View File

@@ -17,10 +17,10 @@ func main() {
// 初始化日志配置
logger.Init()
// 记录服务初始化日志
zap.L().Info("🚀 用户服务初始化")
zap.L().Info("🟢 用户服务初始化")
// 记录数据库初始化开始日志
zap.L().Info("⌛️ 数据库初始化开始")
zap.L().Info("🟢 数据库初始化开始")
// 初始化数据库连接
db.Init()
// 程序退出时关闭数据库连接defer确保在函数退出前执行