From 8b261adb8012a3bd66e3bfa3827a7d4bb0d4b41a Mon Sep 17 00:00:00 2001 From: xubo Date: Tue, 2 Mar 2021 16:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B7=AF=E7=94=B1=E5=99=A8?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/route/route.go | 1 + model/route.go | 1 + 2 files changed, 2 insertions(+) diff --git a/gen/route/route.go b/gen/route/route.go index 2e15f4e..1a36db2 100644 --- a/gen/route/route.go +++ b/gen/route/route.go @@ -47,6 +47,7 @@ func genJsonData(ctx *gen.Context) ([]byte, error) { rt.Rule = append(rt.Rule, &model.RouteRule{ MsgName: ctx.PackageName + "." + d.Name, SvcName: msgDir.To, + Router: msgDir.Mid, MsgID: msgID, }) } diff --git a/model/route.go b/model/route.go index ab1973c..cdc7578 100644 --- a/model/route.go +++ b/model/route.go @@ -6,6 +6,7 @@ type RouteRule struct { MsgID int SvcName string + Router string `json:",omitempty"` } // 路由表,包含多条路由规则