| | |
| | | import com.yeshi.buwan.service.inter.system.SystemConfigService; |
| | | import com.yeshi.buwan.util.EHCacheManager; |
| | | import com.yeshi.buwan.util.rank.IqiyiRankUtil; |
| | | import com.yeshi.buwan.util.rank.TencentRankUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.AppMarketUtil; |
| | |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | |
| | | //打开华为应用市场的广告 |
| | | //爱奇艺排行 |
| | | @XxlJob("rank-iqiyi-update") |
| | | public ReturnT<String> updateRank(String params) throws Exception { |
| | | public ReturnT<String> updateIqiyiRank(String params) throws Exception { |
| | | Map<String, List<String>> map = IqiyiRankUtil.getRank(10); |
| | | Map<String, List<String>> tencentMap = TencentRankUtil.getRank(10); |
| | | map.put("热搜", tencentMap.get("总榜单")); |
| | | map.put("动漫", tencentMap.get("动漫")); |
| | | if (map != null && map.size() > 0) { |
| | | String json = new Gson().toJson(map); |
| | | systemConfigService.setValue("searchRank", json); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | //爱奇艺排行 |
| | | @XxlJob("rank-tencent-update") |
| | | public ReturnT<String> updateTencentRank(String params) throws Exception { |
| | | Map<String, List<String>> map = TencentRankUtil.getRank(10); |
| | | if (map != null && map.size() > 0) { |
| | | String json = new Gson().toJson(map); |
| | | systemConfigService.setValue("searchRank", json); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |