|
|
@ -2,20 +2,16 @@ package com.huoran.competition.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.huoran.api.NakadaiClient; |
|
|
|
import com.huoran.api.NakadaiClient; |
|
|
|
import com.huoran.api.UserClient; |
|
|
|
import com.huoran.api.UserClient; |
|
|
|
import com.huoran.common.aop.annotation.NoRepeatSubmit; |
|
|
|
import com.huoran.common.aop.annotation.NoRepeatSubmit; |
|
|
|
import com.huoran.common.constant.DelConstant; |
|
|
|
|
|
|
|
import com.huoran.common.response.R; |
|
|
|
import com.huoran.common.response.R; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.competition.entity.*; |
|
|
|
import com.huoran.competition.entity.*; |
|
|
|
import com.huoran.competition.entity.req.AfterLoginPageCompetitionListReq; |
|
|
|
import com.huoran.competition.entity.req.AfterLoginPageCompetitionListReq; |
|
|
|
import com.huoran.competition.entity.req.CompetitionDetailReq; |
|
|
|
|
|
|
|
import com.huoran.competition.entity.req.DisableEnableCompetitionReq; |
|
|
|
import com.huoran.competition.entity.req.DisableEnableCompetitionReq; |
|
|
|
import com.huoran.competition.entity.req.PageCompetitionListReq; |
|
|
|
import com.huoran.competition.entity.req.PageCompetitionListReq; |
|
|
|
import com.huoran.competition.entity.vo.CompetitionDetailsVO; |
|
|
|
|
|
|
|
import com.huoran.competition.entity.vo.CompetitionVO; |
|
|
|
import com.huoran.competition.entity.vo.CompetitionVO; |
|
|
|
import com.huoran.competition.service.*; |
|
|
|
import com.huoran.competition.service.*; |
|
|
|
import com.huoran.competition.service.impl.CompetitionContentServiceImpl; |
|
|
|
import com.huoran.competition.service.impl.CompetitionContentServiceImpl; |
|
|
@ -32,7 +28,6 @@ import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.concurrent.Future; |
|
|
|
import java.util.concurrent.Future; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
@ -162,8 +157,6 @@ public class CompetitionController { |
|
|
|
competition.setApplicantNum(competitionRegistrationService.registrationPopulation(competitionId)); |
|
|
|
competition.setApplicantNum(competitionRegistrationService.registrationPopulation(competitionId)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (registration != null) { |
|
|
|
if (registration != null) { |
|
|
|
CompetitionTeam team = competitionTeamService.getById(registration.getTeamId()); |
|
|
|
CompetitionTeam team = competitionTeamService.getById(registration.getTeamId()); |
|
|
|
if (team != null) { |
|
|
|
if (team != null) { |
|
|
@ -324,6 +317,10 @@ public class CompetitionController { |
|
|
|
if (!ObjectUtils.isEmpty(accountId)) { |
|
|
|
if (!ObjectUtils.isEmpty(accountId)) { |
|
|
|
pageCompetitionListReq.setSchoolId(schoolId); |
|
|
|
pageCompetitionListReq.setSchoolId(schoolId); |
|
|
|
pageCompetitionListReq.setAccountId(Integer.valueOf(accountId)); |
|
|
|
pageCompetitionListReq.setAccountId(Integer.valueOf(accountId)); |
|
|
|
|
|
|
|
Integer role = Integer.valueOf(competitionService.queryRole(accountId)); |
|
|
|
|
|
|
|
if (!ObjectUtils.isEmpty(role)) { |
|
|
|
|
|
|
|
pageCompetitionListReq.setRole(role); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Future<IPage<CompetitionVO>> pageFuture = competitionService.competitionAfterLogin(pageCompetitionListReq); |
|
|
|
Future<IPage<CompetitionVO>> pageFuture = competitionService.competitionAfterLogin(pageCompetitionListReq); |
|
|
|
IPage<CompetitionVO> pageList = pageFuture.get(); |
|
|
|
IPage<CompetitionVO> pageList = pageFuture.get(); |
|
|
@ -331,7 +328,6 @@ public class CompetitionController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取当前时间") |
|
|
|
@ApiOperation(value = "获取当前时间") |
|
|
|
@GetMapping("/getCurrentTime") |
|
|
|
@GetMapping("/getCurrentTime") |
|
|
|
public R getCurrentTime() { |
|
|
|
public R getCurrentTime() { |
|
|
|