作者 tangxuhui

数据结构更新

... ... @@ -13,7 +13,9 @@ type NoticeSettingListQuery struct {
// 查询偏离量
PageNumber int `json:"pageNumber"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
PageSize int `json:"pageSize" valid:"Required"`
ModuleAction string `json:"moduleAction"`
OrgName string `json:"orgName"`
}
func (noticeSettingListCommand *NoticeSettingListQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -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())
... ...
... ... @@ -65,9 +65,11 @@ type (
//返回编排消息通知内容列表
type (
ReqNoticeSettingSearch struct {
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
CompanyId int64 `json:"companyId"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
CompanyId int64 `json:"companyId"`
OrgIds []int `json:"orgIds"`
ModuleActionName string `json:"moduleActionName"` //消息环节名称
}
DataNoticeSettingSearch struct {
... ... @@ -96,7 +98,7 @@ type (
ModuleActionList []struct {
ModuleCode string `json:"moduleCode"`
ActionCode string `json:"actionCode"`
Name string `json:"name"`
ActionName string `json:"actionName"`
} `json:"moduleActionList"`
ParamList []struct {
// 变量的代码标识
... ...