作者 yangfu

登录修改

... ... @@ -393,7 +393,9 @@ func (srv AuthService) GetUserOrg(userOrgCommand *command.UserOrgCommand) (inter
})
}
}
return res, nil
return map[string]interface{}{
"orgs": res,
}, nil
}
//OrgSwitch 组织切换
... ...
... ... @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 发起组织ID
OrgId int64 `json:"orgId,string," valid:"Required"`
OrgId int64 `json:"departmentId" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -99,9 +99,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
avatar string
)
if len(updateUserInfoCommand.Avatar) > 0 {
avatar = user.UserInfo.Avatar
} else {
avatar = updateUserInfoCommand.Avatar
} else {
avatar = user.UserInfo.Avatar
}
if len(updateUserInfoCommand.UserName) > 0 {
userName = updateUserInfoCommand.UserName
... ...
... ... @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 发起组织ID
OrgId int64 `json:"orgId,string," valid:"Required"`
OrgId int64 `json:"departmentId" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -13,7 +13,7 @@ type CooperationProjectInfo struct {
CompanyName string `json:"companyName"`
} `json:"company"` //项目归属企业
Org struct {
OrgId int `json:"orgId"`
OrgId int `json:"orgId,string"`
OrgName string `json:"orgName"`
} `json:"org"` //项目创建时的组织
CooperationMode struct {
... ... @@ -29,14 +29,14 @@ type CooperationProjectInfo struct {
CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"`
CreatedAt time.Time `json:"createdAt"`
CooperationProjectSponsor struct {
UsersId int `json:"usersId"`
UsersName string `json:"usersName"`
UsersCode string `json:"usersCode"`
UsersId int `json:"userId"`
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
UserInfo struct {
UsersName string `json:"usersName"`
UsersCode string `json:"usersCode"`
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
Phone string `json:"phone"`
UsersId int `json:"userId,string,"`
UsersId int `json:"userId,string"`
} `json:"userInfo"`
} `json:"cooperationProjectSponsor"` //项目发起人
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开
... ...
... ... @@ -15,7 +15,7 @@ type CooperationProject struct {
CompanyName string `json:"companyName"`
} `json:"company"` //项目归属企业
Org struct {
OrgId int `json:"orgId"`
OrgId int `json:"orgId,string"`
OrgName string `json:"orgName"`
} `json:"org"` //项目创建时的组织
CooperationMode struct {
... ... @@ -31,21 +31,21 @@ type CooperationProject struct {
CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"`
CreatedAt time.Time `json:"createdAt"`
CooperationProjectPublisher struct {
UsersId int `json:"usersId"`
UsersId int `json:"userId,string"`
UserInfo struct {
UsersName string `json:"usersName"`
UsersCode string `json:"usersCode"`
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
Phone string `json:"phone"`
UsersId int `json:"userId,string,"`
} `json:"userInfo"`
} `json:"cooperationProjectPublisher"` //项目发布人,即操作人
CooperationProjectSponsor struct {
UsersId int `json:"usersId"`
UsersId int `json:"userId,string"`
UserInfo struct {
UsersName string `json:"usersName"`
UsersCode string `json:"usersCode"`
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
Phone string `json:"phone"`
UsersId int `json:"userId,string,"`
UsersId int `json:"userId,string"`
} `json:"userInfo"`
} `json:"cooperationProjectSponsor"` //项目发起人
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开
... ... @@ -66,7 +66,7 @@ type (
PublisherUid int `json:"publisherUid,string"`
SponsorUid int `json:"sponsorUid,string"`
DepartmentId int `json:"departmentId,string"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
Attachment []ProjectAttachment `json:"attachment"`
}
... ...