|
|
@ -10,7 +10,6 @@ import com.huoran.common.response.R; |
|
|
|
import com.huoran.competition.entity.*; |
|
|
|
import com.huoran.competition.entity.*; |
|
|
|
import com.huoran.competition.entity.req.*; |
|
|
|
import com.huoran.competition.entity.req.*; |
|
|
|
import com.huoran.competition.entity.resp.ListOfStageResultsResp; |
|
|
|
import com.huoran.competition.entity.resp.ListOfStageResultsResp; |
|
|
|
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.mapper.*; |
|
|
|
import com.huoran.competition.mapper.*; |
|
|
|
import com.huoran.competition.service.CompetitionService; |
|
|
|
import com.huoran.competition.service.CompetitionService; |
|
|
@ -173,10 +172,10 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe |
|
|
|
|
|
|
|
|
|
|
|
Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); |
|
|
|
Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); |
|
|
|
IPage<CompetitionVO> pageList = baseMapper.backgroundActivityList(page, pageCompetitionListReq); |
|
|
|
IPage<CompetitionVO> pageList = baseMapper.backgroundActivityList(page, pageCompetitionListReq); |
|
|
|
pageList.getRecords().forEach(c->{ |
|
|
|
pageList.getRecords().forEach(c -> { |
|
|
|
if (c.getCompetitionScope().equals("1")){ |
|
|
|
if (c.getCompetitionScope().equals("1")) { |
|
|
|
c.setCompetitionScope("全平台"); |
|
|
|
c.setCompetitionScope("全平台"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
c.setCompetitionScope(baseMapper.obtainPlatformInformation(c.getCompetitionScope())); |
|
|
|
c.setCompetitionScope(baseMapper.obtainPlatformInformation(c.getCompetitionScope())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -217,8 +216,6 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
// @Override
|
|
|
|
// public R competitionAfterLogin1(AfterLoginPageCompetitionListReq pageCompetitionListReq) {
|
|
|
|
// public R competitionAfterLogin1(AfterLoginPageCompetitionListReq pageCompetitionListReq) {
|
|
|
|
// Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize());
|
|
|
|
// Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize());
|
|
|
@ -264,14 +261,14 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe |
|
|
|
Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); |
|
|
|
Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); |
|
|
|
IPage<CompetitionVO> pageList = null; |
|
|
|
IPage<CompetitionVO> pageList = null; |
|
|
|
//读取的列表(0:首页活动/1.已报名活动)
|
|
|
|
//读取的列表(0:首页活动/1.已报名活动)
|
|
|
|
switch (pageCompetitionListReq.getListType()){ |
|
|
|
switch (pageCompetitionListReq.getListType()) { |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
|
//查询未删除且启用发布状态为发布后的
|
|
|
|
//查询未删除且启用发布状态为发布后的
|
|
|
|
baseMapper.foregroundAppletActivityList(page, pageCompetitionListReq); |
|
|
|
pageList = baseMapper.foregroundAppletActivityList(page, pageCompetitionListReq); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|
//查询我报名的列表
|
|
|
|
//查询我报名的列表
|
|
|
|
baseMapper.postRegistrationList(page, pageCompetitionListReq); |
|
|
|
pageList = baseMapper.postRegistrationList(page, pageCompetitionListReq); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -341,7 +338,7 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe |
|
|
|
|
|
|
|
|
|
|
|
if (contentList.size() > 0) { |
|
|
|
if (contentList.size() > 0) { |
|
|
|
|
|
|
|
|
|
|
|
for (CompetitionStage stage: stages) { |
|
|
|
for (CompetitionStage stage : stages) { |
|
|
|
QueryWrapper<CompetitionStageContentSetting> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
QueryWrapper<CompetitionStageContentSetting> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
queryWrapper1.eq("competition_id", contest.getId()); |
|
|
|
queryWrapper1.eq("competition_id", contest.getId()); |
|
|
|
queryWrapper1.eq("stage_id", stage.getStageId()); |
|
|
|
queryWrapper1.eq("stage_id", stage.getStageId()); |
|
|
@ -351,11 +348,11 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe |
|
|
|
stage.setCompetitionStageContentSetting(stageContentSetting); |
|
|
|
stage.setCompetitionStageContentSetting(stageContentSetting); |
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<CompetitionStageFile> queryWrapper2 = new QueryWrapper<>(); |
|
|
|
QueryWrapper<CompetitionStageFile> queryWrapper2 = new QueryWrapper<>(); |
|
|
|
queryWrapper2.eq("competition_id",contest.getId()); |
|
|
|
queryWrapper2.eq("competition_id", contest.getId()); |
|
|
|
queryWrapper2.eq("stage_id", stage.getStageId()); |
|
|
|
queryWrapper2.eq("stage_id", stage.getStageId()); |
|
|
|
queryWrapper2.eq("account_id", 0); |
|
|
|
queryWrapper2.eq("account_id", 0); |
|
|
|
CompetitionStageFile myFile = stageFileService.getOne(queryWrapper2); |
|
|
|
CompetitionStageFile myFile = stageFileService.getOne(queryWrapper2); |
|
|
|
if (!ObjectUtil.isEmpty(myFile)){ |
|
|
|
if (!ObjectUtil.isEmpty(myFile)) { |
|
|
|
stage.setCompetitionStageFile(myFile); |
|
|
|
stage.setCompetitionStageFile(myFile); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|