| | |
| | | package com.nq.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | |
| | | IStockOptionService iStockOptionService; |
| | | @Autowired |
| | | ISiteSettingService iSiteSettingService; |
| | | |
| | | @Resource |
| | | StockTimeSettingMapper stockTimeSettingMapper; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | return ServerResponse.createBySuccess(filteredList); |
| | | } |
| | | |
| | | @Override |
| | | public ServerResponse getExchange() { |
| | | StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type","US")); |
| | | if(stockTimeSetting == null){ |
| | | return ServerResponse.createBySuccess(false); |
| | | } |
| | | if(!stockTimeSetting.getWeekDay().contains(String.valueOf(LocalDate.now().getDayOfWeek().getValue()))){ |
| | | return ServerResponse.createBySuccess(false); |
| | | } |
| | | return ServerResponse.createBySuccess(TimeUtil.isTradingHour(stockTimeSetting.getAmStartTime(),stockTimeSetting.getAmEndTime(),stockTimeSetting.getPmStartTime(),stockTimeSetting.getPmEndTime())); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ServerResponse getOptionStock(HttpServletRequest request) { |