| | |
| | | import com.nq.Repository.StockRepository; |
| | | import com.nq.dao.StockMapper; |
| | | import com.nq.dao.UserPositionMapper; |
| | | import com.nq.enums.EConfigKey; |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.pojo.*; |
| | | import com.nq.service.ExchangeRateService; |
| | | import com.nq.service.IMandatoryLiquidationService; |
| | | import com.nq.service.IStockService; |
| | | import com.nq.service.IUserPositionService; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | |
| | | private ThreadPoolTaskExecutor taskExecutor; |
| | | @Autowired |
| | | private StockServiceImpl iStockService; |
| | | @Autowired |
| | | private ExchangeRateService exchangeRateService; |
| | | |
| | | /** |
| | | * test |
| | |
| | | //@Scheduled(cron = "0 0/1 * * * ?") |
| | | @Scheduled(cron = "*/5 * * * * *") |
| | | public void test() { |
| | | /*ExchangeRate model = new ExchangeRate(); |
| | | model.setCurrency("MXN"); |
| | | model.setConversionCurrency("USD"); |
| | | model.setRata(BigDecimal.valueOf(0.0520)); |
| | | exchangeRateService.updateRate(model,null);*/ |
| | | |
| | | //iStockService.getStockByType(1, 20, "desc","st" , "US", null); |
| | | //istockService.getIndicesList("US"); |
| | | //istockService.getIndicesAndKData("15882", "US"); |
| | |
| | | stock.setStockCode(o.getId()); |
| | | stock.setStockName(o.getName()); |
| | | stock.setStockType(eStockType.getCode()); |
| | | if (o.getType() == null) { |
| | | stock.setStockGid(eStockType.getCode()); |
| | | } else { |
| | | stock.setStockGid(o.getType()); |
| | | } |
| | | //指数数据类型 |
| | | stock.setStockGid(EConfigKey.INDICES.getCode()); |
| | | stock.setStockSpell(o.getSymbol()); |
| | | stock.setIsLock(0); |
| | | stock.setIsShow(0); |