refactor: 新增base.Repo与base.App,重构repo与app层代码

This commit is contained in:
meilin.huang
2023-10-26 17:15:49 +08:00
parent 10f6b03fb5
commit a1303b52eb
115 changed files with 1867 additions and 1696 deletions

View File

@@ -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)}}
}