| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.communityWorldCup.entity.WorldCup; |
| | | import com.dsh.communityWorldCup.entity.WorldCupCompetitor; |
| | | import com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant; |
| | | import com.dsh.communityWorldCup.entity.WorldCupStore; |
| | | import com.dsh.communityWorldCup.feignclient.account.AppUserClient; |
| | |
| | | @ApiOperation(value = "获取世界杯详情【2.0】", tags = {"APP-社区世界杯"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "世界杯id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<WorldCupInfo> getWorldCupInfo(@RequestBody Integer id){ |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(id); |
| | | public ResultUtil<WorldCupInfo> getWorldCupInfo(@RequestBody Integer id, @RequestBody String lon, @RequestBody String lat){ |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(id, lon, lat); |
| | | return ResultUtil.success(worldCupInfo); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(@RequestBody String id){ |
| | | public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(String id){ |
| | | MyWorldCupInfo myWorldCupInfo = worldCupPaymentParticipantService.getMyWorldCupInfo(id); |
| | | return ResultUtil.success(myWorldCupInfo); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取学员参与数量 |
| | | * @param studentId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/count") |
| | | public Integer count(@RequestBody Integer studentId){ |
| | | return worldCupCompetitorService.count(new QueryWrapper<WorldCupCompetitor>() |
| | | .eq("participantId", studentId).eq("participantType", 1)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取学员世界杯胜利次数 |
| | | * @param studentId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/winCount") |
| | | public Integer winCount(@RequestBody Integer studentId){ |
| | | return worldCupCompetitorService.count(new QueryWrapper<WorldCupCompetitor>() |
| | | .eq("participantId", studentId).eq("participantType", 1).eq("matchResult", 1)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取比赛管理列表数据 |
| | | * @param worldCupListAll |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/getWorldCupListAll") |
| | | public Map<String, Object> getWorldCupListAll(@RequestBody WorldCupListAll worldCupListAll){ |
| | | return worldCupService.getWorldCupListAll(worldCupListAll); |
| | | } |
| | | } |