|
|
@@ -2,6 +2,8 @@ package service
|
|
|
|
|
|
import (
|
|
|
"baize-demo/project/server/application/domain/student"
|
|
|
+ "fmt"
|
|
|
+ "git.sxidc.com/go-framework/baize/convenient/domain/query_rule"
|
|
|
"git.sxidc.com/go-framework/baize/convenient/domain/query_rule/rule"
|
|
|
"git.sxidc.com/go-framework/baize/convenient/entity_crud"
|
|
|
"git.sxidc.com/go-framework/baize/framework/binding"
|
|
|
@@ -125,4 +127,15 @@ func (svc *StudentService) v1(appInstance *application.App) {
|
|
|
}, nil
|
|
|
},
|
|
|
})
|
|
|
+
|
|
|
+ query_rule.AddUseQueryRuleQueryRoute[student.Info](v1Binder, &query_rule.AddUseQueryRuleQueryRouteParams{
|
|
|
+ DBSchema: dbSchema,
|
|
|
+ DomainPath: "/student",
|
|
|
+ Object: &student.Entity{},
|
|
|
+ QueryMiddlewares: []binding.Middleware{
|
|
|
+ func(c *api.Context, i *infrastructure.Infrastructure) {
|
|
|
+ fmt.Println("In Advanced Query")
|
|
|
+ },
|
|
|
+ },
|
|
|
+ })
|
|
|
}
|