Merge branch 'master' of github.com:synebula-myths/gaea

This commit is contained in:
2020-06-03 14:49:05 +08:00
4 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ data class Params(var page: Int = 1, var size: Int = 10) {
/**
* 排序条件。
*/
var orderBy: MutableMap<String, OrderType> = hashMapOf()
var orders: MutableMap<String, OrderType> = hashMapOf()
/**
* 查询条件。
@@ -38,7 +38,7 @@ data class Params(var page: Int = 1, var size: Int = 10) {
* 添加排序条件
*/
fun addOrderBy(field: String, type: OrderType = OrderType.ASC): Params {
orderBy[field] = type
orders[field] = type
return this
}
}