| | |
| | | |
| | | |
| | | import com.yami.trading.bean.data.domain.Realtime; |
| | | import com.yami.trading.bean.data.dto.BeforeClose; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface DataDBService { |
| | | /** |
| | |
| | | * 数据库最新的实时价格 |
| | | */ |
| | | public Realtime get(String symbol); |
| | | |
| | | /** |
| | | * 数据库前一天最后价格 |
| | | */ |
| | | public Realtime getBefore(String symbol); |
| | | |
| | | /** |
| | | * 数据库根据时间查询 |
| | | */ |
| | | public BeforeClose getBeforeClose(String symbol, String line, Long ts, Realtime realtime); |
| | | |
| | | /** |
| | | * 缓存数据库前24小时最高最低价格 |
| | | */ |
| | | public void cacheBefore24Hour(String symbol); |
| | | |
| | | /** |
| | | * 批量保存 |
| | |
| | | */ |
| | | List<Realtime> listRealTime60s(String symbol); |
| | | |
| | | public BigDecimal getChangeRatio(Realtime realtime, String symbol); |
| | | } |