作者 tangxuhui

数据结构调整

... ... @@ -9,4 +9,5 @@ type NoticeSettingItem struct {
ModuleActionName string `json:"moduleActionName"`
NoticeSettingID int `json:"noticeSettingId,string"`
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
}
... ...
... ... @@ -57,7 +57,9 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
dataList := []dto.NoticeSettingItem{}
for _, v := range result.List {
item := dto.NoticeSettingItem{
CompanyID: v.CompanyID,
Content: v.Content,
... ... @@ -68,8 +70,15 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
OrgID: v.OrgID,
ModuleActionName: v.ModuleActionName,
}
orgData, _ := creationUserGateway.OrgGet(allied_creation_user.ReqOrgGet{
OrgId: v.OrgID,
})
if orgData != nil {
item.OrgName = orgData.OrgName
}
dataList = append(dataList, item)
}
return result.Count, dataList, nil
}
... ...