修改tpl的参数传入问题

This commit is contained in:
eson
2023-07-21 11:24:26 +08:00
parent bfa1872595
commit 44a3666d68
9 changed files with 15 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ func {{.HandlerName}}(svcCtx *svc.ServiceContext) http.HandlerFunc {
{{if .HasResp}}resp{{end}} := l.{{.Call}}({{if .HasRequest}}&req, {{end}}userinfo)
if !basic.AfterLogic(w, r, resp, rl) {
if !basic.AfterLogic(w, r, rl) {
basic.NormalAfterLogic(w, r, resp)
}
}

View File

@@ -26,7 +26,7 @@ func New{{.logic}}(ctx context.Context, svcCtx *svc.ServiceContext) *{{.logic}}
// }
// 处理逻辑后 w,r 如:重定向
// func (l *{{.logic}}) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
// func (l *{{.logic}}) AfterLogic(w http.ResponseWriter, r *http.Request) {
// }
func (l *{{.logic}}) {{.function}}({{.request}}, userinfo *auth.UserInfo) (resp *basic.Response) {