mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-25 03:48:35 +08:00
[fix]代码生成器
This commit is contained in:
@@ -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}}失败")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user