作者 唐旭辉

修复bug

@@ -424,9 +424,9 @@ func (c *CompanyController) InitCompany() { @@ -424,9 +424,9 @@ func (c *CompanyController) InitCompany() {
424 return 424 return
425 } 425 }
426 426
427 -// GetCompanyForUCenter 总后台调用  
428 -//@router /ucenter/company/info [post]  
429 -func (c *CompanyController) GetCompanyForUCenter() { 427 +// EditCompanyForUCenter 总后台调用
  428 +//@router /ucenter/company/edit [post]
  429 +func (c *CompanyController) EditCompanyForUCenter() {
430 var msg *protocol.ResponseMessage 430 var msg *protocol.ResponseMessage
431 defer func() { 431 defer func() {
432 c.ResposeJson(msg) 432 c.ResposeJson(msg)
@@ -446,9 +446,9 @@ func (c *CompanyController) GetCompanyForUCenter() { @@ -446,9 +446,9 @@ func (c *CompanyController) GetCompanyForUCenter() {
446 return 446 return
447 } 447 }
448 448
449 -//EditCompanyForUCenter  
450 -//@router /ucenter/company/edit [post]  
451 -func (c *CompanyController) EditCompanyForUCenter() { 449 +//GetCompanyForUCenter
  450 +//@router /ucenter/company/info [post]
  451 +func (c *CompanyController) GetCompanyForUCenter() {
452 var msg *protocol.ResponseMessage 452 var msg *protocol.ResponseMessage
453 defer func() { 453 defer func() {
454 c.ResposeJson(msg) 454 c.ResposeJson(msg)
@@ -37,12 +37,13 @@ type DepartmentMember struct { @@ -37,12 +37,13 @@ type DepartmentMember struct {
37 37
38 //ResponseDepartmentInfo ... 38 //ResponseDepartmentInfo ...
39 type ResponseDepartmentInfo struct { 39 type ResponseDepartmentInfo struct {
40 - ID int64 `json:"id"`  
41 - CompanyID int64 `json:"company_id"` //公司  
42 - Name string `json:"name"` //部门名字  
43 - ParantID int64 `json:"parentId"` //父级部门Id  
44 - Manages []DepartmentManager `json:"manages"` //部门管理员  
45 - Member int64 `json:"member"` //成员数 40 + ID int64 `json:"id"`
  41 + CompanyID int64 `json:"company_id"` //公司
  42 + Name string `json:"name"` //部门名字
  43 + ParantID int64 `json:"parentId"` //父级部门Id
  44 + ParentName string `json:"parentName"`
  45 + Manages []DepartmentManager `json:"manages"` //部门管理员
  46 + Member int64 `json:"member"` //成员数
46 } 47 }
47 48
48 //ResponseDepartmentList .... 49 //ResponseDepartmentList ....
@@ -351,7 +351,8 @@ func DepartmentListAll(companyId int64) ([]protocol.ResponseDepartmentInfo, erro @@ -351,7 +351,8 @@ func DepartmentListAll(companyId int64) ([]protocol.ResponseDepartmentInfo, erro
351 depart := protocol.ResponseDepartmentInfo{ 351 depart := protocol.ResponseDepartmentInfo{
352 ID: v.Id, CompanyID: v.CompanyId, 352 ID: v.Id, CompanyID: v.CompanyId,
353 Name: v.Name, Member: cnt, 353 Name: v.Name, Member: cnt,
354 - ParantID: v.ParentId, 354 + ParantID: v.ParentId,
  355 + ParentName: v.Name,
355 } 356 }
356 var manage []protocol.DepartmentManager 357 var manage []protocol.DepartmentManager
357 manage = v.GetManages() 358 manage = v.GetManages()