更新logic response等使用方法

This commit is contained in:
eson
2023-06-07 11:57:04 +08:00
parent 12fd21df01
commit 50106e3c12
9 changed files with 31 additions and 41 deletions

View File

@@ -19,8 +19,7 @@ func New{{.logic}}(ctx context.Context, svcCtx *svc.ServiceContext) *{{.logic}}
}
func (l *{{.logic}}) {{.function}}({{.request}}) (resp *types.Response) {
// response, Code码, . (eg): resp.Set(501, "error")
resp = &types.Response{}
// Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
{{.returnString}} resp
}