fix
This commit is contained in:
parent
cc8409028e
commit
964b9a42a9
|
@ -78,7 +78,7 @@ func (m *merchantModel) Search(id int64, name string, startTime string, endTime
|
|||
sql += " and created_at >= ? and created_at <= ?"
|
||||
args = append(args, startTime, endTime)
|
||||
}
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at").Desc().Limit(limit, page).Find(&merchant)
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at desc").Limit(limit, page).Find(&merchant)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ func (m *ordersModel) Search(
|
|||
sql += " and created_at >= ? and created_at <= ?"
|
||||
args = append(args, startTime, endTime)
|
||||
}
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at").Desc().Limit(limit, page).Find(&orders)
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at desc").Limit(limit, page).Find(&orders)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package product
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -80,7 +81,8 @@ func (m *productModel) Search(id int64, name string, startTime string, endTime s
|
|||
sql += " and created_at >= ? and created_at <= ?"
|
||||
args = append(args, startTime, endTime)
|
||||
}
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at").Desc().Limit(limit, page).Find(&product)
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at desc").Limit(limit, page).Find(&product)
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ func (m *whitelistModel) Search(id int64, merchant_id int64, ip string, startTim
|
|||
sql += " and created_at >= ? and created_at <= ?"
|
||||
args = append(args, startTime, endTime)
|
||||
}
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at").Desc().Limit(limit, page).Find(&whitelist)
|
||||
err = m.GetDb().Where(sql, args...).OrderBy("created_at desc").Limit(limit, page).Find(&whitelist)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue