opt: 优化模板逻辑

This commit is contained in:
pixelMax(奇淼
2024-07-26 10:04:56 +08:00
parent b10c7297fd
commit 397e1e2bf1
2 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api){{.FuncName}}(c *gin.Context) {
if err := {{.Abbreviation}}Service.{{.FuncName}}(); err != nil {
global.GVA_LOG.Error("失败!", zap.Error(err))
response.FailWithMessage("失败", c)
} else {
response.OkWithData("返回数据",c)
return
}
response.OkWithData("返回数据",c)
}
{{end}}