|
@@ -140,7 +140,7 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
|
@@ -140,7 +140,7 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
140
|
lists []*models.RankRange
|
140
|
lists []*models.RankRange
|
141
|
)
|
141
|
)
|
142
|
rsp = &protocol.GetRankRangeResponse{
|
142
|
rsp = &protocol.GetRankRangeResponse{
|
143
|
- List: make([]protocol.NameItem, 0),
|
143
|
+ List: make([]protocol.RankRange, 0),
|
144
|
}
|
144
|
}
|
145
|
if lists, err = models.GetRankRanges(int(header.CompanyId), request.RankTypeId); err != nil {
|
145
|
if lists, err = models.GetRankRanges(int(header.CompanyId), request.RankTypeId); err != nil {
|
146
|
if err == orm.ErrNoRows {
|
146
|
if err == orm.ErrNoRows {
|
|
@@ -151,7 +151,16 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
|
@@ -151,7 +151,16 @@ func GetRankRange(header *protocol.RequestHeader, request *protocol.GetRankRange |
151
|
return
|
151
|
return
|
152
|
}
|
152
|
}
|
153
|
for i := range lists {
|
153
|
for i := range lists {
|
154
|
- rsp.List = append(rsp.List, protocol.NameItem{Id: lists[i].Id, Name: lists[i].Name})
|
154
|
+ item := protocol.RankRange{
|
|
|
155
|
+ Id: lists[i].Id,
|
|
|
156
|
+ Name: lists[i].Name,
|
|
|
157
|
+ }
|
|
|
158
|
+ if lists[i].Type == protocol.RankRangeTypeAllCompanyDepartment || lists[i].Type == protocol.RankRangeTypeAllCompanyDepartment {
|
|
|
159
|
+ item.Type = protocol.RankRangeTypeDepartment
|
|
|
160
|
+ } else {
|
|
|
161
|
+ item.Type = protocol.RankRangeTypeUser
|
|
|
162
|
+ }
|
|
|
163
|
+ rsp.List = append(rsp.List, item)
|
155
|
}
|
164
|
}
|
156
|
return
|
165
|
return
|
157
|
}
|
166
|
}
|