refactor: sqlexec组件重构优化、新增数据库相关系统参数配置、相关问题修复

This commit is contained in:
meilin.huang
2023-02-13 21:11:16 +08:00
parent 77aa724003
commit 70b586e45a
35 changed files with 2486 additions and 2120 deletions

View File

@@ -145,7 +145,7 @@ func Insert(model interface{}) error {
//
// @param list为数组类型 如 var users *[]User可指定为非model结构体即只包含需要返回的字段结构体
func ListBy(model interface{}, list interface{}, cols ...string) {
global.Db.Model(model).Select(cols).Where(model).Find(list)
global.Db.Model(model).Select(cols).Where(model).Order("id desc").Find(list)
}
// 获取满足model中不为空的字段值条件的所有数据.