From 8bedb4681f6f2460564d03981b77e9e4a1985d42 Mon Sep 17 00:00:00 2001 From: vipg Date: Mon, 17 Nov 2025 16:14:59 +0800 Subject: [PATCH] add --- backend/src/main.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/src/main.go b/backend/src/main.go index 790f24a..e73053e 100644 --- a/backend/src/main.go +++ b/backend/src/main.go @@ -4,6 +4,7 @@ import ( "asset_assistant/db" // 数据库相关操作包 "asset_assistant/logger" // 日志工具包 "asset_assistant/logic4country" + "asset_assistant/logic4currency" "asset_assistant/logic4exchange" "asset_assistant/logic4user" @@ -72,7 +73,7 @@ func main() { } zap.L().Info("✅ 国家接口注册完成") - // 注册国家接口 + // 注册交易所接口 exchange := r.Group("/exchange") { exchange.POST("/create", logic4exchange.CreateHandler) @@ -80,7 +81,17 @@ func main() { exchange.POST("/update", logic4exchange.UpdateHandler) exchange.POST("/delete", logic4exchange.DeleteHandler) } - zap.L().Info("✅ 国家接口注册完成") + zap.L().Info("✅ 交易所接口注册完成") + + // 注册货币接口 + currency := r.Group("/currency") + { + currency.POST("/create", logic4currency.CreateHandler) + currency.POST("/read", logic4currency.ReadHandler) + currency.POST("/update", logic4currency.UpdateHandler) + currency.POST("/delete", logic4currency.DeleteHandler) + } + zap.L().Info("✅ 货币接口注册完成") // 记录服务启动日志,监听80端口 zap.L().Info("✅ 服务启动在80端口")