refactor: 后端路由定义方式&请求参数绑定重构

This commit is contained in:
meilin.huang
2023-07-08 20:05:55 +08:00
parent 183a6e4905
commit 3269dfa5d6
59 changed files with 559 additions and 1020 deletions

View File

@@ -12,12 +12,7 @@ type DbSqlExec struct {
}
func (d *DbSqlExec) DbSqlExecs(rc *req.Ctx) {
g := rc.GinCtx
m := &entity.DbSqlExec{DbId: uint64(ginx.QueryInt(g, "dbId", 0)),
Db: g.Query("db"),
Table: g.Query("table"),
Type: int8(ginx.QueryInt(g, "type", 0)),
}
m.CreatorId = rc.LoginAccount.Id
rc.ResData = d.DbSqlExecApp.GetPageList(m, ginx.GetPageParam(rc.GinCtx), new([]entity.DbSqlExec))
queryCond, page := ginx.BindQueryAndPage(rc.GinCtx, new(entity.DbSqlExecQuery))
queryCond.CreatorId = rc.LoginAccount.Id
rc.ResData = d.DbSqlExecApp.GetPageList(queryCond, page, new([]entity.DbSqlExec))
}