zwxi 1 year ago
parent
commit
418dd6cb6d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/company/company_user.go

+ 1 - 1
models/company/company_user.go

@@ -141,7 +141,7 @@ func GetCompanyUserListV2(condition string, pars []interface{}, companyId, start
 		sql += condition
 	}
 	//sql += ` group by a.user_id ORDER BY a.is_register desc,a.report_last_view_time desc,a.last_updated_time DESC LIMIT ?,? `
-	sql += ` group by a.user_id ORDER BY CASE WHEN is_follow = 1 AND report_last_view_time < NOW()  - INTERVAL 7 DAY THEN 0 ELSE 1 END,a.is_register desc,a.report_last_view_time ,a.last_updated_time   LIMIT ?,? `
+	sql += ` group by a.user_id ORDER BY CASE WHEN is_follow = 1 AND report_last_view_time < NOW()  - INTERVAL 7 DAY THEN 0 ELSE 1 END,a.is_register desc,a.report_last_view_time ASC,a.last_updated_time  ASC LIMIT ?,? `
 	_, err = o.Raw(sql, companyId, pars, startSize, pageSize).QueryRows(&items)
 	return
 }