...
|
...
|
@@ -140,7 +140,7 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
|
|
lists []*models.RankRange
|
|
|
)
|
|
|
rsp = &protocol.GetRankRangeResponse{
|
|
|
List: make([]protocol.NameItem, 0),
|
|
|
List: make([]protocol.RankRange, 0),
|
|
|
}
|
|
|
if lists, err = models.GetRankRanges(int(header.CompanyId), request.RankTypeId); err != nil {
|
|
|
if err == orm.ErrNoRows {
|
...
|
...
|
@@ -151,7 +151,16 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
|
|
return
|
|
|
}
|
|
|
for i := range lists {
|
|
|
rsp.List = append(rsp.List, protocol.NameItem{Id: lists[i].Id, Name: lists[i].Name})
|
|
|
item := protocol.RankRange{
|
|
|
Id: lists[i].Id,
|
|
|
Name: lists[i].Name,
|
|
|
}
|
|
|
if lists[i].Type == protocol.RankRangeTypeAllCompanyDepartment || lists[i].Type == protocol.RankRangeTypeAllCompanyDepartment {
|
|
|
item.Type = protocol.RankRangeTypeDepartment
|
|
|
} else {
|
|
|
item.Type = protocol.RankRangeTypeUser
|
|
|
}
|
|
|
rsp.List = append(rsp.List, item)
|
|
|
}
|
|
|
return
|
|
|
}
|
...
|
...
|
|