mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 11:13:44 +08:00
发布v2.17.8版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -46,9 +46,13 @@ func Sorter(in ISorter) func(m *gdb.Model) *gdb.Model {
|
||||
|
||||
var sorter2 []*form.Sorter
|
||||
for k, sorter := range sorters {
|
||||
if gstr.HasPrefix(sorter.ColumnKey, as) {
|
||||
as2 := as
|
||||
if gstr.Contains(sorter.ColumnKey, `.`) {
|
||||
as2 += "."
|
||||
}
|
||||
if gstr.HasPrefix(sorter.ColumnKey, as2) {
|
||||
sorter2 = append(sorter2, &form.Sorter{
|
||||
ColumnKey: gstr.Replace(sorter.ColumnKey, as, ""),
|
||||
ColumnKey: gstr.Replace(sorter.ColumnKey, as2, ""),
|
||||
Order: sorter.Order,
|
||||
})
|
||||
removeIndex = append(removeIndex, k)
|
||||
|
||||
Reference in New Issue
Block a user