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"` } // 路由表,包含多条路由规则