Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
9 个修改的文件
包含
78 行增加
和
42 行删除
| @@ -34,7 +34,7 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera | @@ -34,7 +34,7 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera | ||
| 34 | } | 34 | } |
| 35 | data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId | 35 | data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId |
| 36 | data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId | 36 | data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId |
| 37 | - data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone | 37 | + data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.UserPhone |
| 38 | data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName | 38 | data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName |
| 39 | return &data | 39 | return &data |
| 40 | } | 40 | } |
| @@ -77,7 +77,7 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera | @@ -77,7 +77,7 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera | ||
| 77 | } | 77 | } |
| 78 | data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId | 78 | data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId |
| 79 | data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId | 79 | data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId |
| 80 | - data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone | 80 | + data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.UserPhone |
| 81 | data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName | 81 | data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName |
| 82 | return &data | 82 | return &data |
| 83 | } | 83 | } |
| @@ -70,7 +70,10 @@ func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProj | @@ -70,7 +70,10 @@ func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProj | ||
| 70 | data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode | 70 | data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode |
| 71 | data.CooperationProjectSponsor.UsersName = param.CooperationProjectSponsor.UserInfo.UsersName | 71 | data.CooperationProjectSponsor.UsersName = param.CooperationProjectSponsor.UserInfo.UsersName |
| 72 | data.CooperationProjectSponsor.UserId = param.CooperationProjectSponsor.UsersId | 72 | data.CooperationProjectSponsor.UserId = param.CooperationProjectSponsor.UsersId |
| 73 | - data.CooperationProjectSponsor.UserInfo = param.CooperationProjectSponsor.UserInfo | 73 | + data.CooperationProjectSponsor.UserInfo.Phone = param.CooperationProjectSponsor.UserInfo.UserPhone |
| 74 | + data.CooperationProjectSponsor.UserInfo.UsersId = param.CooperationProjectSponsor.UsersId | ||
| 75 | + data.CooperationProjectSponsor.UserInfo.UsersName = param.CooperationProjectSponsor.UserInfo.UsersName | ||
| 76 | + data.CooperationProjectSponsor.UserInfo.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode | ||
| 74 | return &data | 77 | return &data |
| 75 | } | 78 | } |
| 76 | 79 |
| @@ -88,7 +88,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec | @@ -88,7 +88,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec | ||
| 88 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 88 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 89 | } | 89 | } |
| 90 | var ( | 90 | var ( |
| 91 | - applications []dto.CooperationApplicationItem | 91 | + applications = []dto.CooperationApplicationItem{} |
| 92 | ) | 92 | ) |
| 93 | for i := range resultApplication.Grid.List { | 93 | for i := range resultApplication.Grid.List { |
| 94 | item := dto.ToCooperationApplicationItem(&resultApplication.Grid.List[i]) | 94 | item := dto.ToCooperationApplicationItem(&resultApplication.Grid.List[i]) |
| @@ -13,7 +13,9 @@ type NoticeSettingListQuery struct { | @@ -13,7 +13,9 @@ type NoticeSettingListQuery struct { | ||
| 13 | // 查询偏离量 | 13 | // 查询偏离量 |
| 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, | ||
| 27 | - PageSize: noticeSettingListQuery.PageSize, | ||
| 28 | - CompanyId: noticeSettingListQuery.Operator.CompanyId, | 49 | + PageIndex: noticeSettingListQuery.PageNumber, |
| 50 | + PageSize: noticeSettingListQuery.PageSize, | ||
| 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()) |
| @@ -65,9 +65,11 @@ type ( | @@ -65,9 +65,11 @@ type ( | ||
| 65 | //返回编排消息通知内容列表 | 65 | //返回编排消息通知内容列表 |
| 66 | type ( | 66 | type ( |
| 67 | ReqNoticeSettingSearch struct { | 67 | ReqNoticeSettingSearch struct { |
| 68 | - PageIndex int `json:"pageIndex"` | ||
| 69 | - PageSize int `json:"pageSize"` | ||
| 70 | - CompanyId int64 `json:"companyId"` | 68 | + PageIndex int `json:"pageIndex"` |
| 69 | + PageSize int `json:"pageSize"` | ||
| 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 | // 变量的代码标识 |
| @@ -37,24 +37,27 @@ type ( | @@ -37,24 +37,27 @@ type ( | ||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | DataSystemSettingSearch struct { | 39 | DataSystemSettingSearch struct { |
| 40 | - SystemSetting []struct { | ||
| 41 | - // 公司id | ||
| 42 | - CompanyId int64 `json:"companyId,string"` | ||
| 43 | - // 管控层级 | ||
| 44 | - ControlLevel string `json:"controlLevel"` | ||
| 45 | - // 描述 | ||
| 46 | - Description string `json:"description"` | ||
| 47 | - // 设置对应的编码 | ||
| 48 | - SettingCode string `json:"settingCode"` | ||
| 49 | - // 设置对应的名称 | ||
| 50 | - SettingName string `json:"settingName"` | ||
| 51 | - // 数据id | ||
| 52 | - SystemSettingId int64 `json:"systemSettingId,string"` | ||
| 53 | - // 设定的值 | ||
| 54 | - Value string `json:"value"` | ||
| 55 | - // 值类型 | ||
| 56 | - ValueType string `json:"valueType"` | ||
| 57 | - } | 40 | + Grid struct { |
| 41 | + Total int `json:"total"` | ||
| 42 | + List []struct { | ||
| 43 | + // 公司id | ||
| 44 | + CompanyId int64 `json:"companyId,string,"` | ||
| 45 | + // 管控层级 | ||
| 46 | + ControlLevel string `json:"controlLevel"` | ||
| 47 | + // 描述 | ||
| 48 | + Description string `json:"description"` | ||
| 49 | + // 设置对应的编码 | ||
| 50 | + SettingCode string `json:"settingCode"` | ||
| 51 | + // 设置对应的名称 | ||
| 52 | + SettingName string `json:"settingName"` | ||
| 53 | + // 数据id | ||
| 54 | + SystemSettingId int64 `json:"systemSettingId,string,"` | ||
| 55 | + // 设定的值 | ||
| 56 | + Value string `json:"value"` | ||
| 57 | + // 值类型 | ||
| 58 | + ValueType string `json:"valueType"` | ||
| 59 | + } `json:"list"` | ||
| 60 | + } `json:"grid"` | ||
| 58 | } | 61 | } |
| 59 | ) | 62 | ) |
| 60 | 63 |
| @@ -38,19 +38,19 @@ type CooperationProject struct { | @@ -38,19 +38,19 @@ type CooperationProject struct { | ||
| 38 | CooperationProjectPublisher struct { | 38 | CooperationProjectPublisher struct { |
| 39 | UsersId int `json:"userId,string"` | 39 | UsersId int `json:"userId,string"` |
| 40 | UserInfo struct { | 40 | UserInfo struct { |
| 41 | - UsersName string `json:"userName"` | ||
| 42 | - UsersCode string `json:"userCode"` | ||
| 43 | - Phone string `json:"phone"` | ||
| 44 | - UsersId int `json:"userId,string,"` | 41 | + UsersName string `json:"userName"` |
| 42 | + UsersCode string `json:"userCode"` | ||
| 43 | + UserPhone string `json:"userPhone"` | ||
| 44 | + UserAccount string `json:"userAccount"` | ||
| 45 | } `json:"userInfo"` | 45 | } `json:"userInfo"` |
| 46 | } `json:"cooperationProjectPublisher"` //项目发布人,即操作人 | 46 | } `json:"cooperationProjectPublisher"` //项目发布人,即操作人 |
| 47 | CooperationProjectSponsor struct { | 47 | CooperationProjectSponsor struct { |
| 48 | UsersId int `json:"userId,string"` | 48 | UsersId int `json:"userId,string"` |
| 49 | UserInfo struct { | 49 | UserInfo struct { |
| 50 | - UsersName string `json:"userName"` | ||
| 51 | - UsersCode string `json:"userCode"` | ||
| 52 | - Phone string `json:"phone"` | ||
| 53 | - UsersId int `json:"userId,string"` | 50 | + UsersName string `json:"userName"` |
| 51 | + UsersCode string `json:"userCode"` | ||
| 52 | + UserPhone string `json:"userPhone"` | ||
| 53 | + UserAccount string `json:"userAccount"` | ||
| 54 | } `json:"userInfo"` | 54 | } `json:"userInfo"` |
| 55 | } `json:"cooperationProjectSponsor"` //项目发起人 | 55 | } `json:"cooperationProjectSponsor"` //项目发起人 |
| 56 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` //共创合约承接对象,1员工,2共创用户,3公开 | 56 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` //共创合约承接对象,1员工,2共创用户,3公开 |
| @@ -31,7 +31,9 @@ func (controller *DictionaryController) UpdateDictionary() { | @@ -31,7 +31,9 @@ func (controller *DictionaryController) UpdateDictionary() { | ||
| 31 | if err != nil { | 31 | if err != nil { |
| 32 | log.Logger.Debug("json err:" + err.Error()) | 32 | log.Logger.Debug("json err:" + err.Error()) |
| 33 | } | 33 | } |
| 34 | + dictionaryId, _ := controller.GetInt64("::dictionaryId") | ||
| 34 | updateCommand.Operator = controller.GetOperator() | 35 | updateCommand.Operator = controller.GetOperator() |
| 36 | + updateCommand.DictionaryId = dictionaryId | ||
| 35 | data, err := dictionaryService.UpdateDictionay(updateCommand) | 37 | data, err := dictionaryService.UpdateDictionay(updateCommand) |
| 36 | controller.Response(data, err) | 38 | controller.Response(data, err) |
| 37 | } | 39 | } |
| @@ -51,10 +53,9 @@ func (controller *DictionaryController) RemoveDictionary() { | @@ -51,10 +53,9 @@ func (controller *DictionaryController) RemoveDictionary() { | ||
| 51 | func (controller *DictionaryController) GetDictionary() { | 53 | func (controller *DictionaryController) GetDictionary() { |
| 52 | dictionaryService := service.NewDictionayService(nil) | 54 | dictionaryService := service.NewDictionayService(nil) |
| 53 | getQuery := &query.GetDictionaryQuery{} | 55 | getQuery := &query.GetDictionaryQuery{} |
| 54 | - err := controller.Unmarshal(getQuery) | ||
| 55 | - if err != nil { | ||
| 56 | - log.Logger.Debug("json err:" + err.Error()) | ||
| 57 | - } | 56 | + |
| 57 | + dictionaryId, _ := controller.GetInt64("::dictionaryId") | ||
| 58 | + getQuery.DictionaryId = int(dictionaryId) | ||
| 58 | getQuery.Operator = controller.GetOperator() | 59 | getQuery.Operator = controller.GetOperator() |
| 59 | data, err := dictionaryService.GetDictionay(getQuery) | 60 | data, err := dictionaryService.GetDictionay(getQuery) |
| 60 | controller.Response(data, err) | 61 | controller.Response(data, err) |
-
请 注册 或 登录 后发表评论