作者 庄敏学

获取数据排序

... ... @@ -58,13 +58,17 @@ func newWhere(conditions []*types.Condition) *bytelib.TableQueryWhere {
//if order == "" {
// order = "ASC"
//}
order := ""
if c.Order != "" {
order = c.FieldName + " " + order
}
where.Conditions = append(where.Conditions, &bytelib.TableQueryCondition{
Field: &bytelib.Field{
Name: c.FieldName,
},
Like: c.Like,
In: c.In,
//Order: order,
Like: c.Like,
In: c.In,
Order: order,
})
}
return where
... ...