作者 唐旭辉

修复bug

... ... @@ -424,9 +424,9 @@ func (c *CompanyController) InitCompany() {
return
}
// GetCompanyForUCenter 总后台调用
//@router /ucenter/company/info [post]
func (c *CompanyController) GetCompanyForUCenter() {
// EditCompanyForUCenter 总后台调用
//@router /ucenter/company/edit [post]
func (c *CompanyController) EditCompanyForUCenter() {
var msg *protocol.ResponseMessage
defer func() {
c.ResposeJson(msg)
... ... @@ -446,9 +446,9 @@ func (c *CompanyController) GetCompanyForUCenter() {
return
}
//EditCompanyForUCenter
//@router /ucenter/company/edit [post]
func (c *CompanyController) EditCompanyForUCenter() {
//GetCompanyForUCenter
//@router /ucenter/company/info [post]
func (c *CompanyController) GetCompanyForUCenter() {
var msg *protocol.ResponseMessage
defer func() {
c.ResposeJson(msg)
... ...
... ... @@ -37,12 +37,13 @@ type DepartmentMember struct {
//ResponseDepartmentInfo ...
type ResponseDepartmentInfo struct {
ID int64 `json:"id"`
CompanyID int64 `json:"company_id"` //公司
Name string `json:"name"` //部门名字
ParantID int64 `json:"parentId"` //父级部门Id
Manages []DepartmentManager `json:"manages"` //部门管理员
Member int64 `json:"member"` //成员数
ID int64 `json:"id"`
CompanyID int64 `json:"company_id"` //公司
Name string `json:"name"` //部门名字
ParantID int64 `json:"parentId"` //父级部门Id
ParentName string `json:"parentName"`
Manages []DepartmentManager `json:"manages"` //部门管理员
Member int64 `json:"member"` //成员数
}
//ResponseDepartmentList ....
... ...
... ... @@ -351,7 +351,8 @@ func DepartmentListAll(companyId int64) ([]protocol.ResponseDepartmentInfo, erro
depart := protocol.ResponseDepartmentInfo{
ID: v.Id, CompanyID: v.CompanyId,
Name: v.Name, Member: cnt,
ParantID: v.ParentId,
ParantID: v.ParentId,
ParentName: v.Name,
}
var manage []protocol.DepartmentManager
manage = v.GetManages()
... ...