mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-06 06:35:47 +08:00
fix: 数据库数据表高度自适应&格式化sql后无法修改
This commit is contained in:
@@ -187,10 +187,10 @@ func GetPageBySql(sql string, param *PageParam, toModel interface{}, args ...int
|
||||
|
||||
func GetListBySql(sql string, params ...interface{}) []map[string]interface{} {
|
||||
var maps []map[string]interface{}
|
||||
global.Db.Raw(sql, params).Scan(&maps)
|
||||
global.Db.Raw(sql, params...).Scan(&maps)
|
||||
return maps
|
||||
}
|
||||
|
||||
func GetListBySql2Model(sql string, toEntity interface{}, params ...interface{}) error {
|
||||
return global.Db.Raw(sql, params).Find(toEntity).Error
|
||||
return global.Db.Raw(sql, params...).Find(toEntity).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user