You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if err := {{.Abbreviation}}Service.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }}); err != nil {
81
+
err := {{.Abbreviation}}Service.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }})
Copy file name to clipboardExpand all lines: server/resource/plugin/server/api/api.go.template
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,8 @@ func (a *{{.Abbreviation}}) Delete{{.StructName}}ByIds(c *gin.Context) {
80
80
{{- if .AutoCreateResource }}
81
81
userID := utils.GetUserID(c)
82
82
{{- end }}
83
-
if err := service{{ .StructName }}.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }}); err != nil {
83
+
err := service{{ .StructName }}.Delete{{.StructName}}ByIds({{.PrimaryField.FieldJson}}s{{- if .AutoCreateResource }},userID{{- end }})
84
+
if err != nil {
84
85
global.GVA_LOG.Error("批量删除失败!", zap.Error(err))
85
86
response.FailWithMessage("批量删除失败", c)
86
87
return
@@ -105,7 +106,7 @@ func (a *{{.Abbreviation}}) Update{{.StructName}}(c *gin.Context) {
0 commit comments