fix:修复bug
This commit is contained in:
@ -53,7 +53,21 @@ func (m *WorkSchedule) CountersignStatus() bool {
|
||||
}
|
||||
|
||||
func (m *WorkSchedule) GetTargetValueAttribute() []string {
|
||||
return strings.Split(m.TargetValue, ",")
|
||||
if m.Target == WorkScheduleTargetForPerson {
|
||||
return strings.Split(m.TargetValue, ",")
|
||||
} else if m.Target == WorkScheduleTargetForRole {
|
||||
// 查询角色绑定的用户信息
|
||||
mSysUserRole := NewSysUserRole()
|
||||
|
||||
roleIDs := strings.Split(m.TargetValue, ",")
|
||||
|
||||
uids := make([]string, 0)
|
||||
|
||||
_ = Pluck(mSysUserRole, "uid", &uids, NewWhereIn("role_id", roleIDs))
|
||||
|
||||
return uids
|
||||
}
|
||||
return []string{}
|
||||
}
|
||||
|
||||
func (m *WorkSchedule) SetTargetValueAttribute(value []string) {
|
||||
|
Reference in New Issue
Block a user