作者 yangfu

client version fix

... ... @@ -10,9 +10,9 @@ type CreateClientVersionRequest struct {
// 提交人
//Commiter int64 `json:"commiter,omitempty"`
// 项目名称
ProjectName string `json:"projectName,omitempty"`
ProjectName string `json:"projectName,omitempty" valid:"Required"`
// 版本号
Version string `json:"version,omitempty"`
Version string `json:"version,omitempty" valid:"Required"`
// 标题
Title string `json:"title,omitempty"`
// 其他备注信息
... ...
... ... @@ -163,11 +163,15 @@ func (svr *ClientVersionService) ListClientVersion(header *protocol.RequestHeade
if total, clientVersion, err = ClientVersionRepository.Find(common.ObjectToMap(request)); err != nil {
return
}
rsp = map[string]interface{}{
"totalRow": total,
"pageNumber": (request.Offset + request.Limit) / request.Limit,
"lists": utils.LoadCustomField(clientVersion, "Id", "ProjectName", "Version", "Title", "Remark", "CreateTime"),
rspData := map[string]interface{}{
"totalRow": total,
"lists": utils.LoadCustomField(clientVersion, "Id", "ProjectName", "Version", "Title", "Remark", "ClientPackageInfo", "CreateTime"),
}
if request.Limit > 0 {
rspData["pageNumber"] = (request.Offset + request.Limit) / request.Limit
}
rsp = rspData
err = transactionContext.CommitTransaction()
return
}
... ...