[fix]代码生成器

This commit is contained in:
panda
2024-06-06 20:21:09 +08:00
parent 1e2663281b
commit 14c5b453b6
11 changed files with 28 additions and 318 deletions

View File

@@ -7,11 +7,11 @@ package api
import (
"pandax/kit/model"
"pandax/kit/restfulx"
"strings"
"pandax/apps/{{.PackageName}}/entity"
"pandax/apps/{{.PackageName}}/services"
"pandax/kit/biz"
"pandax/kit/utils"
)
type {{.ClassName}}Api struct {
@@ -61,7 +61,7 @@ func (p *{{.ClassName}}Api) Insert{{.ClassName}}(rc *restfulx.ReqCtx) {
var data entity.{{.ClassName}}
restfulx.BindQuery(rc, &data)
err := p.{{.ClassName}}App.Insert(data)
_,err := p.{{.ClassName}}App.Insert(data)
biz.ErrIsNil(err, "添加{{.TableComment}}失败")
}
@@ -84,4 +84,4 @@ func (p *{{.ClassName}}Api) Delete{{.ClassName}}(rc *restfulx.ReqCtx) {
{{.PkJsonField}}s := utils.IdsStrToIdsIntGroup({{.PkJsonField}})
{{- end }}
biz.ErrIsNil(p.{{.ClassName}}App.Delete({{.PkJsonField}}s), "删除{{.TableComment}}失败")
}
}