|
@@ -7,6 +7,7 @@ import com.liangjiang.price_collection.dto.PriceListDto;
|
|
|
import com.liangjiang.price_collection.service.ITableService;
|
|
import com.liangjiang.price_collection.service.ITableService;
|
|
|
import com.liangjiang.price_collection.utils.DataAssembleTask;
|
|
import com.liangjiang.price_collection.utils.DataAssembleTask;
|
|
|
import com.liangjiang.price_collection.utils.TableQueryTask;
|
|
import com.liangjiang.price_collection.utils.TableQueryTask;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -16,6 +17,7 @@ import java.util.concurrent.Executors;
|
|
|
import java.util.concurrent.Future;
|
|
import java.util.concurrent.Future;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class QueryService {
|
|
public class QueryService {
|
|
|
private final ExecutorService executorService;
|
|
private final ExecutorService executorService;
|
|
@@ -44,6 +46,7 @@ public class QueryService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(CollectionUtil.isEmpty(results)){
|
|
if(CollectionUtil.isEmpty(results)){
|
|
|
|
|
+ log.warn("没有查询到数据");
|
|
|
return PriceListDto.builder().time(new HashSet<>()).values(new LinkedList<>()).build();
|
|
return PriceListDto.builder().time(new HashSet<>()).values(new LinkedList<>()).build();
|
|
|
}
|
|
}
|
|
|
List<Future<ExchangeCoinPriceArrDto>> resultFutures = new LinkedList<>();
|
|
List<Future<ExchangeCoinPriceArrDto>> resultFutures = new LinkedList<>();
|