Skip to content

Commit 73db98a

Browse files
committed
[bug]修复牛牛排行的显示错误
1 parent 290ddf3 commit 73db98a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

niu/main.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,18 @@ func GetRankingInfo(gid int64, t bool) (BaseInfos, error) {
108108
)
109109
niuOfGroup, err := db.getAllNiuNiuOfGroup(gid)
110110
if err != nil {
111+
return BaseInfos{}, err
112+
}
113+
114+
list = niuOfGroup.filter(t)
115+
if len(list) == 0 {
111116
if t {
112117
return nil, ErrNoBoys
113118
}
114119
return nil, ErrNoGirls
115120
}
116-
list = niuOfGroup.filter(t)
121+
list.sort(t)
122+
117123
f := make(BaseInfos, len(list))
118124
for i, info := range list {
119125
f[i] = BaseInfo{

0 commit comments

Comments
 (0)