...
|
...
|
@@ -8,6 +8,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/dto"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
|
|
|
)
|
|
|
|
|
|
// 推送消息配置
|
...
|
...
|
@@ -22,10 +23,34 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin |
|
|
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
|
|
|
noticeSettingListQuery.Operator,
|
|
|
)
|
|
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
|
|
noticeSettingListQuery.Operator,
|
|
|
)
|
|
|
orgResult, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{
|
|
|
Offset: 1,
|
|
|
Limit: 20,
|
|
|
CompanyId: int(noticeSettingListQuery.Operator.CompanyId),
|
|
|
IsOrg: 1,
|
|
|
DepName: noticeSettingListQuery.OrgName,
|
|
|
})
|
|
|
if err != nil {
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
if len(orgResult.Orgs) == 0 {
|
|
|
return 0, []dto.NoticeSettingItem{}, nil
|
|
|
}
|
|
|
var orgIds []int
|
|
|
for _, v := range orgResult.Orgs {
|
|
|
orgIds = append(orgIds, v.OrgID)
|
|
|
}
|
|
|
result, err := creationBasicGateway.NoticeSettingSearch(allied_creation_basic.ReqNoticeSettingSearch{
|
|
|
PageIndex: noticeSettingListQuery.PageNumber,
|
|
|
PageSize: noticeSettingListQuery.PageSize,
|
|
|
CompanyId: noticeSettingListQuery.Operator.CompanyId,
|
|
|
PageIndex: noticeSettingListQuery.PageNumber,
|
|
|
PageSize: noticeSettingListQuery.PageSize,
|
|
|
CompanyId: noticeSettingListQuery.Operator.CompanyId,
|
|
|
OrgIds: orgIds,
|
|
|
ModuleActionName: noticeSettingListQuery.ModuleAction,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
...
|
...
|
|