Commit c577ef4d authored by chenweijian's avatar chenweijian

排序

parent c8953357
......@@ -49,7 +49,7 @@ func (this *GroupPower) Get(model *domain.Model) (*GroupPower, error) {
func (gpu *GroupPowerUser) GetBy(model *domain.Model, pageSize, pageIndex int) ([]*GroupPowerUser, int64, int, bool, error) {
rows := make([]*GroupPowerUser, 0)
db := model.Db.Model(GroupPowerUser{}).Where(gpu).Order("field(`role`, 2, 3, 1)")
db := model.Db.Model(GroupPowerUser{}).Where(gpu).Order("field(`role`, 2, 3, 1),`id`")
var count int64
err := db.Count(&count).Error
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment