| | |
| | | }
|
| | |
|
| | | private static List<DaTaoKeDetail> parseCurrent(String url) {
|
| | | |
| | | List<DaTaoKeDetail> list=new ArrayList<>();
|
| | | try {
|
| | | Document doc = Jsoup.connect(url)
|
| | | .userAgent(
|
| | |
| | | .getElementsByTag("b").get(0).text();
|
| | |
|
| | | System.out.println(id + "-" + currentSale);
|
| | | DaTaoKeDetail detail=new DaTaoKeDetail();
|
| | | detail.setId(id);
|
| | | detail.setSalesNum(Integer.parseInt(currentSale));
|
| | | list.add(detail);
|
| | |
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // TODO 需要返回值
|
| | | return null;
|
| | | return list;
|
| | | }
|
| | |
|
| | | // 获取实时榜单
|
| | |
| | | * @param cid
|
| | | * @return
|
| | | */
|
| | | public static List<DaTaoKeDetail> getCurrentSalesRank(Long cid) {
|
| | | public static List<DaTaoKeDetail> getCurrentSalesRank(Integer cid) {
|
| | | String url = null;
|
| | | if (cid == null)
|
| | | url = "http://www.dataoke.com/top_sell";
|
| | |
| | | * @param cid
|
| | | * @return
|
| | | */
|
| | | public static List<DaTaoKeDetail> getCurrentDaySalesRank(Long cid) {
|
| | | public static List<DaTaoKeDetail> getCurrentDaySalesRank(Integer cid) {
|
| | | String url = null;
|
| | | if (cid == null)
|
| | | url = "http://www.dataoke.com/top_all";
|