|
@@ -56,12 +56,12 @@ type ModuleEmployee struct { |
|
@@ -56,12 +56,12 @@ type ModuleEmployee struct { |
56
|
}
|
56
|
}
|
57
|
|
57
|
|
58
|
type DeleteUserData struct {
|
58
|
type DeleteUserData struct {
|
59
|
- CompanyId int64 `json:"company_id"`
|
59
|
+ CompanyId int64 `json:"companyId"`
|
60
|
Ids []int64 `json:"ids"`
|
60
|
Ids []int64 `json:"ids"`
|
61
|
}
|
61
|
}
|
62
|
|
62
|
|
63
|
type ForbidAllowUserData struct {
|
63
|
type ForbidAllowUserData struct {
|
64
|
- CompanyId int64 `json:"company_id"`
|
64
|
+ CompanyId int64 `json:"companyId"`
|
65
|
Ids []int64 `json:"ids"`
|
65
|
Ids []int64 `json:"ids"`
|
66
|
Status int8 `json:"status"`
|
66
|
Status int8 `json:"status"`
|
67
|
}
|
67
|
}
|
|
@@ -435,7 +435,9 @@ func editUserDepart(usercompanyid int64, companyid int64, userDepart []UserDepar |
|
@@ -435,7 +435,9 @@ func editUserDepart(usercompanyid int64, companyid int64, userDepart []UserDepar |
435
|
}
|
435
|
}
|
436
|
if len(delDepartIds) > 0 {
|
436
|
if len(delDepartIds) > 0 {
|
437
|
_, err = o.QueryTable(&models.UserDepartment{}).
|
437
|
_, err = o.QueryTable(&models.UserDepartment{}).
|
438
|
- Filter("id__in", delDepartIds).
|
438
|
+ Filter("department_id__in", delDepartIds).
|
|
|
439
|
+ Filter("user_company_id", usercompanyid).
|
|
|
440
|
+ Filter("enable_status", 1).
|
439
|
Update(orm.Params{
|
441
|
Update(orm.Params{
|
440
|
"enable_status": models.USER_DEPARTMENT_ENABLE_NO,
|
442
|
"enable_status": models.USER_DEPARTMENT_ENABLE_NO,
|
441
|
})
|
443
|
})
|
|
@@ -488,7 +490,9 @@ func editUserPosition(usercompanyid int64, companyid int64, userPosition []UserP |
|
@@ -488,7 +490,9 @@ func editUserPosition(usercompanyid int64, companyid int64, userPosition []UserP |
488
|
}
|
490
|
}
|
489
|
if len(delPositionIds) > 0 {
|
491
|
if len(delPositionIds) > 0 {
|
490
|
_, err = o.QueryTable(&models.UserPosition{}).
|
492
|
_, err = o.QueryTable(&models.UserPosition{}).
|
491
|
- Filter("id__in", delPositionIds).
|
493
|
+ Filter("position_id__in", delPositionIds).
|
|
|
494
|
+ Filter("user_company_id", usercompanyid).
|
|
|
495
|
+ Filter("enable_status", 1).
|
492
|
Update(orm.Params{
|
496
|
Update(orm.Params{
|
493
|
"enable_status": models.USER_POSITION_ENABLE_NO,
|
497
|
"enable_status": models.USER_POSITION_ENABLE_NO,
|
494
|
})
|
498
|
})
|