作者 tangxuhui

Merge branch 'dev' into test

@@ -610,6 +610,7 @@ func DeleteEmployeeData(data DeleteUserData) error { @@ -610,6 +610,7 @@ func DeleteEmployeeData(data DeleteUserData) error {
610 deleteUserIds = append(deleteUserIds, userId) 610 deleteUserIds = append(deleteUserIds, userId)
611 } 611 }
612 } 612 }
  613 + if len(deleteUserIds) > 0 {
613 _, err = o.QueryTable(&models.User{}). 614 _, err = o.QueryTable(&models.User{}).
614 Filter("id__in", deleteUserIds). 615 Filter("id__in", deleteUserIds).
615 Update(orm.Params{ 616 Update(orm.Params{
@@ -620,6 +621,7 @@ func DeleteEmployeeData(data DeleteUserData) error { @@ -620,6 +621,7 @@ func DeleteEmployeeData(data DeleteUserData) error {
620 log.Error("更新user数据失败:%s", err) 621 log.Error("更新user数据失败:%s", err)
621 return errors.New("删除user_company数据失败") 622 return errors.New("删除user_company数据失败")
622 } 623 }
  624 + }
623 o.Commit() 625 o.Commit()
624 return nil 626 return nil
625 } 627 }