修复模板
This commit is contained in:
@@ -2,6 +2,7 @@ package {{.PkgName}}
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"reflect"
|
||||
|
||||
"fusenapi/utils/basic"
|
||||
|
||||
@@ -19,8 +20,12 @@ func {{.HandlerName}}(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
// 创建一个业务逻辑层实例
|
||||
{{end}}l := {{.LogicName}}.New{{.LogicType}}(r.Context(), svcCtx)
|
||||
|
||||
rl := reflect.ValueOf(l)
|
||||
basic.BeforeLogic(w, r, rl)
|
||||
|
||||
{{if .HasResp}}resp{{end}} := l.{{.Call}}({{if .HasRequest}}&req, {{end}}userinfo)
|
||||
|
||||
basic.AfterLogic(w, r, resp)
|
||||
basic.AfterLogic(w, r, resp, rl)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user