作者 tangxuhui
@@ -292,8 +292,10 @@ func (svr AuthService) OrgSwitch(switchOrgCommand *command.SwitchOrgCommand) (in @@ -292,8 +292,10 @@ func (svr AuthService) OrgSwitch(switchOrgCommand *command.SwitchOrgCommand) (in
292 } 292 }
293 var userId int64 293 var userId int64
294 if v, ok := token["userId"]; ok { 294 if v, ok := token["userId"]; ok {
295 - if userId, ok = v.(int64); !ok { 295 + if vInt, ok := v.(int); !ok || vInt == 0 {
296 return nil, application.ThrowError(application.TRANSACTION_ERROR, "用户不存在") 296 return nil, application.ThrowError(application.TRANSACTION_ERROR, "用户不存在")
  297 + } else {
  298 + userId = int64(vInt)
297 } 299 }
298 } 300 }
299 user, err := svr.getUserInfo(domain.Operator{UserId: userId}) 301 user, err := svr.getUserInfo(domain.Operator{UserId: userId})
@@ -311,7 +313,7 @@ func (svr AuthService) OrgSwitch(switchOrgCommand *command.SwitchOrgCommand) (in @@ -311,7 +313,7 @@ func (svr AuthService) OrgSwitch(switchOrgCommand *command.SwitchOrgCommand) (in
311 var res = map[string]interface{}{ 313 var res = map[string]interface{}{
312 "user": user, 314 "user": user,
313 "accessMenus": resultMenu.Menus, 315 "accessMenus": resultMenu.Menus,
314 - "token": token["token"], 316 + "access": token["token"],
315 } 317 }
316 return res, nil 318 return res, nil
317 } 319 }
@@ -21,7 +21,7 @@ type UpdateCooperationProjectCommand struct { @@ -21,7 +21,7 @@ type UpdateCooperationProjectCommand struct {
21 // 共创发起人id 21 // 共创发起人id
22 CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"` 22 CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"`
23 // 项目承接对象 23 // 项目承接对象
24 - CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"` 24 + CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes,omitempty"`
25 // 共创项目描述 25 // 共创项目描述
26 CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"` 26 CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"`
27 //图片 27 //图片