/** * @see this#single(String, Object) */ public static QueryParamEntity of(String field, Object value) { return empty().where(field, value); }
/** * 根据查询参数进行查询,参数可使用 {@link Query}进行构建 * * @param param 查询参数 * @return 查询结果 * @see QueryParamEntity * @see QueryParamEntity#newQuery() */ @Override @Transactional(readOnly = true) default List<E> select(Entity param) { if (param == null) { param = QueryParamEntity.empty(); } return getDao().query(param); }
/** * 查询记录总数,用于分页等操作。查询条件同 {@link DefaultQueryByEntityService#select} * * @param param 查询参数 * @return 查询结果,实现mapper中的sql应指定默认值,否则可能抛出异常 * @see QueryParamEntity * @see QueryParamEntity#newQuery() */ @Override @Transactional(readOnly = true) default int count(Entity param) { if (param == null) { param = QueryParamEntity.empty(); } return getDao().count(param); }
@Override public List<String> parse(DimensionContext context,StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-department" + type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }
@Override public List<String> parse(DimensionContext context, StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-org" + type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }
@Override public List<String> parse(DimensionContext context, StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-position"+type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }
/** * 根据查询参数进行查询,参数可使用 {@link Query}进行构建 * * @param param 查询参数 * @return 查询结果 * @see QueryParamEntity * @see QueryParamEntity#newQuery() */ @Override @Transactional(readOnly = true) default List<E> select(Entity param) { if (param == null) { param = QueryParamEntity.empty(); } return getDao().query(param); }
/** * 查询记录总数,用于分页等操作。查询条件同 {@link DefaultQueryByEntityService#select} * * @param param 查询参数 * @return 查询结果,实现mapper中的sql应指定默认值,否则可能抛出异常 * @see QueryParamEntity * @see QueryParamEntity#newQuery() */ @Override @Transactional(readOnly = true) default int count(Entity param) { if (param == null) { param = QueryParamEntity.empty(); } return getDao().count(param); }
@Override public List<String> parse(DimensionContext context, StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-position"+type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }
@Override public List<String> parse(DimensionContext context, StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-org" + type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }
@Override public List<String> parse(DimensionContext context,StrategyConfig config) { String type = config.getConfig("tree") .map(String::valueOf) .map("-"::concat) .orElse(""); return userService.select( empty().noPaging() //https://github.com/hs-web/hsweb-framework/tree/master/hsweb-system/hsweb-system-organizational#sql条件 .where("id", "user-in-department" + type, config.getIdList())) .stream() .map(UserEntity::getId) .collect(Collectors.toList()); } }