| | |
| | | public ResultUtil<List<CompetitionListVo>> queryCompetitionList(String cityCode, String content, Integer registerCondition, String heat){ |
| | | try { |
| | | List<CompetitionListVo> competitionListVos = cttService.queryCompetitionList(cityCode, content, registerCondition, heat); |
| | | return ResultUtil.success(competitionListVos); |
| | | List<CompetitionListVo> filteredList = competitionListVos.stream() |
| | | .filter(vo -> vo.getStatus() == 1 || vo.getStatus() == 2) |
| | | .collect(Collectors.toList()); |
| | | |
| | | return ResultUtil.success(filteredList); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | CompetitionInfo competitionInfo = cttService.queryCompetitionInfo(uid, id, lon, lat); |
| | | |
| | | |
| | | String dateString = competitionInfo.getRegisterEndTime(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | Date date = sdf.parse(dateString); |
| | | if (new Date().after(date)){ |
| | | competitionInfo.setHasPass(1); |
| | | }else { |
| | | competitionInfo.setHasPass(0); |
| | | |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success(competitionInfo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | if (byId.getRegisterCondition()==3){ |
| | | Integer counts = coursePackagePaymentClient.isHave(uid); |
| | | Integer counts = coursePackagePaymentClient.isHave(paymentCompetitionVo.getIds()); |
| | | if (counts==0){ |
| | | return new ResultUtil(0,"当前赛事仅限已购课学员报名"); |
| | | } |