...
|
...
|
@@ -24,25 +24,28 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin |
|
|
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 {
|
|
|
var orgIds []int
|
|
|
if len(noticeSettingListQuery.OrgName) > 0 {
|
|
|
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 {
|
|
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
if len(orgResult.Orgs) == 0 {
|
|
|
return 0, []dto.NoticeSettingItem{}, nil
|
|
|
}
|
|
|
for _, v := range orgResult.Orgs {
|
|
|
orgIds = append(orgIds, v.OrgID)
|
|
|
}
|
|
|
}
|
|
|
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,
|
...
|
...
|
|