| New file |
| | |
| | | package com.dsh.communityWorldCup.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class EndWorldCupCallbackDto { |
| | | private String custom; |
| | | private Integer red_score; |
| | | private Integer blue_score; |
| | | } |
| | |
| | | map.put("space_id", tGame.getSiteId() + ""); |
| | | map.put("red_sutu_id", tGame.getRed()); |
| | | map.put("blue_sutu_id", tGame.getBlue()); |
| | | map.put("api_url", "https://online.daowepark.com:443/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | // map.put("api_url", "http://8.137.14.183:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | // map.put("api_url", "https://online.daowepark.com:443/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | map.put("api_url", "http://8.137.22.229:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | |
| | | map.put("custom", jsonObject.toJSONString()); |
| | | |
| | | System.out.println(jsonObject.toJSONString()); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/quickStart", map); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(s); |
| | | Integer code1 = jsonObject1.getInteger("code"); |
| | |
| | | @PostMapping("/editWorldCup") |
| | | public ResultUtil editWorldCup(WorldCup worldCup, String stores){ |
| | | WorldCup worldCup1 = worldCupClient.getWorldCupById(worldCup.getId()); |
| | | if(worldCup1.getStartTime().before(DateUtil.getDate())){ |
| | | return ResultUtil.error("赛事已开始,不能编辑"); |
| | | } |
| | | // if(worldCup1.getStartTime().before(DateUtil.getDate())){ |
| | | // return ResultUtil.error("赛事已开始,不能编辑"); |
| | | // } |
| | | Integer maxPeople = worldCup1.getMaxPeople(); |
| | | int registeredNumber = worldCupClient.getRegisteredNumber(worldCup.getId()); |
| | | if(maxPeople.compareTo(registeredNumber) < 0){ |