From 356e1a18e8a8ee700f27a39c0c06f52337a98208 Mon Sep 17 00:00:00 2001 From: zouchangfu Date: Sun, 22 Jan 2023 09:29:30 +0800 Subject: [PATCH] fix: fix common_dao remove bug --- gplus/common_dao.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gplus/common_dao.go b/gplus/common_dao.go index acfd35a..26521b7 100644 --- a/gplus/common_dao.go +++ b/gplus/common_dao.go @@ -23,7 +23,7 @@ import ( type CommonDao[T any] struct{} -func NewCommonDao[T any](pk string) *CommonDao[T] { +func NewCommonDao[T any]() *CommonDao[T] { return &CommonDao[T]{} } @@ -47,7 +47,7 @@ func (service CommonDao[T]) RemoveById(id any) *gorm.DB { return DeleteById[T](id) } -func (service CommonDao[T]) RemoveByIds(ids []any) *gorm.DB { +func (service CommonDao[T]) RemoveByIds(ids any) *gorm.DB { return DeleteByIds[T](ids) } @@ -79,7 +79,7 @@ func (service CommonDao[T]) List(q *Query[T]) ([]*T, *gorm.DB) { return SelectList[T](q) } -func (service CommonDao[T]) ListByIds(ids []any) ([]*T, *gorm.DB) { +func (service CommonDao[T]) ListByIds(ids any) ([]*T, *gorm.DB) { return SelectByIds[T](ids) }