作者 yangfu

登录修改

@@ -393,7 +393,9 @@ func (srv AuthService) GetUserOrg(userOrgCommand *command.UserOrgCommand) (inter @@ -393,7 +393,9 @@ func (srv AuthService) GetUserOrg(userOrgCommand *command.UserOrgCommand) (inter
393 }) 393 })
394 } 394 }
395 } 395 }
396 - return res, nil 396 + return map[string]interface{}{
  397 + "orgs": res,
  398 + }, nil
397 } 399 }
398 400
399 //OrgSwitch 组织切换 401 //OrgSwitch 组织切换
@@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct { @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
13 // 模式编码,唯一确定 13 // 模式编码,唯一确定
14 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` 14 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
15 // 发起组织ID 15 // 发起组织ID
16 - OrgId int64 `json:"orgId,string," valid:"Required"` 16 + OrgId int64 `json:"departmentId" valid:"Required"`
17 // 共创项目名称 17 // 共创项目名称
18 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` 18 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
19 // 共创发起人id 19 // 共创发起人id
@@ -99,9 +99,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU @@ -99,9 +99,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
99 avatar string 99 avatar string
100 ) 100 )
101 if len(updateUserInfoCommand.Avatar) > 0 { 101 if len(updateUserInfoCommand.Avatar) > 0 {
102 - avatar = user.UserInfo.Avatar  
103 - } else {  
104 avatar = updateUserInfoCommand.Avatar 102 avatar = updateUserInfoCommand.Avatar
  103 + } else {
  104 + avatar = user.UserInfo.Avatar
105 } 105 }
106 if len(updateUserInfoCommand.UserName) > 0 { 106 if len(updateUserInfoCommand.UserName) > 0 {
107 userName = updateUserInfoCommand.UserName 107 userName = updateUserInfoCommand.UserName
@@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct { @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
13 // 模式编码,唯一确定 13 // 模式编码,唯一确定
14 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` 14 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
15 // 发起组织ID 15 // 发起组织ID
16 - OrgId int64 `json:"orgId,string," valid:"Required"` 16 + OrgId int64 `json:"departmentId" valid:"Required"`
17 // 共创项目名称 17 // 共创项目名称
18 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` 18 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
19 // 共创发起人id 19 // 共创发起人id
@@ -13,7 +13,7 @@ type CooperationProjectInfo struct { @@ -13,7 +13,7 @@ type CooperationProjectInfo struct {
13 CompanyName string `json:"companyName"` 13 CompanyName string `json:"companyName"`
14 } `json:"company"` //项目归属企业 14 } `json:"company"` //项目归属企业
15 Org struct { 15 Org struct {
16 - OrgId int `json:"orgId"` 16 + OrgId int `json:"orgId,string"`
17 OrgName string `json:"orgName"` 17 OrgName string `json:"orgName"`
18 } `json:"org"` //项目创建时的组织 18 } `json:"org"` //项目创建时的组织
19 CooperationMode struct { 19 CooperationMode struct {
@@ -29,14 +29,14 @@ type CooperationProjectInfo struct { @@ -29,14 +29,14 @@ type CooperationProjectInfo struct {
29 CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"` 29 CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"`
30 CreatedAt time.Time `json:"createdAt"` 30 CreatedAt time.Time `json:"createdAt"`
31 CooperationProjectSponsor struct { 31 CooperationProjectSponsor struct {
32 - UsersId int `json:"usersId"`  
33 - UsersName string `json:"usersName"`  
34 - UsersCode string `json:"usersCode"` 32 + UsersId int `json:"userId"`
  33 + UsersName string `json:"userName"`
  34 + UsersCode string `json:"userCode"`
35 UserInfo struct { 35 UserInfo struct {
36 - UsersName string `json:"usersName"`  
37 - UsersCode string `json:"usersCode"` 36 + UsersName string `json:"userName"`
  37 + UsersCode string `json:"userCode"`
38 Phone string `json:"phone"` 38 Phone string `json:"phone"`
39 - UsersId int `json:"userId,string,"` 39 + UsersId int `json:"userId,string"`
40 } `json:"userInfo"` 40 } `json:"userInfo"`
41 } `json:"cooperationProjectSponsor"` //项目发起人 41 } `json:"cooperationProjectSponsor"` //项目发起人
42 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开 42 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开
@@ -15,7 +15,7 @@ type CooperationProject struct { @@ -15,7 +15,7 @@ type CooperationProject struct {
15 CompanyName string `json:"companyName"` 15 CompanyName string `json:"companyName"`
16 } `json:"company"` //项目归属企业 16 } `json:"company"` //项目归属企业
17 Org struct { 17 Org struct {
18 - OrgId int `json:"orgId"` 18 + OrgId int `json:"orgId,string"`
19 OrgName string `json:"orgName"` 19 OrgName string `json:"orgName"`
20 } `json:"org"` //项目创建时的组织 20 } `json:"org"` //项目创建时的组织
21 CooperationMode struct { 21 CooperationMode struct {
@@ -31,21 +31,21 @@ type CooperationProject struct { @@ -31,21 +31,21 @@ type CooperationProject struct {
31 CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"` 31 CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"`
32 CreatedAt time.Time `json:"createdAt"` 32 CreatedAt time.Time `json:"createdAt"`
33 CooperationProjectPublisher struct { 33 CooperationProjectPublisher struct {
34 - UsersId int `json:"usersId"` 34 + UsersId int `json:"userId,string"`
35 UserInfo struct { 35 UserInfo struct {
36 - UsersName string `json:"usersName"`  
37 - UsersCode string `json:"usersCode"` 36 + UsersName string `json:"userName"`
  37 + UsersCode string `json:"userCode"`
38 Phone string `json:"phone"` 38 Phone string `json:"phone"`
39 UsersId int `json:"userId,string,"` 39 UsersId int `json:"userId,string,"`
40 } `json:"userInfo"` 40 } `json:"userInfo"`
41 } `json:"cooperationProjectPublisher"` //项目发布人,即操作人 41 } `json:"cooperationProjectPublisher"` //项目发布人,即操作人
42 CooperationProjectSponsor struct { 42 CooperationProjectSponsor struct {
43 - UsersId int `json:"usersId"` 43 + UsersId int `json:"userId,string"`
44 UserInfo struct { 44 UserInfo struct {
45 - UsersName string `json:"usersName"`  
46 - UsersCode string `json:"usersCode"` 45 + UsersName string `json:"userName"`
  46 + UsersCode string `json:"userCode"`
47 Phone string `json:"phone"` 47 Phone string `json:"phone"`
48 - UsersId int `json:"userId,string,"` 48 + UsersId int `json:"userId,string"`
49 } `json:"userInfo"` 49 } `json:"userInfo"`
50 } `json:"cooperationProjectSponsor"` //项目发起人 50 } `json:"cooperationProjectSponsor"` //项目发起人
51 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开 51 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //共创合约承接对象,1员工,2共创用户,3公开
@@ -66,7 +66,7 @@ type ( @@ -66,7 +66,7 @@ type (
66 PublisherUid int `json:"publisherUid,string"` 66 PublisherUid int `json:"publisherUid,string"`
67 SponsorUid int `json:"sponsorUid,string"` 67 SponsorUid int `json:"sponsorUid,string"`
68 DepartmentId int `json:"departmentId,string"` 68 DepartmentId int `json:"departmentId,string"`
69 - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` 69 + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
70 Attachment []ProjectAttachment `json:"attachment"` 70 Attachment []ProjectAttachment `json:"attachment"`
71 } 71 }
72 72