refactor: base.repo与base.app精简优化

This commit is contained in:
meilin.huang
2024-04-29 12:29:56 +08:00
parent f2c7ef78c0
commit a5cd7caf19
14 changed files with 108 additions and 105 deletions

View File

@@ -4,7 +4,6 @@ import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/pkg/base"
"mayfly-go/pkg/gormx"
)
type resourceRepoImpl struct {
@@ -26,7 +25,7 @@ func (r *resourceRepoImpl) GetChildren(uiPath string) []entity.Resource {
func (r *resourceRepoImpl) UpdateByUiPathLike(resource *entity.Resource) error {
sql := "UPDATE t_sys_resource SET status=? WHERE (ui_path LIKE ?)"
return gormx.ExecSql(sql, resource.Status, resource.UiPath+"%")
return r.ExecBySql(sql, resource.Status, resource.UiPath+"%")
}
func (r *resourceRepoImpl) GetAccountResources(accountId uint64, toEntity any) error {