refactor: interface{} -> any

feat: 新增外链菜单
This commit is contained in:
meilin.huang
2023-06-01 12:31:32 +08:00
parent 9900b236ef
commit 17d96acceb
106 changed files with 316 additions and 312 deletions

View File

@@ -26,7 +26,7 @@ type DbSqlExecReq struct {
type DbSqlExecRes struct {
ColNames []string
Res []map[string]interface{}
Res []map[string]any
}
// 合并执行结果主要用于执行多条sql使用
@@ -52,7 +52,7 @@ type DbSqlExec interface {
DeleteBy(condition *entity.DbSqlExec)
// 分页获取
GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult
GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult
}
func newDbSqlExecApp(dbExecSqlRepo repository.DbSqlExec) DbSqlExec {
@@ -151,7 +151,7 @@ func (d *dbSqlExecAppImpl) DeleteBy(condition *entity.DbSqlExec) {
d.dbSqlExecRepo.DeleteBy(condition)
}
func (d *dbSqlExecAppImpl) GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
func (d *dbSqlExecAppImpl) GetPageList(condition *entity.DbSqlExec, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult {
return d.dbSqlExecRepo.GetPageList(condition, pageParam, toEntity, orderBy...)
}
@@ -256,8 +256,8 @@ func doExec(sql string, dbInstance *DbInstance) (*DbSqlExecRes, error) {
if err != nil {
execRes = err.Error()
}
res := make([]map[string]interface{}, 0)
resData := make(map[string]interface{})
res := make([]map[string]any, 0)
resData := make(map[string]any)
resData["rowsAffected"] = rowsAffected
resData["sql"] = sql
resData["result"] = execRes