瀏覽代碼

修改参数

yjp 1 年之前
父節點
當前提交
c9c59e8418
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      project/server/application/service/class.go
  2. 2 1
      project/server_ds/application/service/class.go

+ 2 - 1
project/server/application/service/class.go

@@ -6,6 +6,7 @@ import (
 	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/framework/binding"
 	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
 	"git.sxidc.com/go-framework/baize/framework/core/application"
 	"git.sxidc.com/go-framework/baize/framework/core/domain"
 	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
@@ -39,7 +40,7 @@ func (svc *ClassService) v1(appInstance *application.App) {
 		QueryQueryParams:   &class.GetClassesQueryParams{},
 		GetByIDQueryParams: &class.GetClassByIDQueryParams{},
 	}, entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
-		After: func(c *api.Context, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+		After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
 			go func() {
 				classEntity, err := domain.ToConcrete[*class.Entity](e)
 				if err != nil {

+ 2 - 1
project/server_ds/application/service/class.go

@@ -6,6 +6,7 @@ import (
 	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/framework/binding"
 	"git.sxidc.com/go-framework/baize/framework/core/api"
+	"git.sxidc.com/go-framework/baize/framework/core/api/request"
 	"git.sxidc.com/go-framework/baize/framework/core/application"
 	"git.sxidc.com/go-framework/baize/framework/core/domain"
 	"git.sxidc.com/go-framework/baize/framework/core/domain/entity"
@@ -39,7 +40,7 @@ func (svc *ClassService) v1(appInstance *application.App) {
 		QueryQueryParams:   &class.GetClassesQueryParams{},
 		GetByIDQueryParams: &class.GetClassByIDQueryParams{},
 	}, entity_crud.WithCreateCallbacks(&entity_crud.CreateCallbacks{
-		After: func(c *api.Context, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
+		After: func(c *api.Context, params request.Params, e entity.Entity, prepared map[string]any, i *infrastructure.Infrastructure, tx database.Executor) error {
 			go func() {
 				classEntity, err := domain.ToConcrete[*class.Entity](e)
 				if err != nil {