作者 yangfu

部门统计排序修改

@@ -103,7 +103,7 @@ func (this *DepartmentStatisticsResponse) Less(i, j int) bool { @@ -103,7 +103,7 @@ func (this *DepartmentStatisticsResponse) Less(i, j int) bool {
103 return true 103 return true
104 } 104 }
105 if this.List[i].ACTotal == this.List[j].ACTotal && this.List[i].ChanceApprovedTotal == this.List[j].ChanceApprovedTotal && this.List[i].AchievementTotal == this.List[j].AchievementTotal { 105 if this.List[i].ACTotal == this.List[j].ACTotal && this.List[i].ChanceApprovedTotal == this.List[j].ChanceApprovedTotal && this.List[i].AchievementTotal == this.List[j].AchievementTotal {
106 - if this.List[i].Dep.Id > this.List[j].Dep.Id { 106 + if this.List[i].Dep.Time > this.List[j].Dep.Time {
107 return true 107 return true
108 } 108 }
109 } 109 }
@@ -1539,7 +1539,7 @@ func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequ @@ -1539,7 +1539,7 @@ func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequ
1539 log.Error(err) 1539 log.Error(err)
1540 return 1540 return
1541 } 1541 }
1542 - rsp = &protocol.ChancePoolResponse{Total: total} 1542 + rsp = &protocol.ChancePoolResponse{Total: total, List: make([]protocol.CommonListItem, 0)}
1543 for i := 0; i < len(myChances); i++ { 1543 for i := 0; i < len(myChances); i++ {
1544 chance := myChances[i] 1544 chance := myChances[i]
1545 if provider, err = agg.GetUserBaseInfo(chance.Uid, header.CompanyId); err != nil { 1545 if provider, err = agg.GetUserBaseInfo(chance.Uid, header.CompanyId); err != nil {