类 Y9PersonServiceImpl
- java.lang.Object
-
- net.risesoft.service.org.impl.Y9PersonServiceImpl
-
- 所有已实现的接口:
Y9PersonService
@Transactional(value="rsTenantTransactionManager", readOnly=true) @Service public class Y9PersonServiceImpl extends Object implements Y9PersonService- 作者:
- dingzhaojun, qinman, mengjuhua
- Date:
- 2022/2/10
-
-
构造器概要
构造器 构造器 说明 Y9PersonServiceImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<Y9Person>addPersons(String parentId, List<String> personIds)根据personIds和parentId添加人员集合Y9PersonchangeDisabled(String id)根据人员id,改变人员禁用状态longcountByGuidPathLikeAndDisabledAndDeletedFalse(String guidPath)根据guidPath和Boolean值查询longcountByParentId(String parentId)根据父节点部门id,获取子节点的人员数量Y9Personcreate(String parentId, String name, String loginName, String mobile)根据必须字段创建人员voiddelete(String id)根据主键id删除人员实例(人员与组,与角色,与岗位的关联关系都删掉)voiddelete(List<String> ids)根据id数组,删除人员voiddeleteByParentId(String parentId)根据父节点id,删除人员booleanexistsById(String id)根据id判断人员是否存在Optional<Y9Person>findByCaId(String caId)根据ca证书Id获取人员Optional<Y9Person>findById(String id)根据id查找人员对象Optional<Y9Person>findByLoginName(String loginName)根据登录名获取人员List<String>findIdByGuidPathStartingWith(String guidPath)查找 guidPath 包含传入参数的对应人的 idY9PersongetById(String id)根据主键id获取人员实例Optional<Y9Person>getByLoginNameAndParentId(String loginName, String parentId)根据登陆名和父节点id,获取人员信息Y9PersongetPersonByLoginNameAndTenantId(String loginName, String tenantId)根据登录名、租户id获取人员Y9PersongetPersonByMobile(String mobile)根据手机号码获取人员booleanisLoginNameAvailable(String personId, String loginName)判断用户名是否可用List<Y9Person>list(Boolean disabled)查找所有人员List<Y9Person>listAll()查询所有人员List<Y9Person>listByDisabledAndDeletedAndGuidPathLike(String guidPath)根据guidPath(模糊查询),获取人员列表List<Y9Person>listByGroupId(String groupId, Boolean disabled)根据用户组节点id,获取本组的人员列表List<Y9Person>listByIdTypeAndIdNum(String idType, String idNum, Boolean disabled)根据idType和idNum查询List<Y9Person>listByNameLike(String name, Boolean disabled)根据名称查询List<Y9Person>listByParentId(String parentId, Boolean disabled)根据父id及禁用状态查询人员List<Y9Person>listByPositionId(String positionId, Boolean disabled)根据岗位id,获取人员列表List<Y9OrgBase>listParents(String personId)获取人员的所有父节点
一般只会有一个,一人多账号的情况可能会有多个Y9PersonmodifyPassword(String personId, String oldPassword, String newPassword)修改人员密码Y9Personmove(String personId, String parentId)移动voidonParentDepartmentDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Department> event)voidonParentOrganizationDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Organization> event)voidonParentUpdated(net.risesoft.y9.pubsub.event.Y9EntityUpdatedEvent<? extends Y9OrgBase> event)List<Y9OrgBase>order(List<String> personIds)按照tabindexs的顺序重新排序人员列表org.springframework.data.domain.Page<Y9Person>pageByNameLike(String name, net.risesoft.pojo.Y9PageQuery pageQuery)按名称分页,如 根据名称模糊查询人员org.springframework.data.domain.Page<Y9Person>pageByParentId(String parentId, boolean disabled, String name, net.risesoft.pojo.Y9PageQuery pageQuery)根据父节点id、人员禁用状态及名称模糊查询本部门下人员org.springframework.data.domain.Page<Y9Person>pageByParentId(String parentId, boolean disabled, net.risesoft.pojo.Y9PageQuery pageQuery)根据父节点查询,本部门下的人员voidresetDefaultPassword(String personId)重置默认密码Y9Personsave(Y9Person person)保存人员Y9PersonsaveAvator(String personId, String avatorUrl)保存人员头像Y9PersonsaveOrUpdate(Y9Person person, Y9PersonExt personExt)保存或者修改此岗位的信息Y9PersonsaveOrUpdate(Y9Person person, Y9PersonExt ext, List<String> positionIds, List<String> jobIds)保存或更新Y9PersonsaveOrUpdate4ImpOrg(Y9Person person, Y9PersonExt personExt)保存或者修改此人员的信息(用于导入y9导出的组织机构:密码是什么就导入什么不做处理)Y9PersonsaveProperties(String personId, String properties)保存或者更新人员扩展信息Y9PersonsaveWeixinId(String personId, String weixinId)修改微信 idY9PersonupdateTabIndex(String id, int tabIndex)更新排序序列号
-
-
-
方法详细资料
-
addPersons
@Transactional(readOnly=false) public List<Y9Person> addPersons(String parentId, List<String> personIds)
从接口复制的说明:Y9PersonService根据personIds和parentId添加人员集合- 指定者:
addPersons在接口中Y9PersonService- 参数:
parentId- 父节点idpersonIds- 人员id数组- 返回:
List<Y9Person>
-
changeDisabled
@Transactional(readOnly=false) public Y9Person changeDisabled(String id)
从接口复制的说明:Y9PersonService根据人员id,改变人员禁用状态- 指定者:
changeDisabled在接口中Y9PersonService- 参数:
id- 唯一标识- 返回:
Y9Person
-
countByGuidPathLikeAndDisabledAndDeletedFalse
public long countByGuidPathLikeAndDisabledAndDeletedFalse(String guidPath)
从接口复制的说明:Y9PersonService根据guidPath和Boolean值查询- 指定者:
countByGuidPathLikeAndDisabledAndDeletedFalse在接口中Y9PersonService- 参数:
guidPath- guid路径- 返回:
- long
-
countByParentId
public long countByParentId(String parentId)
从接口复制的说明:Y9PersonService根据父节点部门id,获取子节点的人员数量- 指定者:
countByParentId在接口中Y9PersonService- 参数:
parentId- 父节点id- 返回:
- long
-
create
@Transactional(readOnly=false) public Y9Person create(String parentId, String name, String loginName, String mobile)
从接口复制的说明:Y9PersonService根据必须字段创建人员- 指定者:
create在接口中Y9PersonService- 参数:
parentId- 父IDname- 名字loginName- 登录名mobile- 手机号- 返回:
Y9Person
-
delete
@Transactional(readOnly=false) public void delete(List<String> ids)
从接口复制的说明:Y9PersonService根据id数组,删除人员- 指定者:
delete在接口中Y9PersonService- 参数:
ids- id数组
-
delete
@Transactional(readOnly=false) public void delete(String id)
从接口复制的说明:Y9PersonService根据主键id删除人员实例(人员与组,与角色,与岗位的关联关系都删掉)- 指定者:
delete在接口中Y9PersonService- 参数:
id- id
-
deleteByParentId
@Transactional(readOnly=false) public void deleteByParentId(String parentId)
从接口复制的说明:Y9PersonService根据父节点id,删除人员- 指定者:
deleteByParentId在接口中Y9PersonService- 参数:
parentId- 父节点id
-
existsById
public boolean existsById(String id)
从接口复制的说明:Y9PersonService根据id判断人员是否存在- 指定者:
existsById在接口中Y9PersonService- 参数:
id- 唯一标识- 返回:
- boolean
-
findById
public Optional<Y9Person> findById(String id)
从接口复制的说明:Y9PersonService根据id查找人员对象- 指定者:
findById在接口中Y9PersonService- 参数:
id- 唯一标识- 返回:
Optional<Y9Person>人员对象 或 null
-
findByLoginName
public Optional<Y9Person> findByLoginName(String loginName)
从接口复制的说明:Y9PersonService根据登录名获取人员- 指定者:
findByLoginName在接口中Y9PersonService- 参数:
loginName- 登录名- 返回:
Optional<Y9Person>
-
findByCaId
public Optional<Y9Person> findByCaId(String caId)
从接口复制的说明:Y9PersonService根据ca证书Id获取人员- 指定者:
findByCaId在接口中Y9PersonService- 参数:
caId- ca证书Id- 返回:
Optional<Y9Person>
-
findIdByGuidPathStartingWith
public List<String> findIdByGuidPathStartingWith(String guidPath)
从接口复制的说明:Y9PersonService查找 guidPath 包含传入参数的对应人的 id- 指定者:
findIdByGuidPathStartingWith在接口中Y9PersonService- 参数:
guidPath- guid path- 返回:
List<String>
-
getById
@Transactional(readOnly=true) public Y9Person getById(String id)
从接口复制的说明:Y9PersonService根据主键id获取人员实例- 指定者:
getById在接口中Y9PersonService- 参数:
id- 唯一标识- 返回:
Y9Person人员对象
-
getByLoginNameAndParentId
public Optional<Y9Person> getByLoginNameAndParentId(String loginName, String parentId)
从接口复制的说明:Y9PersonService根据登陆名和父节点id,获取人员信息- 指定者:
getByLoginNameAndParentId在接口中Y9PersonService- 参数:
loginName- 登录名parentId- 父节点id- 返回:
Optional<Y9Person>
-
getPersonByLoginNameAndTenantId
public Y9Person getPersonByLoginNameAndTenantId(String loginName, String tenantId)
从接口复制的说明:Y9PersonService根据登录名、租户id获取人员- 指定者:
getPersonByLoginNameAndTenantId在接口中Y9PersonService- 参数:
loginName- tenantIdtenantId- 租户id- 返回:
Y9Person
-
getPersonByMobile
public Y9Person getPersonByMobile(String mobile)
从接口复制的说明:Y9PersonService根据手机号码获取人员- 指定者:
getPersonByMobile在接口中Y9PersonService- 参数:
mobile- 手机号码- 返回:
Y9Person
-
isLoginNameAvailable
public boolean isLoginNameAvailable(String personId, String loginName)
从接口复制的说明:Y9PersonService判断用户名是否可用- 指定者:
isLoginNameAvailable在接口中Y9PersonService- 参数:
personId- 人员idloginName- 登录名- 返回:
- boolean
-
list
public List<Y9Person> list(Boolean disabled)
从接口复制的说明:Y9PersonService查找所有人员- 指定者:
list在接口中Y9PersonService- 参数:
disabled- 是否包含禁用的人员- 返回:
List<Y9Person>
-
listAll
public List<Y9Person> listAll()
从接口复制的说明:Y9PersonService查询所有人员- 指定者:
listAll在接口中Y9PersonService- 返回:
List<Y9Person>
-
listByDisabledAndDeletedAndGuidPathLike
public List<Y9Person> listByDisabledAndDeletedAndGuidPathLike(String guidPath)
从接口复制的说明:Y9PersonService根据guidPath(模糊查询),获取人员列表- 指定者:
listByDisabledAndDeletedAndGuidPathLike在接口中Y9PersonService- 参数:
guidPath- guid路径- 返回:
List<Y9Person>
-
listByGroupId
public List<Y9Person> listByGroupId(String groupId, Boolean disabled)
从接口复制的说明:Y9PersonService根据用户组节点id,获取本组的人员列表- 指定者:
listByGroupId在接口中Y9PersonService- 参数:
groupId- 用户组iddisabled- 是否包含禁用的人员- 返回:
List<Y9Person>
-
listByIdTypeAndIdNum
public List<Y9Person> listByIdTypeAndIdNum(String idType, String idNum, Boolean disabled)
从接口复制的说明:Y9PersonService根据idType和idNum查询- 指定者:
listByIdTypeAndIdNum在接口中Y9PersonService- 参数:
idType- 证件类型idNum- 证件号disabled- 是否已禁用- 返回:
List<Y9Person>
-
listByNameLike
public List<Y9Person> listByNameLike(String name, Boolean disabled)
从接口复制的说明:Y9PersonService根据名称查询- 指定者:
listByNameLike在接口中Y9PersonService- 参数:
name- 姓名disabled- 是否已禁用- 返回:
List<Y9Person>
-
listByParentId
public List<Y9Person> listByParentId(String parentId, Boolean disabled)
从接口复制的说明:Y9PersonService根据父id及禁用状态查询人员- 指定者:
listByParentId在接口中Y9PersonService- 参数:
parentId- 父节点iddisabled- 是否已禁用- 返回:
List<Y9Person>
-
listByPositionId
public List<Y9Person> listByPositionId(String positionId, Boolean disabled)
从接口复制的说明:Y9PersonService根据岗位id,获取人员列表- 指定者:
listByPositionId在接口中Y9PersonService- 参数:
positionId- 岗位iddisabled- 是否已禁用- 返回:
List<Y9Person>
-
listParents
public List<Y9OrgBase> listParents(String personId)
从接口复制的说明:Y9PersonService获取人员的所有父节点
一般只会有一个,一人多账号的情况可能会有多个- 指定者:
listParents在接口中Y9PersonService- 参数:
personId- 人员id- 返回:
List<Y9OrgBase>
-
modifyPassword
@Transactional(readOnly=false) public Y9Person modifyPassword(String personId, String oldPassword, String newPassword)
从接口复制的说明:Y9PersonService修改人员密码- 指定者:
modifyPassword在接口中Y9PersonService- 参数:
personId- 人员idoldPassword- 旧密码newPassword- 新密码- 返回:
Y9Person
-
move
@Transactional(readOnly=false) public Y9Person move(String personId, String parentId)
从接口复制的说明:Y9PersonService移动- 指定者:
move在接口中Y9PersonService- 参数:
personId- 人员idparentId- 父节点id- 返回:
Y9Person
-
order
@Transactional(readOnly=false) public List<Y9OrgBase> order(List<String> personIds)
从接口复制的说明:Y9PersonService按照tabindexs的顺序重新排序人员列表- 指定者:
order在接口中Y9PersonService- 参数:
personIds- 人员id数组- 返回:
List<Y9OrgBase>
-
pageByNameLike
public org.springframework.data.domain.Page<Y9Person> pageByNameLike(String name, net.risesoft.pojo.Y9PageQuery pageQuery)
从接口复制的说明:Y9PersonService按名称分页,如 根据名称模糊查询人员- 指定者:
pageByNameLike在接口中Y9PersonService- 参数:
name- 人员姓名pageQuery- 分页查询参数- 返回:
Page<Y9Person>
-
pageByParentId
public org.springframework.data.domain.Page<Y9Person> pageByParentId(String parentId, boolean disabled, String name, net.risesoft.pojo.Y9PageQuery pageQuery)
从接口复制的说明:Y9PersonService根据父节点id、人员禁用状态及名称模糊查询本部门下人员- 指定者:
pageByParentId在接口中Y9PersonService- 参数:
parentId- 父节点iddisabled- 是否已禁用name- 人员姓名pageQuery- 分页查询参数- 返回:
Page<Y9OrgBase>
-
pageByParentId
public org.springframework.data.domain.Page<Y9Person> pageByParentId(String parentId, boolean disabled, net.risesoft.pojo.Y9PageQuery pageQuery)
从接口复制的说明:Y9PersonService根据父节点查询,本部门下的人员- 指定者:
pageByParentId在接口中Y9PersonService- 参数:
parentId- 父节点iddisabled- 是否已禁用pageQuery- 分页信息- 返回:
Page<Y9Person>
-
resetDefaultPassword
@Transactional(readOnly=false) public void resetDefaultPassword(String personId)
从接口复制的说明:Y9PersonService重置默认密码- 指定者:
resetDefaultPassword在接口中Y9PersonService- 参数:
personId- 人员id
-
save
@Transactional(readOnly=false) public Y9Person save(Y9Person person)
从接口复制的说明:Y9PersonService保存人员- 指定者:
save在接口中Y9PersonService- 参数:
person- 人员对象- 返回:
Y9Person
-
saveAvator
@Transactional(readOnly=false) public Y9Person saveAvator(String personId, String avatorUrl)
从接口复制的说明:Y9PersonService保存人员头像- 指定者:
saveAvator在接口中Y9PersonService- 参数:
personId- 人员idavatorUrl- 头像路径- 返回:
Y9Person
-
saveOrUpdate
@Transactional(readOnly=false) public Y9Person saveOrUpdate(Y9Person person, Y9PersonExt personExt)
从接口复制的说明:Y9PersonService保存或者修改此岗位的信息- 指定者:
saveOrUpdate在接口中Y9PersonService- 参数:
person- 人员对象personExt- 人员扩展信息对象- 返回:
Y9Person
-
saveOrUpdate
@Transactional(readOnly=false) public Y9Person saveOrUpdate(Y9Person person, Y9PersonExt ext, List<String> positionIds, List<String> jobIds)
从接口复制的说明:Y9PersonService保存或更新- 指定者:
saveOrUpdate在接口中Y9PersonService- 参数:
person- 人员对象ext- 人员扩展信息对象positionIds- 岗位id列表 用于关联已有岗位jobIds- 职位id列表 通过职位新增岗位关联- 返回:
Y9Person
-
saveOrUpdate4ImpOrg
@Transactional(readOnly=false) public Y9Person saveOrUpdate4ImpOrg(Y9Person person, Y9PersonExt personExt)
从接口复制的说明:Y9PersonService保存或者修改此人员的信息(用于导入y9导出的组织机构:密码是什么就导入什么不做处理)- 指定者:
saveOrUpdate4ImpOrg在接口中Y9PersonService- 参数:
person- 人员对象personExt- 人员扩展信息- 返回:
Y9Person
-
saveProperties
@Transactional(readOnly=false) public Y9Person saveProperties(String personId, String properties)
从接口复制的说明:Y9PersonService保存或者更新人员扩展信息- 指定者:
saveProperties在接口中Y9PersonService- 参数:
personId- 人员idproperties- 扩展属性- 返回:
Y9Person
-
saveWeixinId
@Transactional(readOnly=false) public Y9Person saveWeixinId(String personId, String weixinId)
从接口复制的说明:Y9PersonService修改微信 id- 指定者:
saveWeixinId在接口中Y9PersonService- 参数:
personId- 人员 idweixinId- 微信 id- 返回:
Y9Person
-
updateTabIndex
@Transactional(readOnly=false) public Y9Person updateTabIndex(String id, int tabIndex)
从接口复制的说明:Y9PersonService更新排序序列号- 指定者:
updateTabIndex在接口中Y9PersonService- 参数:
id- 人员idtabIndex- 排序序列号- 返回:
Y9Person
-
onParentDepartmentDeleted
@EventListener @Transactional(readOnly=false) public void onParentDepartmentDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Department> event)
-
onParentOrganizationDeleted
@EventListener @Transactional(readOnly=false) public void onParentOrganizationDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Organization> event)
-
onParentUpdated
@EventListener @Transactional(readOnly=false) public void onParentUpdated(net.risesoft.y9.pubsub.event.Y9EntityUpdatedEvent<? extends Y9OrgBase> event)
-
-