| | |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.dapp.service.IMallNewsInfoService; |
| | | import cc.mrbird.febs.dapp.soccer.dto.LeaguesApiDto; |
| | | import cc.mrbird.febs.dapp.soccer.entity.SoccerLeagues; |
| | | import cc.mrbird.febs.dapp.soccer.mapper.SoccerLeaguesMapper; |
| | | import cc.mrbird.febs.dapp.vo.MallGoodsListVo; |
| | | import cc.mrbird.febs.dapp.vo.NewsListVo; |
| | | import cc.mrbird.febs.dapp.vo.SimulateDataVo; |
| | |
| | | |
| | | private final DappMemberService dappMemberService; |
| | | private final IMallNewsInfoService newsService; |
| | | private final SoccerLeaguesMapper soccerLeaguesMapper; |
| | | |
| | | @ApiOperation(value = "地址是否存在", notes = "地址是否存在") |
| | | @GetMapping(value = "/exist/{address}") |
| | |
| | | JSONArray jsonArray = JSONUtil.parseArray(responseStr); |
| | | if(CollUtil.isNotEmpty(jsonArray)){ |
| | | for(Object list : jsonArray){ |
| | | JSONObject parseObj1 = JSONUtil.parseObj(list); |
| | | cn.hutool.json.JSONObject parseObj1 = JSONUtil.parseObj(list); |
| | | Object leagueObj = parseObj1.get("league"); |
| | | cn.hutool.json.JSONObject parseObjLeague = JSONUtil.parseObj(leagueObj); |
| | | JSONObject leagueStr = JSONUtil.parseObj(parseObjLeague); |
| | | System.out.println(leagueStr); |
| | | int id = (int)leagueStr.get("id"); |
| | | String type = (String)leagueStr.get("type"); |
| | | String name = (String)leagueStr.get("name"); |
| | | String logo = (String)leagueStr.get("logo"); |
| | | System.out.println(id); |
| | | System.out.println(type); |
| | | System.out.println(name); |
| | | System.out.println(logo); |
| | | |
| | | System.out.println(parseObj1); |
| | | SoccerLeagues soccerLeagues = new SoccerLeagues(); |
| | | soccerLeagues.setLeaguesId(id); |
| | | soccerLeagues.setLeaguesName(name); |
| | | soccerLeagues.setLeaguesType(type); |
| | | soccerLeagues.setLeaguesLogo(logo); |
| | | soccerLeaguesMapper.insert(soccerLeagues); |
| | | } |
| | | } |
| | | System.out.println(jsonArray); |
| | |
| | | if(CollUtil.isNotEmpty(jsonArray)){ |
| | | for(Object list : jsonArray){ |
| | | JSONObject parseObj1 = JSONUtil.parseObj(list); |
| | | Object leagueObj = parseObj1.get("league"); |
| | | JSONObject parseObjLeague = JSONUtil.parseObj(leagueObj); |
| | | JSONObject leagueStr = JSONUtil.parseObj(parseObjLeague); |
| | | System.out.println(leagueStr); |
| | | int id = (int)leagueStr.get("id"); |
| | | String type = (String)leagueStr.get("type"); |
| | | String name = (String)leagueStr.get("name"); |
| | | String logo = (String)leagueStr.get("logo"); |
| | | System.out.println(id); |
| | | System.out.println(type); |
| | | System.out.println(name); |
| | | System.out.println(logo); |
| | | |
| | | System.out.println(parseObj1); |
| | | |
| | | } |
| | | } |
| | | System.out.println(jsonArray); |