接口 Y9PersonService

  • 所有已知实现类:
    Y9PersonServiceImpl

    public interface Y9PersonService
    作者:
    dingzhaojun, qinman, mengjuhua
    Date:
    2022/2/10
    • 方法详细资料

      • addPersons

        List<Y9Person> addPersons​(String parentId,
                                  List<String> personIds)
        根据personIds和parentId添加人员集合
        参数:
        parentId - 父节点id
        personIds - 人员id数组
        返回:
        List<Y9Person>
      • changeDisabled

        Y9Person changeDisabled​(String id)
        根据人员id,改变人员禁用状态
        参数:
        id - 唯一标识
        返回:
        Y9Person
      • countByGuidPathLikeAndDisabledAndDeletedFalse

        long countByGuidPathLikeAndDisabledAndDeletedFalse​(String guidPath)
        根据guidPath和Boolean值查询
        参数:
        guidPath - guid路径
        返回:
        long
      • countByParentId

        long countByParentId​(String parentId)
        根据父节点部门id,获取子节点的人员数量
        参数:
        parentId - 父节点id
        返回:
        long
      • create

        Y9Person create​(String parentId,
                        String name,
                        String loginName,
                        String mobile)
        根据必须字段创建人员
        参数:
        parentId - 父ID
        name - 名字
        loginName - 登录名
        mobile - 手机号
        返回:
        Y9Person
      • delete

        void delete​(List<String> ids)
        根据id数组,删除人员
        参数:
        ids - id数组
      • delete

        void delete​(String id)
        根据主键id删除人员实例(人员与组,与角色,与岗位的关联关系都删掉)
        参数:
        id - id
      • deleteByParentId

        void deleteByParentId​(String parentId)
        根据父节点id,删除人员
        参数:
        parentId - 父节点id
      • existsById

        boolean existsById​(String id)
        根据id判断人员是否存在
        参数:
        id - 唯一标识
        返回:
        boolean
      • findById

        Optional<Y9Person> findById​(String id)
        根据id查找人员对象
        参数:
        id - 唯一标识
        返回:
        人员对象 或 null
      • findByLoginName

        Optional<Y9Person> findByLoginName​(String loginName)
        根据登录名获取人员
        参数:
        loginName - 登录名
        返回:
        Y9Person
      • findIdByGuidPathStartingWith

        List<String> findIdByGuidPathStartingWith​(String guidPath)
        查找 guidPath 包含传入参数的对应人的 id
        参数:
        guidPath - guid path
        返回:
        List<String>
      • getById

        Y9Person getById​(String id)
        根据主键id获取人员实例
        参数:
        id - 唯一标识
        返回:
        人员对象
        抛出:
        net.risesoft.y9.exception.Y9NotFoundException - id 对应的记录不存在的情况
      • getByLoginNameAndParentId

        Optional<Y9Person> getByLoginNameAndParentId​(String loginName,
                                                     String parentId)
        根据登陆名和父节点id,获取人员信息
        参数:
        loginName - 登录名
        parentId - 父节点id
        返回:
        Y9Person
      • getPersonByLoginNameAndTenantId

        Y9Person getPersonByLoginNameAndTenantId​(String loginName,
                                                 String tenantId)
        根据登录名、租户id获取人员
        参数:
        tenantId - 租户id
        loginName - tenantId
        返回:
        Y9Person
      • getPersonByMobile

        Y9Person getPersonByMobile​(String mobile)
        根据手机号码获取人员
        参数:
        mobile - 手机号码
        返回:
        Y9Person
      • isLoginNameAvailable

        boolean isLoginNameAvailable​(String personId,
                                     String loginName)
        判断用户名是否可用
        参数:
        personId - 人员id
        loginName - 登录名
        返回:
        boolean
      • listByDisabledAndDeletedAndGuidPathLike

        List<Y9Person> listByDisabledAndDeletedAndGuidPathLike​(String guidPath)
        根据guidPath(模糊查询),获取人员列表
        参数:
        guidPath - guid路径
        返回:
        List<Y9Person>
      • listByGroupId

        List<Y9Person> listByGroupId​(String groupId,
                                     Boolean disabled)
        根据用户组节点id,获取本组的人员列表
        参数:
        groupId - 用户组id
        disabled - 是否已禁用
        返回:
        List<Y9Person>
      • listByIdTypeAndIdNum

        List<Y9Person> listByIdTypeAndIdNum​(String idType,
                                            String idNum,
                                            Boolean disabled)
        根据idType和idNum查询
        参数:
        idType - 证件类型
        idNum - 证件号
        disabled - 是否已禁用
        返回:
        List<Y9Person>
      • listByNameLike

        List<Y9Person> listByNameLike​(String name,
                                      Boolean disabled)
        根据名称查询
        参数:
        name - 姓名
        disabled - 是否已禁用
        返回:
        List
      • listByParentId

        List<Y9Person> listByParentId​(String parentId,
                                      Boolean disabled)
        根据父id及禁用状态查询人员
        参数:
        parentId - 父节点id
        disabled - 是否已禁用
        返回:
        List<Y9Person>
      • listByPositionId

        List<Y9Person> listByPositionId​(String positionId,
                                        Boolean disabled)
        根据岗位id,获取人员列表
        参数:
        positionId - 岗位id
        disabled - 是否已禁用
        返回:
        List<Y9Person>
      • listParents

        List<Y9OrgBase> listParents​(String personId)
        获取人员的所有父节点
        一般只会有一个,一人多账号的情况可能会有多个
        参数:
        personId - 人员id
        返回:
        List<Y9OrgBase>
      • modifyPassword

        Y9Person modifyPassword​(String personId,
                                String oldPassword,
                                String newPassword)
        修改人员密码
        参数:
        personId - 人员id
        oldPassword - 旧密码
        newPassword - 新密码
        返回:
        Y9Person
      • pageByNameLike

        org.springframework.data.domain.Page<Y9Person> pageByNameLike​(String name,
                                                                      net.risesoft.pojo.Y9PageQuery pageQuery)
        按名称分页,如 根据名称模糊查询人员
        参数:
        name - 人员姓名
        pageQuery - 分页查询参数
        返回:
        Page<Y9Person>
      • pageByParentId

        org.springframework.data.domain.Page<Y9Person> pageByParentId​(String parentId,
                                                                      boolean disabled,
                                                                      String name,
                                                                      net.risesoft.pojo.Y9PageQuery pageQuery)
        根据父节点id、人员禁用状态及名称模糊查询本部门下人员
        参数:
        parentId - 父节点id
        disabled - 是否已禁用
        name - 人员姓名
        pageQuery - 分页查询参数
        返回:
        Page<Y9Person>
      • pageByParentId

        org.springframework.data.domain.Page<Y9Person> pageByParentId​(String parentId,
                                                                      boolean disabled,
                                                                      net.risesoft.pojo.Y9PageQuery pageQuery)
        根据父节点查询,本部门下的人员
        参数:
        parentId - 父节点id
        disabled - 是否已禁用
        pageQuery -
        返回:
        Page<Y9Person>
      • resetDefaultPassword

        void resetDefaultPassword​(String personId)
        重置默认密码
        参数:
        personId - 人员id
      • saveAvator

        Y9Person saveAvator​(String personId,
                            String avatorUrl)
        保存人员头像
        参数:
        personId - 人员id
        avatorUrl - 头像路径
        返回:
      • saveOrUpdate

        Y9Person saveOrUpdate​(Y9Person person,
                              Y9PersonExt personExt)
        保存或者修改此岗位的信息
        参数:
        person - 人员对象
        personExt - 人员扩展信息对象
        返回:
        ORGPerson
      • saveOrUpdate

        Y9Person saveOrUpdate​(Y9Person person,
                              Y9PersonExt ext,
                              List<String> positionIds,
                              List<String> jobIds)
        保存或更新
        参数:
        person - 人员对象
        ext - 人员扩展信息对象
        positionIds - 岗位id列表 用于关联已有岗位
        jobIds - 职位id列表 通过职位新增岗位关联
        返回:
        Y9Person
      • saveOrUpdate4ImpOrg

        Y9Person saveOrUpdate4ImpOrg​(Y9Person person,
                                     Y9PersonExt personExt)
        保存或者修改此人员的信息(用于导入y9导出的组织机构:密码是什么就导入什么不做处理)
        参数:
        person - 人员对象
        personExt - 人员扩展信息
        返回:
        ORGPerson
      • saveProperties

        Y9Person saveProperties​(String personId,
                                String properties)
        保存或者更新人员扩展信息
        参数:
        personId - 人员id
        properties - 扩展属性
        返回:
        Y9Person
      • saveWeixinId

        Y9Person saveWeixinId​(String personId,
                              String weixinId)
        修改微信 id
        参数:
        personId - 人员 id
        weixinId - 微信 id
      • updateTabIndex

        Y9Person updateTabIndex​(String id,
                                int tabIndex)
        更新排序序列号
        参数:
        id - 人员id
        tabIndex - 排序序列号
        返回:
        Y9Person