作者 yangfu

部门长修改

... ... @@ -19,6 +19,6 @@ type UserBaseInfoAggregation struct {
type Position struct {
PositionId int `orm:"column(position_id)`
Name string `orm:"column(name)`
Relation string `orm:"column(relation)" json:"-"`
CreateTime time.Time `orm:"column(create_time)" json:"-"`
Relation string `orm:"column(relation)"`
CreateTime time.Time `orm:"column(create_time)"`
}
... ...
... ... @@ -3,8 +3,8 @@ package protocol
import "time"
const (
DepartmentUser = iota //用户所有部门
DepartmentAll //公司所有部门
DepartmentUser = iota //用户所有部门
DepartmentAll //公司所有部门
)
/*Departments */
... ... @@ -21,8 +21,8 @@ type Department struct {
Name string `orm:"column(name)" json:"name"`
PId int `orm:"column(parent_id)" json:"-"`
ManagerString string `orm:"column(managers)" json:"-"`
Relation string `orm:"column(relation)" json:"-"`
CreateTime time.Time `orm:"column(create_time)" json:"-"`
Relation string `orm:"column(relation)"`
CreateTime time.Time `orm:"column(create_time)"`
Managers []int `json:"-"`
Departments []*Department `json:"departments,omitempty"`
}
... ...
... ... @@ -98,7 +98,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
if len(departments) == 0 {
return &protocol.Department{}
}
log.Debug(common.AssertJson(departments))
log.Debug("部门:", common.AssertJson(departments))
var top *protocol.Department
var countTop, countTmp = 0, 0
for i := range departments {
... ... @@ -128,7 +128,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
func GetTopPosition(positions []*protocol.Position) *protocol.Position {
var top *protocol.Position
var countTop, countTmp = 0, 0
log.Debug(common.AssertJson(positions))
log.Debug("职位:", common.AssertJson(positions))
if len(positions) == 0 {
return &protocol.Position{}
}
... ...