作者 yangfu

分页修改

... ... @@ -120,7 +120,7 @@ func (srv CooperationProjectService) SearchCooperationProjectContracts(projectQu
result, err := creationCooperationGateway.CooperationStatistics(
allied_creation_cooperation.CompanyCooperationProjectContracts,
map[string]interface{}{
"offset": projectQuery.PageSize * (projectQuery.PageNumber - 1),
"offset": projectQuery.PageSize * projectQuery.PageNumber,
"limit": projectQuery.PageSize,
"projectId": projectQuery.CooperationProjectId,
},
... ... @@ -248,6 +248,10 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAtta
// 不是本人查看需要做模糊处理
if response.Attachment != nil && len(response.Attachment.Url) > 0 {
if response.UserBaseId != projectQuery.Operator.UserBaseId {
// 大文件报错
if response.Attachment.FileSize != 0 && response.Attachment.FileSize > 10*1024*1024 {
return nil, application.ThrowError(application.BUSINESS_ERROR, "文件过大,不可查看")
}
file, err := blur.FileBlur(response.Attachment.Url, true)
if err != nil { // || len(file)==0
log.Logger.Error(err.Error())
... ...