|
@@ -163,11 +163,15 @@ func (svr *ClientVersionService) ListClientVersion(header *protocol.RequestHeade |
|
@@ -163,11 +163,15 @@ func (svr *ClientVersionService) ListClientVersion(header *protocol.RequestHeade |
163
|
if total, clientVersion, err = ClientVersionRepository.Find(common.ObjectToMap(request)); err != nil {
|
163
|
if total, clientVersion, err = ClientVersionRepository.Find(common.ObjectToMap(request)); err != nil {
|
164
|
return
|
164
|
return
|
165
|
}
|
165
|
}
|
166
|
- rsp = map[string]interface{}{
|
|
|
167
|
- "totalRow": total,
|
|
|
168
|
- "pageNumber": (request.Offset + request.Limit) / request.Limit,
|
|
|
169
|
- "lists": utils.LoadCustomField(clientVersion, "Id", "ProjectName", "Version", "Title", "Remark", "CreateTime"),
|
166
|
+ rspData := map[string]interface{}{
|
|
|
167
|
+ "totalRow": total,
|
|
|
168
|
+ "lists": utils.LoadCustomField(clientVersion, "Id", "ProjectName", "Version", "Title", "Remark", "ClientPackageInfo", "CreateTime"),
|
170
|
}
|
169
|
}
|
|
|
170
|
+ if request.Limit > 0 {
|
|
|
171
|
+ rspData["pageNumber"] = (request.Offset + request.Limit) / request.Limit
|
|
|
172
|
+ }
|
|
|
173
|
+ rsp = rspData
|
|
|
174
|
+
|
171
|
err = transactionContext.CommitTransaction()
|
175
|
err = transactionContext.CommitTransaction()
|
172
|
return
|
176
|
return
|
173
|
}
|
177
|
}
|