正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
@@ -58,13 +58,17 @@ func newWhere(conditions []*types.Condition) *bytelib.TableQueryWhere { | @@ -58,13 +58,17 @@ func newWhere(conditions []*types.Condition) *bytelib.TableQueryWhere { | ||
58 | //if order == "" { | 58 | //if order == "" { |
59 | // order = "ASC" | 59 | // order = "ASC" |
60 | //} | 60 | //} |
61 | + order := "" | ||
62 | + if c.Order != "" { | ||
63 | + order = c.FieldName + " " + order | ||
64 | + } | ||
61 | where.Conditions = append(where.Conditions, &bytelib.TableQueryCondition{ | 65 | where.Conditions = append(where.Conditions, &bytelib.TableQueryCondition{ |
62 | Field: &bytelib.Field{ | 66 | Field: &bytelib.Field{ |
63 | Name: c.FieldName, | 67 | Name: c.FieldName, |
64 | }, | 68 | }, |
65 | - Like: c.Like, | ||
66 | - In: c.In, | ||
67 | - //Order: order, | 69 | + Like: c.Like, |
70 | + In: c.In, | ||
71 | + Order: order, | ||
68 | }) | 72 | }) |
69 | } | 73 | } |
70 | return where | 74 | return where |
-
请 注册 或 登录 后发表评论