| | |
| | | List<DappAKlineEntity> selectListByIds(@Param("min")Long id, @Param("max")Long id1); |
| | | |
| | | DappAKlineEntity selectOneByTypeAsc(); |
| | | |
| | | List<AKLineLimitVo> selectListByTypeAndLimitDesc(@Param("type")int type, @Param("kLineLimit")int kLineLimit); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<AKLineLimitVo> packageKline() { |
| | | return dappAKlineMapper.selectListByTypeAndLimit(2, 30); |
| | | // return dappAKlineMapper.selectListByTypeAndLimit(2, 30); |
| | | List<AKLineLimitVo> akLineLimitVos = dappAKlineMapper.selectListByTypeAndLimitDesc(2, 30); |
| | | List<AKLineLimitVo> sortedList = akLineLimitVos.stream() |
| | | .sorted((k1, k2) -> k1.getCreateTime().compareTo(k2.getCreateTime())) |
| | | .collect(Collectors.toList()); |
| | | return sortedList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | and id <![CDATA[ <= ]]> #{max} |
| | | </select> |
| | | |
| | | <select id="selectListByTypeAndLimitDesc" resultType="cc.mrbird.febs.dapp.vo.AKLineLimitVo"> |
| | | select |
| | | a.open_price openPrice, |
| | | a.create_time createTime |
| | | from dapp_a_kline a |
| | | where a.type = #{type} |
| | | order by a.create_time desc |
| | | limit #{kLineLimit} |
| | | </select> |
| | | |
| | | </mapper> |