| | |
| | | //symbols.add("-1"); |
| | | if (StringUtils.isNotEmpty(symbolType) && StringUtils.isEmptyString(symbol)) { |
| | | //rose 多个币种外汇持仓 |
| | | List<String> types = Splitter.on(",").splitToList(symbolType); |
| | | List<String> symbols = types.stream() |
| | | .flatMap(type -> itemService.findByType(type).stream().map(Item::getSymbol)) |
| | | .collect(Collectors.toList()); |
| | | if (symbolType.contains(",")) { |
| | | List<String> types = Splitter.on(",").splitToList(symbolType); |
| | | List<String> symbols = types.stream() |
| | | .flatMap(type -> itemService.findByType(type).stream().map(Item::getSymbol)) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (symbols.isEmpty()) { |
| | | symbols = itemService.findByType(symbolType).stream().map(Item::getSymbol).collect(Collectors.toList()); |
| | | if (symbols.isEmpty()) { |
| | | symbols = itemService.findByType(symbolType).stream().map(Item::getSymbol).collect(Collectors.toList()); |
| | | } |
| | | |
| | | queryWrapper.in(StringUtils.isNotEmpty(symbolType), "symbol", symbols); |
| | | } |
| | | |
| | | queryWrapper.in(StringUtils.isNotEmpty(symbolType), "symbol", symbols); |
| | | } |
| | | queryWrapper.ge(StringUtils.isNotEmpty(startTime), "date_format(create_time,'%Y-%m-%d')", startTime); |
| | | queryWrapper.le(StringUtils.isNotEmpty(endTime), "date_format(create_time,'%Y-%m-%d')", endTime); |