1
|
package service
|
1
|
package service
|
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
|
|
4
|
+ "github.com/linmadan/egglib-go/core/application"
|
|
|
5
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
|
|
|
6
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto"
|
4
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
|
|
9
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/blur"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/blur"
|
9
|
"strconv"
|
13
|
"strconv"
|
10
|
"strings"
|
14
|
"strings"
|
11
|
-
|
|
|
12
|
- "github.com/linmadan/egglib-go/core/application"
|
|
|
13
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
|
|
|
14
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto"
|
|
|
15
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
|
|
16
|
)
|
15
|
)
|
17
|
|
16
|
|
18
|
// CooperationProjectService 共创项目服务
|
17
|
// CooperationProjectService 共创项目服务
|
|
@@ -245,6 +244,7 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAtta |
|
@@ -245,6 +244,7 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAtta |
245
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
244
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
246
|
}
|
245
|
}
|
247
|
// 不是本人查看需要做模糊处理
|
246
|
// 不是本人查看需要做模糊处理
|
|
|
247
|
+ if response.Attachment != nil {
|
248
|
if response.UserBaseId != projectQuery.Operator.UserBaseId {
|
248
|
if response.UserBaseId != projectQuery.Operator.UserBaseId {
|
249
|
file, err := blur.FileBlur(response.Attachment.Url, true)
|
249
|
file, err := blur.FileBlur(response.Attachment.Url, true)
|
250
|
if err != nil { // || len(file)==0
|
250
|
if err != nil { // || len(file)==0
|
|
@@ -256,6 +256,8 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAtta |
|
@@ -256,6 +256,8 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAtta |
256
|
}
|
256
|
}
|
257
|
response.Attachment.Url = file
|
257
|
response.Attachment.Url = file
|
258
|
}
|
258
|
}
|
|
|
259
|
+ }
|
|
|
260
|
+
|
259
|
return map[string]interface{}{
|
261
|
return map[string]interface{}{
|
260
|
"attachment": response.Attachment,
|
262
|
"attachment": response.Attachment,
|
261
|
}, nil
|
263
|
}, nil
|