mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-08 02:10:24 +08:00
refactor: 新增base.Repo与base.App,重构repo与app层代码
This commit is contained in:
@@ -3,17 +3,13 @@ package persistence
|
||||
import (
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
"mayfly-go/internal/db/domain/repository"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/base"
|
||||
)
|
||||
|
||||
type dbSqlRepoImpl struct{}
|
||||
type dbSqlRepoImpl struct {
|
||||
base.RepoImpl[*entity.DbSql]
|
||||
}
|
||||
|
||||
func newDbSqlRepo() repository.DbSql {
|
||||
return new(dbSqlRepoImpl)
|
||||
}
|
||||
|
||||
// 分页获取数据库信息列表
|
||||
func (d *dbSqlRepoImpl) DeleteBy(condition *entity.DbSql) {
|
||||
biz.ErrIsNil(gormx.DeleteByCondition(condition), "删除sql失败")
|
||||
return &dbSqlRepoImpl{base.RepoImpl[*entity.DbSql]{M: new(entity.DbSql)}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user