|
@@ -8,6 +8,7 @@ import ( |
|
@@ -8,6 +8,7 @@ import ( |
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/dto"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/dto"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic"
|
|
|
11
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
11
|
)
|
12
|
)
|
12
|
|
13
|
|
13
|
// 推送消息配置
|
14
|
// 推送消息配置
|
|
@@ -22,10 +23,34 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin |
|
@@ -22,10 +23,34 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin |
22
|
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
|
23
|
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
|
23
|
noticeSettingListQuery.Operator,
|
24
|
noticeSettingListQuery.Operator,
|
24
|
)
|
25
|
)
|
|
|
26
|
+ creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
|
|
27
|
+ noticeSettingListQuery.Operator,
|
|
|
28
|
+ )
|
|
|
29
|
+ orgResult, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{
|
|
|
30
|
+ Offset: 1,
|
|
|
31
|
+ Limit: 20,
|
|
|
32
|
+ CompanyId: int(noticeSettingListQuery.Operator.CompanyId),
|
|
|
33
|
+ IsOrg: 1,
|
|
|
34
|
+ DepName: noticeSettingListQuery.OrgName,
|
|
|
35
|
+ })
|
|
|
36
|
+ if err != nil {
|
|
|
37
|
+ if err != nil {
|
|
|
38
|
+ return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
39
|
+ }
|
|
|
40
|
+ }
|
|
|
41
|
+ if len(orgResult.Orgs) == 0 {
|
|
|
42
|
+ return 0, []dto.NoticeSettingItem{}, nil
|
|
|
43
|
+ }
|
|
|
44
|
+ var orgIds []int
|
|
|
45
|
+ for _, v := range orgResult.Orgs {
|
|
|
46
|
+ orgIds = append(orgIds, v.OrgID)
|
|
|
47
|
+ }
|
25
|
result, err := creationBasicGateway.NoticeSettingSearch(allied_creation_basic.ReqNoticeSettingSearch{
|
48
|
result, err := creationBasicGateway.NoticeSettingSearch(allied_creation_basic.ReqNoticeSettingSearch{
|
26
|
- PageIndex: noticeSettingListQuery.PageNumber,
|
|
|
27
|
- PageSize: noticeSettingListQuery.PageSize,
|
|
|
28
|
- CompanyId: noticeSettingListQuery.Operator.CompanyId,
|
49
|
+ PageIndex: noticeSettingListQuery.PageNumber,
|
|
|
50
|
+ PageSize: noticeSettingListQuery.PageSize,
|
|
|
51
|
+ CompanyId: noticeSettingListQuery.Operator.CompanyId,
|
|
|
52
|
+ OrgIds: orgIds,
|
|
|
53
|
+ ModuleActionName: noticeSettingListQuery.ModuleAction,
|
29
|
})
|
54
|
})
|
30
|
if err != nil {
|
55
|
if err != nil {
|
31
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
56
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|