| | |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private CompetitionService competitionService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/competition/paymentCompetition") |
| | | @ApiOperation(value = "赛事报名", tags = {"APP-赛事活动列表"}) |
| | |
| | | }) |
| | | public ResultUtil paymentCompetition(PaymentCompetitionVo paymentCompetitionVo){ |
| | | try { |
| | | |
| | | |
| | | Competition byId = competitionService.getById(paymentCompetitionVo.getId()); |
| | | Date date = byId.getEndTime(); // Assuming you have a Date object |
| | | |
| | | // Check if the date is past the current time |
| | | boolean isPast = date.after(new Date()); |
| | | |
| | | if (!isPast) { |
| | | return new ResultUtil(0,"已超过截至报名时间"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | |
| | | |
| | | |
| | | return cttService.paymentCompetition(uid, paymentCompetitionVo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @PostMapping("/api/participant/queryParticipantList") |
| | | @ApiOperation(value = "获取参赛人员列表", tags = {"APP-赛事活动列表", ""}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "isPre(1过滤)", name = "是否过滤未实名", required = true, dataType = "int") |
| | | }) |
| | | public ResultUtil<List<ParticipantVo>> queryParticipantList(){ |
| | | public ResultUtil<List<ParticipantVo>> queryParticipantList(Integer isPre){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | List<ParticipantVo> participantVos = participantService.queryParticipantList(uid); |
| | | if (isPre!=null){ |
| | | List<ParticipantVo> filteredParticipants = new ArrayList<>(); |
| | | |
| | | for (ParticipantVo participant : participantVos) { |
| | | if (participant.getIdcard() != null && !participant.getIdcard().isEmpty()) { |
| | | filteredParticipants.add(participant); |
| | | } |
| | | } |
| | | return ResultUtil.success(filteredParticipants); |
| | | } |
| | | |
| | | return ResultUtil.success(participantVos); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | @Override |
| | | public List<CompetitionListVo> queryCompetitionList(String cityCode, String content, Integer registerCondition, String heat) throws Exception { |
| | | List<CompetitionListVo> competitionListVos = this.baseMapper.queryCompetitionList(cityCode, content, registerCondition, heat); |
| | | |
| | | |
| | | |
| | | |
| | | return competitionListVos; |
| | | } |
| | | |
| | |
| | | return code; |
| | | } |
| | | |
| | | private ResultUtil(Integer code, String msg) { |
| | | public ResultUtil(Integer code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | |
| | | aa.introduction, |
| | | aa.registerEndTime, |
| | | aa.age, |
| | | aa.heat |
| | | (aa.baseNumber+aa.userCompetitionCount) as heat |
| | | from ( |
| | | select |
| | | a.id, |
| | | a.`name`, |
| | | a.coverDrawing, |
| | | a.city as cityName, |
| | | a.registerCondition, |
| | | a.introduction, |
| | | DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') registerEndTime, |
| | | CONCAT(a.startAge, '-', a.endAge) age, |
| | | (a.baseNumber + a.applicantsNumber) heat |
| | | from t_competition a |
| | | where a.auditStatus = 2 and a.`status` = 2 and a.state = 1 |
| | | SELECT |
| | | a.id, |
| | | a.`name`, |
| | | a.coverDrawing, |
| | | a.city AS cityName, |
| | | a.registerCondition, |
| | | a.introduction, |
| | | DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') AS registerEndTime, |
| | | CONCAT(a.startAge, '-', a.endAge) AS age, |
| | | a.baseNumber, |
| | | COUNT(uc.competitionId) AS userCompetitionCount |
| | | FROM |
| | | t_competition a |
| | | LEFT JOIN |
| | | t_user_competition5 uc ON a.id = uc.competitionId |
| | | WHERE |
| | | a.auditStatus = 2 |
| | | AND a.`status` IN (1, 2) |
| | | AND a.state = 1 |
| | | <if test="null != cityCode and '' != cityCode"> |
| | | and a.cityCode = #{cityCode} |
| | | </if> |
| | |
| | | <if test="null != registerCondition"> |
| | | and a.registerCondition = #{registerCondition} |
| | | </if> |
| | | GROUP BY a.id |
| | | order by a.insertTime desc |
| | | ) as aa |
| | | <if test="null != heat and '' != heat"> |
| | |
| | | |
| | | } |
| | | }); |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").hide() |
| | | } |
| | | |
| | | |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | } |
| | |
| | | } |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |
| | |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <input hidden id="type" value="${type}"> |
| | | <input hidden id="type1" value="${type}"> |
| | | <input hidden id="turnId" value="${data.turnId}"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="img1" value="${data.img}"> |
| | |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").hide() |
| | | } |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | } |
| | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |