use of com.easy.cloud.core.operator.sysrole.pojo.query.SysRoleQuery in project dq-easy-cloud by dq-open-cloud.
the class SysRoleServiceImpl method findByUserId.
@Override
public List<SysRoleDTO> findByUserId(Long userId) {
if (EcBaseUtils.isNull(userId)) {
throw new EcBaseBusinessException("A_11111111", "用户编号不能为空");
}
SysRoleQuery query = new SysRoleQuery();
query.setUserId(userId);
List<SysRoleEntity> sysRoleEntities = sysRoleDAO.listByQuery(query);
if (EcCollectionsUtils.isEmpty(sysRoleEntities)) {
return new ArrayList<>();
}
return EcJSONUtils.parseArray(sysRoleEntities, SysRoleDTO.class);
}
Aggregations