feat: 新增数据库sql执行记录&执行前原值等信息

This commit is contained in:
meilin.huang
2022-06-16 15:55:18 +08:00
parent f58331c1c1
commit 9b9173dea7
81 changed files with 559 additions and 1467 deletions

View File

@@ -0,0 +1,25 @@
package persistence
import (
"mayfly-go/internal/devops/domain/entity"
"mayfly-go/internal/devops/domain/repository"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/model"
)
type dbSqlExecRepo struct{}
var DbSqlExecDao repository.DbSqlExec = &dbSqlExecRepo{}
func (d *dbSqlExecRepo) Insert(dse *entity.DbSqlExec) {
model.Insert(dse)
}
func (d *dbSqlExecRepo) DeleteBy(condition *entity.DbSqlExec) {
biz.ErrIsNil(model.DeleteByCondition(condition), "删除sql执行记录失败")
}
// 分页获取
func (d *dbSqlExecRepo) GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
return model.GetPage(pageParam, condition, toEntity, orderBy...)
}