mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-04 05:36:35 +08:00
feat: 数据查询完善-支持直接选择列输入值过滤数据
This commit is contained in:
@@ -179,7 +179,7 @@ func GetPageBySql(sql string, param *PageParam, toModel interface{}, args ...int
|
||||
return &PageResult{Total: 0, List: []string{}}
|
||||
}
|
||||
// 分页查询
|
||||
limitSql := sql + " LIMIT " + strconv.Itoa(param.PageNum-1) + ", " + strconv.Itoa(param.PageSize)
|
||||
limitSql := sql + " LIMIT " + strconv.Itoa((param.PageNum-1)*param.PageSize) + ", " + strconv.Itoa(param.PageSize)
|
||||
err = db.Raw(limitSql).Scan(toModel).Error
|
||||
biz.ErrIsNil(err, "查询失败: %s")
|
||||
return &PageResult{Total: int64(count), List: toModel}
|
||||
|
||||
Reference in New Issue
Block a user