feat(backend): 出入库编码搜索双路匹配+建单填快照;finance 趋势/日期区间;partner/product 拼音搜索

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
wangjia
2026-07-02 22:27:13 +08:00
parent af56055eef
commit 9099c4af99
21 changed files with 610 additions and 39 deletions
@@ -87,10 +87,20 @@ func setupProtectedRouter(db *gorm.DB) *gin.Engine {
// 库存路由
inv := api.Group("/inventory")
inv.GET("", inventoryH.List)
inv.GET("/summary", inventoryH.Summary)
inv.GET("/logs", inventoryH.Logs)
inv.POST("/checks", inventoryH.CreateCheck)
inv.GET("/checks/:id", inventoryH.GetCheck)
// 财务路由
financeH := NewFinanceHandler(db)
finance := api.Group("/finance")
finance.GET("/records", financeH.ListRecords)
finance.POST("/records", financeH.Create)
finance.PUT("/records/:id/close", financeH.Close)
finance.GET("/summary", financeH.Summary)
finance.GET("/trend", financeH.Trend)
// 许可证路由
license := api.Group("/license")
license.POST("/activate", licenseH.Activate)