作者 yangfu

fix: 配置修改

... ... @@ -9,24 +9,32 @@ type CompanyUserItem struct {
UserId string `json:"userId"`
UserName string `json:"userName"`
UserType int `json:"userType"`
// 员工类型 1:固定 2:派遣 3.临时
EmployeeType int `json:"employeeType"`
// IC卡号
IcCardNumber string `json:"icCardNumber"`
AuthFlag bool `json:"authFlag"` // 1:可操作(编辑,修改等)
}
//CompanyUserInfo 用户数据详情
type CompanyUserInfo struct {
Email string `json:"email"`
Phone string `json:"phone"`
Avatar string `json:"avatar"`
EnableStatus int `json:"enableStatus"`
UsersCode string `json:"userCode"`
UsersID string `json:"userId"`
UsersName string `json:"userName"`
OrgID string `json:"orgId"`
OrgName string `json:"orgName"`
DepartmentID string `json:"departmentId"`
DepartmentName string `json:"departmentName"`
UsersOrg []UserOrg `json:"userOrg"`
UsersRole []UserRole `json:"userRole"`
Email string `json:"email"`
Phone string `json:"phone"`
Avatar string `json:"avatar"`
EnableStatus int `json:"enableStatus"`
UsersCode string `json:"userCode"`
UsersID string `json:"userId"`
UsersName string `json:"userName"`
OrgID string `json:"orgId"`
OrgName string `json:"orgName"`
DepartmentID string `json:"departmentId"`
DepartmentName string `json:"departmentName"`
// 员工类型 1:固定 2:派遣 3.临时
EmployeeType int `json:"employeeType"`
// IC卡号
IcCardNumber string `json:"icCardNumber"`
UsersOrg []UserOrg `json:"userOrg"`
UsersRole []UserRole `json:"userRole"`
}
type UserOrg struct {
... ...
... ... @@ -93,6 +93,8 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp
DepartmentName: resultUser.Department.DepartmentName,
UsersOrg: usersOrg,
UsersRole: userRole,
EmployeeType: resultUser.UserInfo.EmployeeType,
IcCardNumber: resultUser.UserInfo.IcCardNumber,
}
datas := map[string]interface{}{
... ... @@ -216,6 +218,8 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co
UserId: strconv.Itoa(v.UserId),
UserName: v.UserInfo.UserName,
UserType: v.UserType,
EmployeeType: v.UserInfo.EmployeeType,
IcCardNumber: v.UserInfo.IcCardNumber,
}
if v.Org.OrgId == int(companyUserListQuery.Operator.OrgId) {
item.AuthFlag = true
... ...
... ... @@ -23,6 +23,10 @@ type UserDetail struct {
Email string `json:"email"`
UserName string `json:"userName"`
Avatar string `json:"avatar"`
// 员工类型 1:固定 2:派遣 3.临时
EmployeeType int `json:"employeeType,omitempty"`
// IC卡号
IcCardNumber string `json:"icCardNumber,omitempty"`
} `json:"userInfo,omitempty"`
Company *struct {
CompanyId int `json:"companyId"`
... ...