作者 yangfu

部门长修改

@@ -19,6 +19,6 @@ type UserBaseInfoAggregation struct { @@ -19,6 +19,6 @@ type UserBaseInfoAggregation struct {
19 type Position struct { 19 type Position struct {
20 PositionId int `orm:"column(position_id)` 20 PositionId int `orm:"column(position_id)`
21 Name string `orm:"column(name)` 21 Name string `orm:"column(name)`
22 - Relation string `orm:"column(relation)" json:"-"`  
23 - CreateTime time.Time `orm:"column(create_time)" json:"-"` 22 + Relation string `orm:"column(relation)"`
  23 + CreateTime time.Time `orm:"column(create_time)"`
24 } 24 }
@@ -21,8 +21,8 @@ type Department struct { @@ -21,8 +21,8 @@ type Department struct {
21 Name string `orm:"column(name)" json:"name"` 21 Name string `orm:"column(name)" json:"name"`
22 PId int `orm:"column(parent_id)" json:"-"` 22 PId int `orm:"column(parent_id)" json:"-"`
23 ManagerString string `orm:"column(managers)" json:"-"` 23 ManagerString string `orm:"column(managers)" json:"-"`
24 - Relation string `orm:"column(relation)" json:"-"`  
25 - CreateTime time.Time `orm:"column(create_time)" json:"-"` 24 + Relation string `orm:"column(relation)"`
  25 + CreateTime time.Time `orm:"column(create_time)"`
26 Managers []int `json:"-"` 26 Managers []int `json:"-"`
27 Departments []*Department `json:"departments,omitempty"` 27 Departments []*Department `json:"departments,omitempty"`
28 } 28 }
@@ -98,7 +98,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department { @@ -98,7 +98,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
98 if len(departments) == 0 { 98 if len(departments) == 0 {
99 return &protocol.Department{} 99 return &protocol.Department{}
100 } 100 }
101 - log.Debug(common.AssertJson(departments)) 101 + log.Debug("部门:", common.AssertJson(departments))
102 var top *protocol.Department 102 var top *protocol.Department
103 var countTop, countTmp = 0, 0 103 var countTop, countTmp = 0, 0
104 for i := range departments { 104 for i := range departments {
@@ -128,7 +128,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department { @@ -128,7 +128,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
128 func GetTopPosition(positions []*protocol.Position) *protocol.Position { 128 func GetTopPosition(positions []*protocol.Position) *protocol.Position {
129 var top *protocol.Position 129 var top *protocol.Position
130 var countTop, countTmp = 0, 0 130 var countTop, countTmp = 0, 0
131 - log.Debug(common.AssertJson(positions)) 131 + log.Debug("职位:", common.AssertJson(positions))
132 if len(positions) == 0 { 132 if len(positions) == 0 {
133 return &protocol.Position{} 133 return &protocol.Position{}
134 } 134 }