fixed: plugin template api.go.template and package template api.go.tpl

This commit is contained in:
SliverHorn
2024-07-26 14:45:10 +08:00
parent 055198ccd5
commit 432b2f04d7
2 changed files with 14 additions and 9 deletions
@@ -80,7 +80,8 @@ func (a *{{.Abbreviation}}) Delete{{.StructName}}ByIds(c *gin.Context) {
{{- if .AutoCreateResource }}
userID := utils.GetUserID(c)
{{- end }}
if err := service{{ .StructName }}.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }}); err != nil {
err := service{{ .StructName }}.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }})
if err != nil {
global.GVA_LOG.Error("批量删除失败!", zap.Error(err))
response.FailWithMessage("批量删除失败", c)
return