소스 검색

修改参数

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 {