作者 tangxuhui

数据结构更新

@@ -14,6 +14,8 @@ type NoticeSettingListQuery struct { @@ -14,6 +14,8 @@ type NoticeSettingListQuery struct {
14 PageNumber int `json:"pageNumber"` 14 PageNumber int `json:"pageNumber"`
15 // 查询限制 15 // 查询限制
16 PageSize int `json:"pageSize" valid:"Required"` 16 PageSize int `json:"pageSize" valid:"Required"`
  17 + ModuleAction string `json:"moduleAction"`
  18 + OrgName string `json:"orgName"`
17 } 19 }
18 20
19 func (noticeSettingListCommand *NoticeSettingListQuery) Valid(validation *validation.Validation) { 21 func (noticeSettingListCommand *NoticeSettingListQuery) Valid(validation *validation.Validation) {
@@ -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, 49 PageIndex: noticeSettingListQuery.PageNumber,
27 PageSize: noticeSettingListQuery.PageSize, 50 PageSize: noticeSettingListQuery.PageSize,
28 CompanyId: noticeSettingListQuery.Operator.CompanyId, 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())
@@ -68,6 +68,8 @@ type ( @@ -68,6 +68,8 @@ type (
68 PageIndex int `json:"pageIndex"` 68 PageIndex int `json:"pageIndex"`
69 PageSize int `json:"pageSize"` 69 PageSize int `json:"pageSize"`
70 CompanyId int64 `json:"companyId"` 70 CompanyId int64 `json:"companyId"`
  71 + OrgIds []int `json:"orgIds"`
  72 + ModuleActionName string `json:"moduleActionName"` //消息环节名称
71 } 73 }
72 74
73 DataNoticeSettingSearch struct { 75 DataNoticeSettingSearch struct {
@@ -96,7 +98,7 @@ type ( @@ -96,7 +98,7 @@ type (
96 ModuleActionList []struct { 98 ModuleActionList []struct {
97 ModuleCode string `json:"moduleCode"` 99 ModuleCode string `json:"moduleCode"`
98 ActionCode string `json:"actionCode"` 100 ActionCode string `json:"actionCode"`
99 - Name string `json:"name"` 101 + ActionName string `json:"actionName"`
100 } `json:"moduleActionList"` 102 } `json:"moduleActionList"`
101 ParamList []struct { 103 ParamList []struct {
102 // 变量的代码标识 104 // 变量的代码标识