This commit is contained in:
laodaming
2023-06-12 17:29:32 +08:00
2 changed files with 3 additions and 1 deletions

View File

@@ -50,7 +50,7 @@ func {{.HandlerName}}(svcCtx *svc.ServiceContext) http.HandlerFunc {
}
//
{{end}}l := {{.LogicName}}.New{{.LogicType}}(r.Context(), svcCtx)
{{if .HasResp}}resp{{end}} := l.{{.Call}}({{if .HasRequest}}&req, userinfo{{end}})
{{if .HasResp}}resp{{end}} := l.{{.Call}}({{if .HasRequest}}&req, {{end}}userinfo)
// nil使httpx.OkJsonCtx方法返回JSON响应;
// 500JSON响应并记录错误消息logx.Error
if resp != nil {

View File

@@ -6,7 +6,9 @@ info (
author: ""
email: ""
)
type request {
}
// response 统一返回码
type response {
Code int `json:"code"`