活动接口更改

main
rong.liu 12 months ago
parent 47d8ba5321
commit 757cf777a5
  1. 2
      competition/src/main/java/com/huoran/competition/config/SwaggerConfig.java
  2. 77
      competition/src/main/java/com/huoran/competition/controller/AuthenticationController.java
  3. 10
      competition/src/main/java/com/huoran/competition/controller/CompetitionAnnexController.java
  4. 4
      competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementAnnexController.java
  5. 12
      competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementController.java
  6. 12
      competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java
  7. 250
      competition/src/main/java/com/huoran/competition/controller/CompetitionController.java
  8. 34
      competition/src/main/java/com/huoran/competition/controller/CompetitionPerformanceController.java
  9. 20
      competition/src/main/java/com/huoran/competition/controller/CompetitionProgressController.java
  10. 14
      competition/src/main/java/com/huoran/competition/controller/CompetitionRangeController.java
  11. 62
      competition/src/main/java/com/huoran/competition/controller/CompetitionRankingController.java
  12. 13
      competition/src/main/java/com/huoran/competition/controller/CompetitionRegistrationController.java
  13. 46
      competition/src/main/java/com/huoran/competition/controller/CompetitionReleaseTimeController.java
  14. 20
      competition/src/main/java/com/huoran/competition/controller/CompetitionRuleController.java
  15. 12
      competition/src/main/java/com/huoran/competition/controller/CompetitionStageController.java
  16. 14
      competition/src/main/java/com/huoran/competition/controller/CompetitionStageFileController.java
  17. 34
      competition/src/main/java/com/huoran/competition/controller/CompetitionTeamController.java
  18. 57
      competition/src/main/java/com/huoran/competition/controller/CompetitionUserDelController.java
  19. 23
      competition/src/main/java/com/huoran/competition/controller/CompleteCompetitionSetupController.java
  20. 4
      competition/src/main/java/com/huoran/competition/controller/TeamInstructorController.java
  21. 12
      competition/src/main/java/com/huoran/competition/controller/TeamParticipantController.java
  22. 30
      competition/src/main/java/com/huoran/competition/entity/CardVerify.java
  23. 79
      competition/src/main/java/com/huoran/competition/entity/Competition.java
  24. 8
      competition/src/main/java/com/huoran/competition/entity/CompetitionAnnex.java
  25. 10
      competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncement.java
  26. 8
      competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncementAnnex.java
  27. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionContent.java
  28. 12
      competition/src/main/java/com/huoran/competition/entity/CompetitionProgress.java
  29. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionRange.java
  30. 8
      competition/src/main/java/com/huoran/competition/entity/CompetitionRanking.java
  31. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionRegistration.java
  32. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionReleaseTime.java
  33. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionRule.java
  34. 16
      competition/src/main/java/com/huoran/competition/entity/CompetitionStage.java
  35. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionStageContentSetting.java
  36. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionStageFile.java
  37. 6
      competition/src/main/java/com/huoran/competition/entity/CompetitionTeam.java
  38. 41
      competition/src/main/java/com/huoran/competition/entity/CompetitionUserDel.java
  39. 8
      competition/src/main/java/com/huoran/competition/entity/CompleteCompetitionSetup.java
  40. 2
      competition/src/main/java/com/huoran/competition/entity/TeamInstructor.java
  41. 4
      competition/src/main/java/com/huoran/competition/entity/TeamParticipant.java
  42. 29
      competition/src/main/java/com/huoran/competition/entity/req/AfterLoginPageCompetitionListReq.java
  43. 4
      competition/src/main/java/com/huoran/competition/entity/req/AllowedParticipateCompetitionReq.java
  44. 2
      competition/src/main/java/com/huoran/competition/entity/req/BatchUploadListCompetitionReq.java
  45. 2
      competition/src/main/java/com/huoran/competition/entity/req/CompetitionContentReq.java
  46. 6
      competition/src/main/java/com/huoran/competition/entity/req/CompetitionDetailReq.java
  47. 2
      competition/src/main/java/com/huoran/competition/entity/req/ContestStageFileReq.java
  48. 2
      competition/src/main/java/com/huoran/competition/entity/req/DelCompetitionRankingReq.java
  49. 2
      competition/src/main/java/com/huoran/competition/entity/req/DetailsOfTotalTeamScoresReq.java
  50. 6
      competition/src/main/java/com/huoran/competition/entity/req/DisableEnableCompetitionReq.java
  51. 4
      competition/src/main/java/com/huoran/competition/entity/req/ExcelImpGradeReq.java
  52. 2
      competition/src/main/java/com/huoran/competition/entity/req/ExcelImpRankReq.java
  53. 6
      competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageRankingReq.java
  54. 4
      competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageTeamScoreDetailsReq.java
  55. 4
      competition/src/main/java/com/huoran/competition/entity/req/FrontStageCompetitionReq.java
  56. 4
      competition/src/main/java/com/huoran/competition/entity/req/IsParticipantReq.java
  57. 2
      competition/src/main/java/com/huoran/competition/entity/req/ManualPublishingParameterReq.java
  58. 2
      competition/src/main/java/com/huoran/competition/entity/req/OverallStandingsInThePointsRaceReq.java
  59. 16
      competition/src/main/java/com/huoran/competition/entity/req/PageCompetitionListReq.java
  60. 4
      competition/src/main/java/com/huoran/competition/entity/req/PageGradeListReq.java
  61. 4
      competition/src/main/java/com/huoran/competition/entity/req/PageRegistrationStaffReq.java
  62. 4
      competition/src/main/java/com/huoran/competition/entity/req/StageRankingReq.java
  63. 2
      competition/src/main/java/com/huoran/competition/entity/req/StageTeamScoreDetailsReq.java
  64. 2
      competition/src/main/java/com/huoran/competition/entity/req/WhetherToPublishParameterReq.java
  65. 4
      competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRangeResp.java
  66. 6
      competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRuleResp.java
  67. 6
      competition/src/main/java/com/huoran/competition/entity/resp/CompetitionStageFileResp.java
  68. 4
      competition/src/main/java/com/huoran/competition/entity/resp/DetailsOfTotalTeamScoresResp.java
  69. 6
      competition/src/main/java/com/huoran/competition/entity/resp/FrontStageCompetitionResp.java
  70. 4
      competition/src/main/java/com/huoran/competition/entity/resp/OverallEventRankingResp.java
  71. 2
      competition/src/main/java/com/huoran/competition/entity/resp/StageRankingResp.java
  72. 4
      competition/src/main/java/com/huoran/competition/entity/resp/TeamAndLeaderResp.java
  73. 4
      competition/src/main/java/com/huoran/competition/entity/resp/TotalRankingScoreDetailsResp.java
  74. 12
      competition/src/main/java/com/huoran/competition/entity/vo/CompetitionDetailsVO.java
  75. 46
      competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java
  76. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnexMapper.java
  77. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementAnnexMapper.java
  78. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementMapper.java
  79. 21
      competition/src/main/java/com/huoran/competition/mapper/CompetitionMapper.java
  80. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionProgressMapper.java
  81. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionRangeMapper.java
  82. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionRankingMapper.java
  83. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionRegistrationMapper.java
  84. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionReleaseTimeMapper.java
  85. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionRuleMapper.java
  86. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionStageContentSettingMapper.java
  87. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionStageFileMapper.java
  88. 2
      competition/src/main/java/com/huoran/competition/mapper/CompetitionStageMapper.java
  89. 7
      competition/src/main/java/com/huoran/competition/mapper/CompetitionTeamMapper.java
  90. 16
      competition/src/main/java/com/huoran/competition/mapper/CompetitionUserDelMapper.java
  91. 2
      competition/src/main/java/com/huoran/competition/mapper/CompleteCompetitionSetupMapper.java
  92. 151
      competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml
  93. 5
      competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionUserDelMapper.xml
  94. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionAnnexService.java
  95. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementAnnexService.java
  96. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementService.java
  97. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionProgressService.java
  98. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionRangeService.java
  99. 2
      competition/src/main/java/com/huoran/competition/service/CompetitionRankingService.java
  100. 4
      competition/src/main/java/com/huoran/competition/service/CompetitionRegistrationService.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -59,7 +59,7 @@ public class SwaggerConfig {
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("赛事微服务接口文档")
.title("活动微服务接口文档")
.description("cheney")
.contact("developer@mail.com")
.version("1.0")

@ -0,0 +1,77 @@
/*
package com.huoran.competition.controller;
import com.alibaba.fastjson.JSONObject;
import com.huoran.common.aop.annotation.NoRepeatSubmit;
import com.huoran.common.response.R;
import com.huoran.competition.entity.CardVerify;
import com.huoran.competition.entity.CompetitionAnnex;
import com.huoran.competition.service.CompetitionAnnexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@Api(tags = "kindergarten-实名认证")
@RestController
@RequestMapping("/authentication")
public class AuthenticationController {
//实名认证接口
@PostMapping("/cardVerify")
public R cardVerify(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
//获取token
String token = request.getHeader("Authorization");
//根据token获取用户名
String username = JwtUtil.getUsername(token);
//根据username查询用户详情
User user = userService.findByUsername(username);
//获取前段传值
String name = jsonObject.getStr("name");//姓名
String card = jsonObject.getStr("card");//身份证号
String frontImg = jsonObject.getStr("frontImg");//前照片
String backImg = jsonObject.getStr("backImg");//后照片
//调用验证接口
CardVerify cardVerify = CardVerifyUtil.cardVerify(frontImg, backImg);
//判断code
switch (cardVerify.getCode()) {
case "FP00000":
//如果输入的身份证和姓名与身份证照片不一致
if (!name.equals(cardVerify.getName())) {
System.out.println(cardVerify.getMessage());
return RestResponse.fail("输入的姓名与身份证上的姓名不一致");
}
if (!card.equals(cardVerify.getIdCardNo())) {
System.out.println(cardVerify.getMessage());
return RestResponse.fail("输入的身份证号与身份证上的不一致");
}
user.setCard(cardVerify.getIdCardNo());
user.setName(cardVerify.getName());
userService.revised(user);
System.out.println(cardVerify.getMessage());
return RestResponse.success("认证成功");
case "10000":
System.out.println(cardVerify.getMessage());
return RestResponse.fail("系统后端错误,请联系管理员");
case "KYC2010":
System.out.println(cardVerify.getMessage());
return RestResponse.fail("上传的图片不合格");
case "FP03333":
System.out.println(cardVerify.getMessage());
return RestResponse.fail("请按要求输入或采集上传准确信息");
case "FP09008":
System.out.println(cardVerify.getMessage());
return RestResponse.fail("处理失败,请求参数验证失败,请联系管理员");
default:
break;
}
System.out.println(cardVerify.getMessage());
return RestResponse.success("认证成功");
}
}
*/

@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.*;
/**
* <p>
* 赛事附件表 前端控制器
* 活动附件表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事附件管理")
@Api(tags = "kindergarten-活动附件管理")
@RestController
@RequestMapping("/competition/annex")
public class CompetitionAnnexController {
@ -28,21 +28,21 @@ public class CompetitionAnnexController {
private CompetitionAnnexService competitionAnnexService;
@NoRepeatSubmit
@PostMapping("/update")
@ApiOperation(value = "编辑赛事附件",response = CompetitionAnnex.class)
@ApiOperation(value = "编辑活动附件",response = CompetitionAnnex.class)
public R update(@RequestBody CompetitionAnnex competitionAnnex) {
boolean update = competitionAnnexService.updateById(competitionAnnex);
return update ? R.ok() : R.error();
}
@NoRepeatSubmit
@PostMapping("/save")
@ApiOperation(value = "新增赛事附件",response = CompetitionAnnex.class)
@ApiOperation(value = "新增活动附件",response = CompetitionAnnex.class)
public R save(@RequestBody CompetitionAnnex competitionAnnex) {
boolean save = competitionAnnexService.save(competitionAnnex);
return save ? R.ok() : R.error();
}
@NoRepeatSubmit
@PostMapping("/delete")
@ApiOperation(value = "删除赛事附件",response = CompetitionAnnex.class)
@ApiOperation(value = "删除活动附件",response = CompetitionAnnex.class)
public R delete(@RequestParam("id") @ApiParam(name = "id", value = "附件id", required = true) Integer id) {
boolean del = competitionAnnexService.removeById(id);
return del ? R.ok() : R.error();

@ -17,13 +17,13 @@ import java.util.List;
/**
* <p>
* 赛事公告附件表 前端控制器
* 活动公告附件表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事公告附件管理")
@Api(tags = "kindergarten-活动公告附件管理")
@RestController
@RequestMapping("/competition/announcementAnnex")
public class CompetitionAnnouncementAnnexController {

@ -21,13 +21,13 @@ import java.util.List;
/**
* <p>
* 赛事公告表 前端控制器
* 活动公告表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事公告管理")
@Api(tags = "kindergarten-活动公告管理")
@RestController
@RequestMapping("/competition/announcement")
public class CompetitionAnnouncementController {
@ -36,7 +36,7 @@ public class CompetitionAnnouncementController {
public CompetitionAnnouncementService service;//公告
@Autowired
public CompetitionAnnouncementAnnexService annexService;//大赛公告附件
public CompetitionAnnouncementAnnexService annexService;//活动公告附件
@PostMapping("/queryAnnouncementDetails")
@ -64,7 +64,7 @@ public class CompetitionAnnouncementController {
if (competitionAnnouncement.getAnnouncementAnnexList().size() > 0) {
competitionAnnouncement.getAnnouncementAnnexList().forEach(competitionAnnex -> {
competitionAnnex.setAnnouncementId(competitionAnnouncement.getId());
boolean saveCompetitionAnnex = annexService.save(competitionAnnex);//保存比赛附件
boolean saveCompetitionAnnex = annexService.save(competitionAnnex);//保存活动附件
});
}
return save ? R.ok() : R.error();
@ -103,9 +103,9 @@ public class CompetitionAnnouncementController {
@PostMapping("/queryAnnouncementByCompetitionId")
@ApiOperation(value = "根据赛事id查询公告列表(分页)",response = CompetitionAnnouncement.class)
@ApiOperation(value = "根据活动id查询公告列表(分页)",response = CompetitionAnnouncement.class)
public R queryAnnouncementByCompetitionId(
@RequestParam("competitionId") @ApiParam(value = "赛事id") String competitionId,
@RequestParam("competitionId") @ApiParam(value = "活动id") String competitionId,
@ApiParam(value = "当前页数", required = true) @RequestParam("pageNum") Integer pageNum,
@ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize) {
return service.queryAnnouncementByCompetitionId(competitionId, pageNum, pageSize);

@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事內容管理")
@Api(tags = "kindergarten-活动內容管理")
@RestController
@RequestMapping("/competition/content")
public class CompetitionContentController {
@ -30,15 +30,15 @@ public class CompetitionContentController {
@Autowired
private CompetitionContentService competitionContentService;
@NoRepeatSubmit
@ApiOperation(value = "添加赛事内容")
@ApiOperation(value = "添加活动内容")
@PostMapping("/addCompetitionContent")
public R addCompetitionContent(
@ApiParam(name = "competitionContent", value = "赛事内容对象", required = true)
@ApiParam(name = "competitionContent", value = "活动内容对象", required = true)
@RequestBody CompetitionContentReq contentReq) {
return competitionContentService.addCompetitionContent(contentReq);
}
@ApiOperation(value = "根据赛事id查询赛事内容")
@ApiOperation(value = "根据活动id查询活动内容")
@GetMapping("/getCompetitionContent")
public R getCompetitionContent(
@ApiParam(name = "competitionId" , value = "賽事id")
@ -46,10 +46,10 @@ public class CompetitionContentController {
return competitionContentService.getCompetitionContent(competitionId);
}
@NoRepeatSubmit
@ApiOperation(value = "编辑赛事内容")
@ApiOperation(value = "编辑活动内容")
@PostMapping("/editCompetitionContent")
public R editCompetitionContent(
@ApiParam(name = "competitionContent", value = "赛事内容对象", required = true)
@ApiParam(name = "competitionContent", value = "活动内容对象", required = true)
@RequestBody CompetitionContentReq contentReq) {
return competitionContentService.editCompetitionContent(contentReq);
}

@ -1,7 +1,6 @@
package com.huoran.competition.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -10,10 +9,12 @@ import com.huoran.api.UserClient;
import com.huoran.common.aop.annotation.NoRepeatSubmit;
import com.huoran.common.constant.DelConstant;
import com.huoran.common.response.R;
import com.huoran.common.utils.DateUtils;
import com.huoran.common.utils.TokenUtils;
import com.huoran.competition.entity.*;
import com.huoran.competition.entity.req.*;
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.PageCompetitionListReq;
import com.huoran.competition.entity.vo.CompetitionDetailsVO;
import com.huoran.competition.entity.vo.CompetitionVO;
import com.huoran.competition.service.*;
@ -23,9 +24,9 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.script.ScriptException;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
@ -35,13 +36,13 @@ import java.util.concurrent.TimeUnit;
/**
* <p>
* 赛事信息表 前端控制器
* 活动信息表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事信息管理")
@Api(tags = "kindergarten-活动信息管理")
@RestController
@RequestMapping("/competition/management")
public class CompetitionController {
@ -87,74 +88,69 @@ public class CompetitionController {
@Autowired
private NakadaiClient nakadaiClient;
@NoRepeatSubmit
@ApiOperation(value = "创建赛事")
@ApiOperation(value = "创建活动")
@PostMapping("/addCompetition")
public R addCompetition(@ApiParam(name = "Competition", value = "赛事对象", required = true) @RequestBody Competition competition, HttpServletRequest request) {
public R addCompetition(@ApiParam(name = "Competition", value = "活动对象", required = true) @RequestBody Competition competition, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
competition.setSchoolId(schoolId);
competition.setFounderId(Integer.valueOf(accountId));
competition.setFounderName(userClient.getUserName(Integer.valueOf(accountId)));
return competitionService.addCompetition(competition);
}
@NoRepeatSubmit
@ApiOperation(value = "修改赛事")
@ApiOperation(value = "修改活动")
@PostMapping("/editCompetition")
public R editCompetition(@ApiParam(name = "competition", value = "赛事对象", required = true) @RequestBody Competition competition) {
boolean update = competitionService.updateById(competition);
public R editCompetition(@ApiParam(name = "competition", value = "活动对象", required = true) @RequestBody Competition competition) {
//赛事类型为完整赛事,更新其他信息
if (competition.getCompleteCompetitionSetup() != null) {
completeCompetitionSetupService.updateById(competition.getCompleteCompetitionSetup());
}
QueryWrapper<CompetitionAnnex> annexUpdateWrapper = new QueryWrapper<>();
annexUpdateWrapper.eq("competition_id", competition.getId());
competitionAnnexService.remove(annexUpdateWrapper);
if (competition.getCompetitionScope() == 2) {
if (competition.getCompetitionRangeList().size() > 0) {
//1.首先删除原有的大赛范围选择
UpdateWrapper<CompetitionRange> annexUpdateWrapper = new UpdateWrapper<>();
annexUpdateWrapper.set("is_del", DelConstant.IS_DEL);
annexUpdateWrapper.eq("Competition_id", competition.getId());
boolean delCompetitionAnnex = competitionRangeService.update(new CompetitionRange(), annexUpdateWrapper);
//2.重新保存比赛范围
competition.getCompetitionRangeList().forEach(CompetitionRange -> {
CompetitionRange.setCompetitionId(competition.getId());
boolean saveCompetitionRange = competitionRangeService.save(CompetitionRange);//保存比赛范围
});
}
if (competition.getCompetitionAnnexList().size() > 0) {
competition.getCompetitionAnnexList().forEach(competitionAnnex -> {
competitionAnnex.setCompetitionId(competition.getId());
competitionAnnexService.save(competitionAnnex); // Save competition annex
});
}
boolean update = competitionService.updateById(competition);
return update ? R.ok() : R.error();
}
@NoRepeatSubmit
@ApiOperation(value = "根据id删除赛事")
@ApiOperation(value = "根据id删除活动")
@PostMapping("/deleteCompetition")
public R deleteCompetition(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId) {
//删除赛事下的定时
public R deleteCompetition(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId) {
//删除活动下的定时
competitionReleaseTimeService.remove(new QueryWrapper<CompetitionReleaseTime>().eq("competition_id", competitionId));
boolean remove = competitionService.removeCompetition(competitionId);
return remove ? R.ok() : R.error();
}
@NoRepeatSubmit
@ApiOperation(value = "批量删除赛事")
@ApiOperation(value = "批量删除活动")
@PostMapping("/batchDeleteCompetition")
public R deleteCompetition(@ApiParam(name = "competitionIds", value = "赛事ID", required = true) @RequestParam List<Integer> competitionIds) {
public R deleteCompetition(@ApiParam(name = "competitionIds", value = "活动ID", required = true) @RequestParam List<Integer> competitionIds) {
competitionIds.forEach(competitionId -> {
//删除赛事下的定时
//删除活动下的定时
competitionReleaseTimeService.remove(new QueryWrapper<CompetitionReleaseTime>().eq("competition_id", competitionId));
competitionService.removeCompetition(competitionId);
});
return R.ok();
}
@ApiOperation(value = "根据id查询赛事", response = Competition.class)
@ApiOperation(value = "根据id查询活动", response = Competition.class)
@PostMapping("/getCompetition")
public R getCompetition(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam("competitionId") String competitionId, HttpServletRequest request) {
public R getCompetition(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam("competitionId") String competitionId, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Competition competition = competitionService.getById(competitionId);
// 查询赛事报名表
// 查询活动报名表
QueryWrapper<CompetitionRegistration> wrapper = new QueryWrapper<>();
wrapper.eq("competition_id", competitionId);
wrapper.eq("account_id", accountId);
@ -172,35 +168,36 @@ public class CompetitionController {
competition.setCompetitionRegistration(registration);
List<CompetitionAnnex> CompetitionAnnexList = competitionAnnexService.getCompetitionAnnexByCompetitionId(competitionId);
List<CompetitionRange> CompetitionRangeList = competitionRangeService.getCompetitionRangeByCompetitionId(competitionId);
if (CompetitionRangeList.size() > 0) {
/*if (CompetitionRangeList.size() > 0) {
competition.setCompetitionRangeList(CompetitionRangeList);
}
}*/
if (CompetitionAnnexList.size() > 0) {
competition.setCompetitionAnnexList(CompetitionAnnexList);
}
if (competition.getCompetitionScope() == 1) {
//活动范围(1:全平台 5:幼儿园,6:供应商)
/*if (competition.getCompetitionScope() == 1) {
competition.setRange("全平台");
} else if (competition.getCompetitionScope() == 2) {
competition.setRange("指定范围");
//依据赛事id查询指定范围的省、市、学校
competition.setCompetitionRangeRespList(competitionRangeService.getRangeByCompetitionId(competition.getId()));
}
} else if (competition.getCompetitionScope() == 5) {
competition.setRange("幼儿园");
}else if (competition.getCompetitionScope() == 6) {
competition.setRange("供应商");
}*/
// if (competition.getReleaseType()==1){
QueryWrapper<CompleteCompetitionSetup> setupQueryWrapper = new QueryWrapper<>();
/*QueryWrapper<CompleteCompetitionSetup> setupQueryWrapper = new QueryWrapper<>();
setupQueryWrapper.eq("competition_id", competitionId);
CompleteCompetitionSetup competitionSetup = completeCompetitionSetupService.getOne(setupQueryWrapper);
competition.setCompleteCompetitionSetup(competitionSetup);
competition.setCompleteCompetitionSetup(competitionSetup);*/
QueryWrapper<CompetitionRule> ruleQueryWrapper = new QueryWrapper<>();
/* QueryWrapper<CompetitionRule> ruleQueryWrapper = new QueryWrapper<>();
ruleQueryWrapper.eq("setup_id", competitionSetup.getSetupId());
CompetitionRule one = competitionRuleService.getOne(ruleQueryWrapper);
if (one != null) {
competition.setRule(one.getRule());
}
}*/
// }
//查询赛事阶段内容数据
/* //查询活动阶段内容数据
List<CompetitionStage> stages = competitionService.queryCompetitionStage(competitionId, accountId);
@ -232,135 +229,71 @@ public class CompetitionController {
}
}
}*/
return R.ok().put("competition", competition);
}
@NoRepeatSubmit
@ApiOperation(value = "发布赛事")
@ApiOperation(value = "发布活动")
@PostMapping("/publishCompetition")
public R publishCompetition(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam("competitionId") Integer competitionId, @ApiParam(name = "publishStatus", value = "发布状态", required = true) @RequestParam("publishStatus") Integer publishStatus) {
public R publishCompetition(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam("competitionId") Integer competitionId, @ApiParam(name = "publishStatus", value = "发布状态", required = true) @RequestParam("publishStatus") Integer publishStatus) {
Competition getDetail = competitionService.getById(competitionId);
getDetail.setPublishStatus(publishStatus);
getDetail.setZtOpen(0);
/* getDetail.setZtOpen(0);*/
boolean ret = competitionService.updateById(getDetail);
return ret ? R.ok() : R.error();
}
@NoRepeatSubmit
@ApiOperation(value = "赛事禁启用", response = CompetitionRange.class)
@ApiOperation(value = "活动禁启用", response = CompetitionRange.class)
@PostMapping("/disabledEvents")
public R disabledEvents(@RequestBody DisableEnableCompetitionReq req) {
Competition getDetail = competitionService.getById(req.getCompetitionId());
Competition competition = new Competition();
competition.setId(req.getCompetitionId());
//禁用平台来源(0中台,1职站)
switch (req.getType()) {
case 0:
competition.setZtOpen(req.getIsOpen());
break;
case 1:
//原型需求:
// 客户创建的大赛,禁用时职站首页以及学生登录后的大赛模块看不到对应的比赛,创建的老师在大赛管理还是可以看到该大赛,可以编辑,但是无法启用。
// 即中台禁用的大赛,即使是该院校老师创建的,老师端也不能自己启用,需要中台启用。
//1.判断当前院校禁启用状态为要启用时候再判断当前赛事中台禁启用的状态
if (req.getIsOpen() == 0) {
if (getDetail.getZtOpen() == 1) {
return R.error("当前赛事已被平台禁用,请联系平台管理员!");
}
}
competition.setIsOpen(req.getIsOpen());
break;
competition.setIsOpen(req.getIsOpen());
}
boolean ret = competitionService.updateById(competition);
//保存的key名
String key = "competitionDisabled";
//保存到缓存中
redisTemplate.opsForValue().set(key, "true");
boolean ret = competitionService.updateById(competition);
return ret ? R.ok() : R.error();
}
@PostMapping("/getRedisCache")
@ApiOperation(value = "获取Redis缓存(返回true 刷新)")
public R getRedisCache() {
//保存的key名
String key = "competitionDisabled";
//查看缓存是否有数据
String returnValue = redisTemplate.opsForValue().get(key);
//使用缓存返回数据
if (returnValue != null) {
//设置key过期时间
redisTemplate.expire(key, 5000, TimeUnit.MILLISECONDS);//设置过期时间
return R.ok().put("data", returnValue);
}
return R.ok();
}
@ApiOperation(value = "赛事样例数据")
@PostMapping("/eventSampleData")
public boolean eventSampleData(@RequestParam("accountId") @ApiParam(value = "账号id") Integer accountId, @RequestParam("schoolId") @ApiParam(value = "学校id") Integer schoolId) {
Competition competition = new Competition();
competition.setFounderId(accountId);
competition.setName("样例赛事");
competition.setCoverUrl("https://huoran.oss-cn-shenzhen.aliyuncs.com/20220509/png/1523606505516457984.png");
competition.setCarouselUrl("https://huoran.oss-cn-shenzhen.aliyuncs.com/20220310/png/1501818796133343232.png");
competition.setSponsor("主办方");
competition.setUndertaker("承办方");
competition.setDescription("样例赛事,仅供参考!");
competition.setPublishStatus(1);
competition.setPlayStartTime(DateUtils.getDateByDay(15));
competition.setPlayEndTime(DateUtils.getDateByDay(18));
competition.setSignUpStartTime(new Date());
competition.setSignUpEndTime(DateUtils.getDateByDay(10));
competition.setSchoolId(schoolId);
competition.setPlatformSource(1);//平台来源(0:中台,1:职站)
competition.setCompetitionScope(0);//大赛范围(0:本校内 1:全平台 2:指定区域、院校)
return competitionService.save(competition);
}
@ApiOperation(value = "职站——赛事列表(教师端赛事管理)")
/* @ApiOperation(value = "职站——活动列表(教师端活动管理)")
@PostMapping("/competitionPageConditionQueryByOccupationlab")
public R CompetitionPageConditionQueryByOccupationlab(@RequestBody PageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
pageCompetitionListReq.setSchoolId(schoolId);
if (!accountId.equals("")) {
if (!ObjectUtils.isEmpty(accountId)) {
pageCompetitionListReq.setAccountId(Integer.valueOf(accountId));
}
return competitionService.competitionPageConditionQueryByOccupationlab(pageCompetitionListReq);
}
}*/
@ApiOperation(value = "中台——赛事列表分页条件查询(赛事广场)")
@PostMapping("/competitionPageConditionQueryByNakadai")
public R competitionPageConditionQueryByNakadai(@RequestBody PageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) {
return competitionService.competitionPageConditionQueryByNakadai(pageCompetitionListReq);
@ApiOperation(value = "后台活动列表")
@PostMapping("/backgroundActivityList")
public R backgroundActivityList(@RequestBody PageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) {
return competitionService.backgroundActivityList(pageCompetitionListReq);
}
@ApiOperation(value = "查询赛事状态(返回为false时表示当前赛事在教师端已禁用)")
@ApiOperation(value = "查询活动状态(返回为false时表示当前活动在教师端已禁用)")
@PostMapping("/checkTheStatusOfTheCompetition")
public boolean checkTheStatusOfTheCompetition(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam String competitionId) {
public boolean checkTheStatusOfTheCompetition(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam String competitionId) {
Competition competition = competitionService.getById(competitionId);
//是否开启(0开启 1未开启 默认0)
return competition.getIsOpen() != 1;
}
@ApiOperation(value = "职站(学生端)——登录前竞赛", response = CompetitionVO.class)
/* @ApiOperation(value = "职站(学生端)——登录前活动", response = CompetitionVO.class)
@PostMapping("/notLoggedInBeforeStudentEvents")
public R notLoggedInBeforeStudentEvents(@RequestBody PageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) throws ExecutionException, InterruptedException {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
if (!accountId.equals("")) {
if (!ObjectUtils.isEmpty(accountId)) {
pageCompetitionListReq.setSchoolId(schoolId);
pageCompetitionListReq.setAccountId(Integer.valueOf(accountId));
} else {
@ -368,61 +301,34 @@ public class CompetitionController {
}
Future<IPage<CompetitionVO>> pageFuture = competitionService.notLoggedInBeforeStudentEvents(pageCompetitionListReq);
IPage<CompetitionVO> pageList = pageFuture.get();
return R.ok().put("data",pageList);
return R.ok().put("data", pageList);
}
@ApiOperation(value = "职站(学生端)——登录后竞赛", response = CompetitionVO.class)
@PostMapping("/competitionAfterLogin")
public R competitionAfterLogin(@RequestBody AfterLoginPageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) throws ExecutionException, InterruptedException {
*/
@ApiOperation(value = "小程序—登录后活动", response = CompetitionVO.class)
@PostMapping("/postLoginActivity")
public R postLoginActivity(@RequestBody AfterLoginPageCompetitionListReq pageCompetitionListReq, HttpServletRequest request) throws ExecutionException, InterruptedException {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
if (!accountId.equals("")) {
if (!ObjectUtils.isEmpty(accountId)) {
pageCompetitionListReq.setSchoolId(schoolId);
pageCompetitionListReq.setAccountId(Integer.valueOf(accountId));
}
Future<IPage<CompetitionVO>> pageFuture = competitionService.competitionAfterLogin(pageCompetitionListReq);
IPage<CompetitionVO> pageList = pageFuture.get();
return R.ok().put("data",pageList);
return R.ok().put("data", pageList);
}
@ApiOperation(value = "大赛阶段详情", response = CompetitionDetailsVO.class)
@PostMapping("/detailsOfCompetitionStage")
public R detailsOfCompetitionStage(@RequestBody CompetitionDetailReq req, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
return competitionService.detailsOfCompetitionStage(req);
}
@ApiOperation(value = "是否允许参加赛事(淘汰赛制)", response = CompetitionDetailsVO.class)
@PostMapping("/allowedParticipateCompetition")
public R allowedParticipateCompetition(@RequestBody AllowedParticipateCompetitionReq req, HttpServletRequest request) throws ScriptException {
String accountId = TokenUtils.getIdByJwtToken(request);
req.setAccountId(accountId);
return competitionService.allowedParticipateCompetition(req);
}
@ApiOperation(value = "是否为参赛人员(团队赛)", response = CompetitionDetailsVO.class)
@PostMapping("/isParticipant")
public R isParticipant(@RequestBody IsParticipantReq req, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
req.setAccountId(accountId);
return competitionService.isParticipant(req);
}
@ApiOperation(value = "获取当前时间")
@GetMapping("/getCurrentTime")
public R getCurrentTime() {
return R.ok().put("currentTime",new Date());
return R.ok().put("currentTime", new Date());
}
// @XxlJob("competitionStop")
// public void competitionStop() {
// //通知收卷
// nakadaiClient.refreshPageNotification("系统通知","all","1");
// }
}

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -29,7 +30,7 @@ import java.util.List;
import java.util.Map;
@Api(tags = "赛事成绩管理")
@Api(tags = "kindergarten-活动成绩管理")
@RestController
@RequestMapping("/competition/performance")
public class CompetitionPerformanceController {
@ -43,8 +44,8 @@ public class CompetitionPerformanceController {
@NoRepeatSubmit
@PostMapping("/batchImportGrades")
@ApiOperation("批量导入大赛成绩")
public R batchImportGrades(@ApiParam(name = "file", value = "文件", required = true) @RequestParam(name = "file") MultipartFile file, @ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, @ApiParam(name = "stageId", value = "赛事阶段id", required = true) @RequestParam Integer stageId, HttpServletRequest request) throws IOException {
@ApiOperation("批量导入活动成绩")
public R batchImportGrades(@ApiParam(name = "file", value = "文件", required = true) @RequestParam(name = "file") MultipartFile file, @ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, @ApiParam(name = "stageId", value = "活动阶段id", required = true) @RequestParam Integer stageId, HttpServletRequest request) throws IOException {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
if (systemId == null) {
@ -62,15 +63,17 @@ public class CompetitionPerformanceController {
}
/**
* 比赛方式0实操1理论2线下
* 依据赛事比赛方式查询数据为线下时查询分数表其余查实验报告表
*/
/**
* 活动方式0实操1理论2线下
* 依据活动活动方式查询数据为线下时查询分数表其余查实验报告表
* <p>
* 已删除的实验报告不计入统计中
*
* @param req
* @return
*/
*//*
@ApiOperation(value = "阶段成绩管理", response = ListOfStageResultsResp.class)
@PostMapping("/stageGradeManagementList")
public R stageGradeManagementList(@RequestBody PageGradeListReq req) {
@ -83,14 +86,14 @@ public class CompetitionPerformanceController {
}
@NoRepeatSubmit
@ApiOperation(value = "批量赛事导出实验成绩")
@ApiOperation(value = "批量活动导出实验成绩")
@PostMapping("/exportExperimentalResultsInBatch")
public void exportExperimentalResultsInBatch(@RequestBody List<GradeExportVO> list, HttpServletResponse response) throws IOException {
userScoreService.exportExperimentalResultsInBatch(list, response);
}
@ApiOperation(value = "赛事导出全部实验成绩")
@ApiOperation(value = "活动导出全部实验成绩")
@PostMapping("/allExperimentalResultsAreDerived")
public void allExperimentalResultsAreDerived(@RequestBody PageGradeListReq req, HttpServletResponse response) throws IOException {
List<GradeExportVO> list = new ArrayList<>();
@ -113,16 +116,18 @@ public class CompetitionPerformanceController {
}
/**
* 比赛方式0实操1理论2线下
* 依据赛事比赛方式删除数据为线下时删除分数表数据其余删除实验报告表数据
*/
/**
* 活动方式0实操1理论2线下
* 依据活动活动方式删除数据为线下时删除分数表数据其余删除实验报告表数据
* <p>
* 已删除的实验报告不计入统计中
*
* @param
* @return
*/
@ApiOperation(value = "删除赛事成绩")
*//*
@ApiOperation(value = "删除活动成绩")
@PostMapping("/batchDeleteContestGrade")
public R deleteContest(@RequestBody PageGradeListReq req) {
CompetitionStage competitionStage = competitionStageService.getById(req.getStageId());
@ -142,3 +147,4 @@ public class CompetitionPerformanceController {
}
*/

@ -17,13 +17,13 @@ import java.util.List;
/**
* <p>
* 赛事进展表 前端控制器
* 活动进展表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事进展管理")
@Api(tags = "kindergarten-活动进展管理")
@RestController
@RequestMapping("/competition/progress")
public class CompetitionProgressController {
@ -31,21 +31,21 @@ public class CompetitionProgressController {
@Autowired
private CompetitionProgressService competitionProgressService;
@NoRepeatSubmit
@ApiOperation(value = "添加竞赛进展")
@ApiOperation(value = "添加活动进展")
@PostMapping("/addCompetitionProgress")
public R addCompetitionProgress(
@ApiParam(name = "competitionProgress", value = "竞赛进展对象", required = true)
@ApiParam(name = "competitionProgress", value = "活动进展对象", required = true)
@RequestBody CompetitionProgress competitionProgress) {
//判重
boolean isRepeat = competitionProgressService.repeat(competitionProgress);
if (isRepeat) {
return R.error("竞赛进展已存在");
return R.error("活动进展已存在");
}
boolean save = competitionProgressService.save(competitionProgress);
return save ? R.ok() : R.error();
}
@ApiOperation(value = "根据赛事id查询竞赛进展")
@ApiOperation(value = "根据活动id查询活动进展")
@GetMapping("/getCompetitionProgress")
public R getCompetitionProgress(
@ApiParam(name = "competitionId" , value = "賽事id")
@ -56,19 +56,19 @@ public class CompetitionProgressController {
return R.ok().put("competitionProgressList", competitionProgressList);
}
@NoRepeatSubmit
@ApiOperation(value = "根据id删除竞赛进展")
@ApiOperation(value = "根据id删除活动进展")
@DeleteMapping("/deleteCompetitionProgress")
public R deleteCompetitionProgress(
@ApiParam(name = "competitionProgressId", value = "竞赛进展ID", required = true)
@ApiParam(name = "competitionProgressId", value = "活动进展ID", required = true)
@RequestParam Integer competitionProgressId) {
boolean remove = competitionProgressService.removeById(competitionProgressId);
return remove ? R.ok() : R.error();
}
@NoRepeatSubmit
@ApiOperation(value = "修改竞赛进展")
@ApiOperation(value = "修改活动进展")
@PutMapping("/editCompetitionProgress")
public R editCompetitionProgress(
@ApiParam(name = "competitionProgress", value = "赛事进展对象", required = true)
@ApiParam(name = "competitionProgress", value = "活动进展对象", required = true)
@RequestBody CompetitionProgress competitionProgress) {
boolean update = competitionProgressService.updateById(competitionProgress);
return update ? R.ok() : R.error();

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -18,15 +19,17 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
*/
/**
* <p>
* 赛事范围表 前端控制器
* 活动范围表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(value = "赛事范围管理")
*//*
@Api(value = "活动范围管理")
@RestController
@RequestMapping("/competition/range")
public class CompetitionRangeController {
@ -34,12 +37,12 @@ public class CompetitionRangeController {
@Autowired
private CompetitionRangeService competitionRangeService;
@ApiOperation(value = "查询赛事指定范围内学校")
@ApiOperation(value = "查询活动指定范围内学校")
@GetMapping("/schoolsInCompetitionArea")
public R schoolsInCompetitionArea(
@ApiParam(name = "competitionId" , value = "賽事id")
@RequestParam("competitionId") String competitionId) {
//赛事范围(0:本校内 1:全平台 2.指定区域、院校)
//活动范围(0:本校内 1:全平台 2.指定区域、院校)
QueryWrapper<CompetitionRange> wrapper = new QueryWrapper<>();
wrapper.eq("competition_id",competitionId);
List<CompetitionRange> list = competitionRangeService.list(wrapper);
@ -64,3 +67,4 @@ public class CompetitionRangeController {
}
*/

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -37,7 +38,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "赛事排名管理")
@Api(tags = "kindergarten-活动排名管理")
@RestController
@RequestMapping("/competition/rank")
public class CompetitionRankingController {
@ -57,13 +58,15 @@ public class CompetitionRankingController {
@Autowired
private CompetitionReleaseTimeService timeService;
/**
*/
/**
* 2023-11-30更改需求阶段用时以及总分排名用时更改:如下
* 算法应该跟比赛规则一样比如阶段取最高分用时就是最高分的人的时间此处规则是团队的成绩之和因此用时也应该按成员的用时之和来算
* 算法应该跟活动规则一样比如阶段取最高分用时就是最高分的人的时间此处规则是团队的成绩之和因此用时也应该按成员的用时之和来算
* 总排名的用时如果是积分赛有权重的也要加上权重去算出耗时如果别的阶段没有录入耗时的默认对应阶段全体耗时为0
* @param req
* @return
*/
*//*
@ApiOperation(value = "中台积分赛总排名")
@PostMapping("/overallStandingsInThePointsRace")
public R overallStandingsInThePointsRace(@RequestBody OverallStandingsInThePointsRaceReq req) {
@ -90,10 +93,10 @@ public class CompetitionRankingController {
@ApiOperation(value = "阶段赛事排名(基础/单个阶段的排名)")
@ApiOperation(value = "阶段活动排名(基础/单个阶段的排名)")
@PostMapping("/stageRaceRanking")
public R stageRaceRanking(
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam Integer competitionId,
@ApiParam(name = "stageId", value = "阶段ID", required = true)
@RequestParam Integer stageId,
@ -175,13 +178,13 @@ public class CompetitionRankingController {
@PostMapping("/batchImportRanking")
@ApiOperation("手动发布排名(批量上传Excel)")
public R batchImportRanking(@ApiParam(name = "file", value = "文件", required = true) @RequestParam(name = "file") MultipartFile file,
@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId,
@ApiParam(name = "stageId", value = "赛事阶段id", required = true) @RequestParam Integer stageId,
@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId,
@ApiParam(name = "stageId", value = "活动阶段id", required = true) @RequestParam Integer stageId,
@ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking,
@ApiParam(name = "schoolId", value = "学校id", required = false) @RequestParam Integer schoolId,
HttpServletRequest request) throws IOException {
String accountId = TokenUtils.getIdByJwtToken(request);
//查看赛事类型是个人赛还是团队赛事
//查看活动类型是个人赛还是团队活动
CompleteCompetitionSetup competitionSetup = completeCompetitionSetupService.getRaceSettingsByRaceId(competitionId);
Map<String, Object> map = new HashMap<>();
switch (competitionSetup.getCompetitionType()) {
@ -200,18 +203,20 @@ public class CompetitionRankingController {
@ApiOperation(value = "批量导入排名管理失败数据导出")
@GetMapping("/exportFailure")
public void exportFailureRecord(HttpServletResponse response, @ApiParam(name = "exportCode", value = "batchImportRanking接口返回的exportCode", required = true) @RequestParam String exportCode, @ApiParam(name = "exportCode", value = "大赛id", required = true) @RequestParam Integer competitionId) throws Exception {
public void exportFailureRecord(HttpServletResponse response, @ApiParam(name = "exportCode", value = "batchImportRanking接口返回的exportCode", required = true) @RequestParam String exportCode, @ApiParam(name = "exportCode", value = "活动id", required = true) @RequestParam Integer competitionId) throws Exception {
rankingService.exportFailureRecord(response, exportCode, competitionId);
}
/**
*/
/**
* 成绩是设置规则多少小时候公布排名是发布就有排名
*
* @param req
* @return
*/
@ApiOperation(value = "前台大赛排名")
*//*
@ApiOperation(value = "前台活动排名")
@PostMapping("/frontOfficeCompetitionRanking")
public R frontOfficeCompetitionRanking(@RequestBody FrontDeskStageTeamScoreDetailsReq req, HttpServletRequest request) {
String id = TokenUtils.getIdByJwtToken(request);
@ -231,11 +236,13 @@ public class CompetitionRankingController {
}
/*@ApiOperation(value = "前台竞赛阶段")
*/
/*@ApiOperation(value = "前台活动阶段")
@PostMapping("/frontStageCompetition")
public R frontStageCompetition(@RequestBody FrontStageCompetitionReq req) {
return R.ok(rankingService.frontStageCompetition(req));
}*/
}*//*
@ApiOperation(value = "前台积分赛总排名(前台展示的是中台发布后的)")
@ -256,7 +263,7 @@ public class CompetitionRankingController {
@ApiOperation(value = "取消排名")
@PostMapping("/cancelRanking")
public R cancelRanking(
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam Integer competitionId,
@ApiParam(name = "stageIds", value = "多个阶段Id", required = true)
@RequestParam List<Integer> stageIds,
@ -298,7 +305,7 @@ public class CompetitionRankingController {
@ApiOperation(value = "判断是否发布过排名没有(返回whetherToPublish:TRUE为已经发布过 FALSE未发布)")
@PostMapping("/whetherToPublish")
public R whetherToPublish(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id", required = true) @RequestParam Integer stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "publicationType", value = "发布类型(0默认发布 1批量手动导入)", required = true) @RequestParam Integer publicationType) {
public R whetherToPublish(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id", required = true) @RequestParam Integer stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "publicationType", value = "发布类型(0默认发布 1批量手动导入)", required = true) @RequestParam Integer publicationType) {
QueryWrapper<CompetitionRanking> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("competition_id", competitionId);
queryWrapper.eq("stage_id", stageId);
@ -313,7 +320,8 @@ public class CompetitionRankingController {
}
/**
*/
/**
* 需求如下:
* 发布前要提示默认排序已发布是否要取消默认排序的发布内容替换为手动发布的内容
*
@ -321,10 +329,11 @@ public class CompetitionRankingController {
* @param stageId
* @param isOverallRanking
* @return
*/
*//*
@ApiOperation(value = "点击发布时校验(丢redis中判断)")
@PostMapping("/releaseVerification")
public R releaseVerification(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "whetherToManuallyPublish", value = "是否手动发布(1为是 0不是)", required = true) @RequestParam Integer whetherToManuallyPublish) {
public R releaseVerification(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "whetherToManuallyPublish", value = "是否手动发布(1为是 0不是)", required = true) @RequestParam Integer whetherToManuallyPublish) {
ValueOperations<String, String> opsForString = redisTemplate.opsForValue();
//保存的key名
@ -337,7 +346,7 @@ public class CompetitionRankingController {
@ApiOperation(value = "查询发布上一次排名的来源——>默认顺序或者手动发布(返回数据:是否手动发布(1为是,0不是))")
@PostMapping("/queryPublicationSource")
public R queryPublicationSource(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking) {
public R queryPublicationSource(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking) {
ValueOperations<String, String> opsForString = redisTemplate.opsForValue();
//保存的key名
String key = "releaseVerification:competitionId:" + competitionId + "stageId:" + stageId + "isOverallRanking:" + isOverallRanking;
@ -359,11 +368,13 @@ public class CompetitionRankingController {
}
/* @ApiOperation(value = "手动上传的列表")
*/
/* @ApiOperation(value = "手动上传的列表")
@PostMapping("/manuallyRankTheUploadList")
public R whetherToPublish(@RequestBody BatchUploadListCompetitionReq req) {
return rankingService.manuallyRankTheUploadList(req);
}*/
}*//*
@ApiOperation(value = "后台手动上传的排名(不论发布还是没有发布的)", response = ListOfStageResultsResp.class)
@PostMapping("/manuallyUploadedRankings")
@ -375,7 +386,7 @@ public class CompetitionRankingController {
@ApiOperation(value = "更换选中排序方式(丢redis中)")
@PostMapping("/toggleTheSortingMode")
public R toggleTheSortingMode(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "whetherToManuallyPublish", value = "是否手动发布(1为是 0不是)", required = true) @RequestParam Integer whetherToManuallyPublish) {
public R toggleTheSortingMode(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking, @ApiParam(name = "whetherToManuallyPublish", value = "是否手动发布(1为是 0不是)", required = true) @RequestParam Integer whetherToManuallyPublish) {
ValueOperations<String, String> opsForString = redisTemplate.opsForValue();
//保存的key名
String key = "toggleTheSortingMode:competitionId:" + competitionId + "stageId:" + stageId + "isOverallRanking:" + isOverallRanking;
@ -393,7 +404,7 @@ public class CompetitionRankingController {
@ApiOperation(value = "返回选中上次排序状态(丢redis中)/返回的数据source为:(0默认 1手动)")
@PostMapping("/selectTheLastSortStatus")
public R selectTheLastSortStatus(@ApiParam(name = "competitionId", value = "赛事ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking) {
public R selectTheLastSortStatus(@ApiParam(name = "competitionId", value = "活动ID", required = true) @RequestParam Integer competitionId, @ApiParam(name = "stageId", value = "阶段Id(字符串类型 可传多个且以逗号隔开)", required = true) @RequestParam String stageId, @ApiParam(name = "isOverallRanking", value = "是否为总分排名(1为是 默认0不是)", required = true) @RequestParam Integer isOverallRanking) {
ValueOperations<String, String> opsForString = redisTemplate.opsForValue();
//保存的key名
String key = "toggleTheSortingMode:competitionId:" + competitionId + "stageId:" + stageId + "isOverallRanking:" + isOverallRanking;
@ -408,3 +419,4 @@ public class CompetitionRankingController {
}
*/

@ -21,13 +21,13 @@ import java.util.List;
/**
* <p>
* 赛事报名人员表 前端控制器
* 活动报名人员表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事报名人员管理")
@Api(tags = "kindergarten-活动报名人员管理")
@RestController
@RequestMapping("/competition/registration")
public class CompetitionRegistrationController {
@ -40,7 +40,7 @@ public class CompetitionRegistrationController {
public R disableRegistration(
@ApiParam(name = "competitionRegistrationId", value = "报名人员id", required = true)
@RequestParam Integer competitionRegistrationId,
@ApiParam(name = "isDisable", value = "是否禁用", required = true)
@ApiParam(name = "isDisable", value = "是否禁用", required = true)
@RequestParam Integer isDisable) {
CompetitionRegistration competitionRegistration = new CompetitionRegistration();
competitionRegistration.setId(competitionRegistrationId);
@ -48,8 +48,9 @@ public class CompetitionRegistrationController {
boolean update = competitionRegistrationService.updateById(competitionRegistration);
return update ? R.ok() : R.error();
}
@NoRepeatSubmit
@ApiOperation(value = "个人赛事报名")
@ApiOperation(value = "个人活动报名")
@PostMapping("/addCompetitionRegistration")
public R addCompetitionRegistration(
@ApiParam(name = "competitionRegistration", value = "报名人员对象", required = true)
@ -87,7 +88,7 @@ public class CompetitionRegistrationController {
@ApiOperation(value = "导出全部数据", response = RegistrationVO.class)
@GetMapping("/excelExport")
public void excelExport(
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam("competitionId") String competitionId, HttpServletResponse response) {
try {
PageRegistrationStaffReq req = new PageRegistrationStaffReq();
@ -111,7 +112,7 @@ public class CompetitionRegistrationController {
@ApiOperation(value = "取消报名")
@PostMapping(value = "/cancelRegistration")
public R cancelRegistration(
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam("competitionId") String competitionId, HttpServletRequest request) throws Exception {
String accountId = TokenUtils.getIdByJwtToken(request);
return competitionRegistrationService.cancelRegistration(competitionId, Integer.valueOf(accountId));

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -24,15 +25,17 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
*/
/**
* <p>
* 赛事排名定时发布表 前端控制器
* 活动排名定时发布表 前端控制器
* </p>
*
* @author cheney
* @since 2023-05-30
*/
@Api(tags = "赛事排名定时管理")
*//*
@Api(tags = "kindergarten-活动排名定时管理")
@RestController
@RequestMapping("/competitionReleaseTime")
public class CompetitionReleaseTimeController {
@ -46,7 +49,7 @@ public class CompetitionReleaseTimeController {
@Autowired
private CompetitionStageService stagService;
@ApiOperation(value = "添加赛事阶段排名定时")
@ApiOperation(value = "添加活动阶段排名定时")
@PostMapping("/addCompetitionStageRankingTime")
public R addCompetitionStageRankingTime(
@ApiParam(name = "competitionReleaseTime", value = "事阶段排名定时", required = true)
@ -59,7 +62,9 @@ public class CompetitionReleaseTimeController {
}
queryWrapper.eq("competition_id", competitionReleaseTime.getCompetitionId());
/* queryWrapper.eq("publication_type", competitionReleaseTime.getPublicationType());*/
*/
/* queryWrapper.eq("publication_type", competitionReleaseTime.getPublicationType());*//*
queryWrapper.eq("is_overall_ranking", competitionReleaseTime.getIsOverallRanking());
queryWrapper.eq("is_del", DelConstant.NOT_DEL);
CompetitionReleaseTime releaseTime = competitionReleaseTimeService.getOne(queryWrapper);
@ -79,7 +84,7 @@ public class CompetitionReleaseTimeController {
return save ? R.ok() : R.error();
}
@ApiOperation(value = "获取赛事阶段排名定时")
@ApiOperation(value = "获取活动阶段排名定时")
@PostMapping("/getCompetitionStageRankingTime")
public R getCompetitionStageRankingTime(
@ApiParam(name = "competitionReleaseTime", value = "事阶段排名定时", required = true)
@ -94,12 +99,12 @@ public class CompetitionReleaseTimeController {
return R.ok().put("releaseTime", one);
}
@ApiOperation(value = "取消赛事阶段排名定时")
@ApiOperation(value = "取消活动阶段排名定时")
@PostMapping("/cancelCompetitionStageRankingTime")
public R cancelCompetitionStageRankingTime(
@ApiParam(name = "releaseId", value = "定时id", required = true)
@RequestParam Integer releaseId,
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam Integer competitionId,
@ApiParam(name = "stageId", value = "阶段Id", required = true)
@RequestParam Integer stageId,
@ -120,7 +125,8 @@ public class CompetitionReleaseTimeController {
return remove ? R.ok() : R.error();
}
/* @ApiOperation(value = "定时执行发布排名任务(每分钟自动执行)")
*/
/* @ApiOperation(value = "定时执行发布排名任务(每分钟自动执行)")
// @Scheduled(cron = "0 * * * * ?")
@Scheduled(fixedRate = 30000)
public void publishRankingTasks() throws ScriptException {
@ -134,7 +140,11 @@ public class CompetitionReleaseTimeController {
boolean after = date.after(competitionReleaseTime.getReleaseTime());
//查询排名数据,发布排名
if (after) {
*//*以下处理定时发布总分排名 BEGIN*//*
*//*
*/
/*以下处理定时发布总分排名 BEGIN*//*
*/
/*
if (competitionReleaseTime.getIsOverallRanking() == 1) {
//1.查询当前有待发布的总分排名的数据 判断有没有已经发布过的 有的话删除上一次已经发布的再将本次的发布
QueryWrapper<CompetitionRanking> queryWrapper1 = new QueryWrapper<>();
@ -158,7 +168,11 @@ public class CompetitionReleaseTimeController {
//删除定时的
competitionReleaseTimeService.removeById(competitionReleaseTime.getId());
*//*以下处理定时发布总分排名 END*//*
*//*
*/
/*以下处理定时发布总分排名 END*//*
*/
/*
@ -191,10 +205,12 @@ public class CompetitionReleaseTimeController {
}
}
}
}*/
}*//*
/*@ApiOperation(value = "定时执行发布排名任务(每1秒执行一次)")
*/
/*@ApiOperation(value = "定时执行发布排名任务(每1秒执行一次)")
@Scheduled(fixedRate = 1000)
public void publishRankingTasks() throws ScriptException {
List<CompetitionReleaseTime> list = competitionReleaseTimeService.
@ -210,7 +226,9 @@ public class CompetitionReleaseTimeController {
}
}
}*/
}*//*
}
*/

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -11,15 +12,17 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
*/
/**
* <p>
* 赛事规则表 前端控制器
* 活动规则表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事规则管理")
*//*
@Api(tags = "kindergarten-活动规则管理")
@RestController
@RequestMapping("/competition/rule")
public class CompetitionRuleController {
@ -27,15 +30,15 @@ public class CompetitionRuleController {
@Autowired
private CompetitionRuleService competitionRuleService;
@NoRepeatSubmit
@ApiOperation(value = "添加赛事规则")
@ApiOperation(value = "添加活动规则")
@PostMapping("/addCompetitionRule")
public R addCompetitionRule(
@ApiParam(name = "competitionRule", value = "赛事规则对象", required = true)
@ApiParam(name = "competitionRule", value = "活动规则对象", required = true)
@RequestBody CompetitionRule competitionRule) {
return competitionRuleService.addCompetitionRule(competitionRule);
}
@ApiOperation(value = "根据赛事id查询赛事规则")
@ApiOperation(value = "根据活动id查询活动规则")
@GetMapping("/getCompetitionRule")
public R getCompetitionRule(
@ApiParam(name = "competitionId" , value = "賽事id")
@ -43,13 +46,14 @@ public class CompetitionRuleController {
return competitionRuleService.getCompetitionRule(competitionId);
}
@NoRepeatSubmit
@ApiOperation(value = "编辑赛事规则")
@ApiOperation(value = "编辑活动规则")
@PostMapping("/editCompetitionRule")
public R editCompetitionRule(
@ApiParam(name = "competitionRule", value = "赛事规则对象", required = true)
@ApiParam(name = "competitionRule", value = "活动规则对象", required = true)
@RequestBody CompetitionRule competitionRule) {
return competitionRuleService.editCompetitionRule(competitionRule);
}
}
*/

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -17,15 +18,17 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
*/
/**
* <p>
* 赛事阶段设置表 前端控制器
* 活动阶段设置表 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "赛事阶段设置管理")
*//*
@Api(tags = "kindergarten-活动阶段设置管理")
@RestController
@RequestMapping("/competition/stage")
public class CompetitionStageController {
@ -34,7 +37,7 @@ public class CompetitionStageController {
CompetitionStageService competitionStageService;
@PostMapping("/queryCompetitionStageBySetupId")
@ApiOperation(value = "查询完整赛事阶段数据")
@ApiOperation(value = "查询完整活动阶段数据")
public R queryCompetitionStageBySetupId(@RequestParam Integer setupId) {
return competitionStageService.queryCompetitionStageBySetupId(setupId);
}
@ -42,3 +45,4 @@ public class CompetitionStageController {
}
*/

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
import cn.hutool.core.util.ObjectUtil;
@ -32,14 +33,16 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
*/
/**
* @描述赛事阶段文件控制类
* @描述活动阶段文件控制类
* @作者: Rong
* @日期: 2023-11-13
*/
*//*
@RestController
@RequestMapping("/cCompetitionStageFile")
@Api(value = "赛事阶段文件:CCompetitionStageFileController", tags = "赛事线下阶段文件")
@Api(value = "活动阶段文件:CCompetitionStageFileController", tags = "活动线下阶段文件")
public class CompetitionStageFileController {
@Autowired
@ -67,7 +70,7 @@ public class CompetitionStageFileController {
@PostMapping("/save")
@ApiOperation(value = "新增", response = CompetitionStageFile.class)
public R save(@RequestBody @ApiParam(name = "赛事阶段文件对象", value = "传入json格式", required = true) CompetitionStageFile file, HttpServletRequest request) {
public R save(@RequestBody @ApiParam(name = "活动阶段文件对象", value = "传入json格式", required = true) CompetitionStageFile file, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
file.setAccountId(Integer.valueOf(accountId));
@ -85,7 +88,7 @@ public class CompetitionStageFileController {
@PostMapping("/update")
@ApiOperation(value = "修改", response = CompetitionStageFile.class)
public R update(@RequestBody @ApiParam(name = "赛事阶段文件对象", value = "传入json格式", required = true) CompetitionStageFile file, HttpServletRequest request) {
public R update(@RequestBody @ApiParam(name = "活动阶段文件对象", value = "传入json格式", required = true) CompetitionStageFile file, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
Integer schoolId = userClient.getSchoolIdByAccountId(accountId);
file.setAccountId(Integer.valueOf(accountId));
@ -136,3 +139,4 @@ public class CompetitionStageFileController {
}
}
*/

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -27,15 +28,17 @@ import java.util.Calendar;
import java.util.Date;
import java.util.List;
*/
/**
* <p>
* 赛事团队表 前端控制器
* 活动团队表 前端控制器
* </p>
*
* @author cheney
* @since 2022-12-02
*/
@Api(tags = "赛事团队管理")
*//*
@Api(tags = "kindergarten-活动团队管理")
@RestController
@RequestMapping("/competition/team")
public class CompetitionTeamController {
@ -73,7 +76,7 @@ public class CompetitionTeamController {
}
@NoRepeatSubmit
@PostMapping("/editCompetitionTeam")
@ApiOperation(value = "编辑赛事团队")
@ApiOperation(value = "编辑活动团队")
@Transactional
public R editCompetitionTeam(@RequestBody CompetitionTeam competitionTeam, HttpServletRequest request) {
String accountId = "";
@ -107,7 +110,7 @@ public class CompetitionTeamController {
}
@NoRepeatSubmit
@PostMapping("/addCompetitionTeam")
@ApiOperation(value = "新增赛事团队并报名")
@ApiOperation(value = "新增活动团队并报名")
@Transactional
public R addCompetitionTeam(@RequestBody CompetitionTeam competitionTeam, HttpServletRequest request) throws ParseException {
String accountId = "";
@ -146,10 +149,12 @@ public class CompetitionTeamController {
if (competitionTeam.getWhetherSignUp()==1){
//验证报名邀请码
*/
/* boolean verifyRegistrationCode = this.verifyRegistrationCode(competitionTeam.getCompetitionId(), competitionTeam.getRegistrationInvitationCode());
if (!verifyRegistrationCode && competitionTeam.getIdentification() !=null && competitionTeam.getIdentification()!=1){
throw new CustomException(ExceptionEnum.CODE);
}*/
}*//*
//创建并加入
CompetitionRegistration competitionRegistration = new CompetitionRegistration();
if (competitionTeam.getIdentification() !=null && competitionTeam.getIdentification()==1){
@ -166,7 +171,7 @@ public class CompetitionTeamController {
}
public boolean signingUp(Integer competitionId) throws ParseException {
//查询赛事是否在报名时间,在时间范围内允许加入
//查询活动是否在报名时间,在时间范围内允许加入
Competition competition = competitionService.getById(competitionId);
Date startTime = competition.getSignUpStartTime();
Date endTime = competition.getSignUpEndTime();
@ -183,7 +188,7 @@ public class CompetitionTeamController {
}
public boolean verifyRegistrationCode(Integer competitionId,String registrationInvitationCode) {
//查询赛事设置,验证报名邀请码
//查询活动设置,验证报名邀请码
QueryWrapper<CompleteCompetitionSetup> setupQueryWrapper = new QueryWrapper<>();
setupQueryWrapper.eq("competition_id",competitionId);
CompleteCompetitionSetup setup = completeCompetitionSetupService.getOne(setupQueryWrapper);
@ -199,7 +204,7 @@ public class CompetitionTeamController {
}
@NoRepeatSubmit
@PostMapping("/joinCompetitionTeam")
@ApiOperation(value = "加入赛事团队并报名")
@ApiOperation(value = "加入活动团队并报名")
@Transactional
public R joinCompetitionTeam(@RequestBody CompetitionTeam competitionTeam, HttpServletRequest request) throws ParseException {
String accountId = "";
@ -245,12 +250,12 @@ public class CompetitionTeamController {
return R.error("您已报名加入团队,无法加入其他团队,请退出团队后再加入!");
}
//查询赛事设置
//查询活动设置
QueryWrapper<CompleteCompetitionSetup> setupQueryWrapper = new QueryWrapper<>();
setupQueryWrapper.eq("competition_id",competitionTeam.getCompetitionId());
CompleteCompetitionSetup setup = completeCompetitionSetupService.getOne(setupQueryWrapper);
if (competitionTeam.getIdentification() ==null || competitionTeam.getIdentification() != 1) {
//查询赛事是否在报名时间,在时间范围内允许加入
//查询活动是否在报名时间,在时间范围内允许加入
boolean signingUp = this.signingUp(competitionTeam.getCompetitionId());
if (!signingUp){
return R.error("未在报名时间内!");
@ -309,7 +314,7 @@ public class CompetitionTeamController {
public R removeTheLine(
@ApiParam(name = "teamId", value = "团队ID", required = true)
@RequestParam(value = "teamId") Integer teamId,
@ApiParam(name = "competitionId", value = "赛事id", required = true)
@ApiParam(name = "competitionId", value = "活动id", required = true)
@RequestParam(value = "competitionId") Integer competitionId,
@ApiParam(name = "accountId", value = "账号ID", required = true)
@RequestParam(value = "accountId") Integer accountId) {
@ -347,7 +352,7 @@ public class CompetitionTeamController {
if (name!=null){
//清除缓存
redisService.deleteObject(accountId);
return R.ok().put("prompt","你报名的"+name+"大赛,已被队长踢出队伍,请重新报名加入别的团队!");
return R.ok().put("prompt","你报名的"+name+"活动,已被队长踢出队伍,请重新报名加入别的团队!");
}
return R.ok();
}
@ -355,7 +360,7 @@ public class CompetitionTeamController {
@PostMapping("/entryInformation")
@ApiOperation(value = "用户参赛信息")
public R entryInformation(
@ApiParam(name = "competitionId", value = "赛事ID", required = true)
@ApiParam(name = "competitionId", value = "活动ID", required = true)
@RequestParam Integer competitionId,
@ApiParam(name = "accountId", value = "账号id", required = false)
@RequestParam(required = false) String accountId,
@ -375,3 +380,4 @@ public class CompetitionTeamController {
}
*/

@ -0,0 +1,57 @@
package com.huoran.competition.controller;
import com.huoran.api.UserClient;
import com.huoran.common.response.R;
import com.huoran.common.utils.TokenUtils;
import com.huoran.competition.entity.CompetitionUserDel;
import com.huoran.competition.service.CompetitionUserDelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* <p>
* 记录用户删除的赛事 前端控制器
* </p>
*
* @author cheney
* @since 2023-12-12
*/
/**
* @描述活动范围表控制类
* @作者: Rong
* @日期: 2023-12-11
*/
@RestController
@RequestMapping("/competitionUserDel")
@Api(value = "记录用户删除的赛事:CompetitionUserDelController", tags = "记录用户删除的赛事")
public class CompetitionUserDelController {
@Autowired
public CompetitionUserDelService service;
@Autowired
private UserClient userClient;
@PostMapping("/save")
@ApiOperation(value = "新增", response = CompetitionUserDel.class)
public R save(@RequestBody @ApiParam(name = "用户要删除的赛事记录对象", value = "传入json格式", required = true) CompetitionUserDel activityRange, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request);
activityRange.setAccountId(Integer.valueOf(accountId));
boolean addState = service.save(activityRange);
return addState ? R.ok() : R.error("新增失败");
}
}

@ -1,23 +0,0 @@
package com.huoran.competition.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 完整赛事设置 前端控制器
* </p>
*
* @author cheney
* @since 2022-11-16
*/
@Api(tags = "完整赛事管理")
@RestController
@RequestMapping("/complete/competitionSetup")
public class CompleteCompetitionSetupController {
}

@ -17,13 +17,13 @@ import javax.validation.Valid;
/**
* <p>
* 赛事指导老师表 前端控制器
* 活动指导老师表 前端控制器
* </p>
*
* @author cheney
* @since 2022-12-02
*/
@Api(tags = "赛事指导老师管理")
@Api(tags = "kindergarten-活动指导老师管理")
@RestController
@RequestMapping("/competition/teamInstructor")
public class TeamInstructorController {

@ -1,3 +1,4 @@
/*
package com.huoran.competition.controller;
@ -19,6 +20,7 @@ import javax.validation.Valid;
import java.text.ParseException;
import java.util.List;
*/
/**
* <p>
* 团队阶段参赛人员表 前端控制器
@ -26,7 +28,8 @@ import java.util.List;
*
* @author cheney
* @since 2022-12-05
*/
*//*
@Api(tags = "团队阶段指定参赛人员表")
@RestController
@RequestMapping("/competition/teamParticipant")
@ -41,11 +44,11 @@ public class TeamParticipantController {
@RequestBody @Valid TeamParticipant teamInstructor) throws ParseException {
//后台不传值,学生修改判断修改时间
if (teamInstructor.getPlatformId()!=null && teamInstructor.getPlatformId()==1){
// 查询阶段比赛时间
// 查询阶段活动时间
boolean ok = teamParticipantService.inTheGame(teamInstructor.getStageId());
// 阶段在比赛中不允许修改参数人员
// 阶段在活动中不允许修改参数人员
if (ok){
return R.error("比赛开始无法修改参数人员!");
return R.error("活动开始无法修改参数人员!");
}
}
// 清空之前数据
@ -88,3 +91,4 @@ public class TeamParticipantController {
}
*/

@ -0,0 +1,30 @@
package com.huoran.competition.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实名认证返回参数实体类
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CardVerify {
//状态码
private String code;
//状态信息
private String message;
//性别
private String sex;
//身份证号
private String idCardNo;
//民族
private String nation;
//姓名
private String name;
//出生年月日
private String birth;
//住址
private String address;
}

@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事信息表
* 活动信息表
* </p>
*
* @author cheney
@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition")
@ApiModel(value="Competition对象", description="赛事信息表")
@ApiModel(value="Competition对象", description="活动信息表")
public class Competition implements Serializable {
private static final long serialVersionUID = 1L;
@ -40,13 +40,13 @@ public class Competition implements Serializable {
@ApiModelProperty(value = "创建人名称", example = "张三李四王五")
private String founderName;
@ApiModelProperty(value = "竞赛名称", example = "数据库数据库色即是空")
@ApiModelProperty(value = "活动名称", example = "数据库数据库色即是空")
private String name;
@ApiModelProperty(value = "竞赛封面图", example = "http://localhost:9400/occupationlab/doc.html")
@ApiModelProperty(value = "活动封面图", example = "http://localhost:9400/occupationlab/doc.html")
private String coverUrl;
@ApiModelProperty(value = "竞赛轮播图", example = "http://localhost:9400/occupationlab/doc.html")
@ApiModelProperty(value = "活动轮播图", example = "http://localhost:9400/occupationlab/doc.html")
private String carouselUrl;
@ApiModelProperty(value = "主办方", example = "或然科技")
@ -55,16 +55,16 @@ public class Competition implements Serializable {
@ApiModelProperty(value = "承办方", example = "或然科技")
private String undertaker;
@ApiModelProperty(value = "竞赛描述", example = "或然科技赛事")
@ApiModelProperty(value = "活动描述", example = "或然科技活动")
private String description;
@ApiModelProperty(value = "发布状态(0未发布,1已发布)", example = "0")
private Integer publishStatus;
@ApiModelProperty(value = "竞赛开始时间", example = "2021-09-09 16:24:24")
@ApiModelProperty(value = "活动开始时间", example = "2021-09-09 16:24:24")
private Date playStartTime;
@ApiModelProperty(value = "竞赛结束时间", example = "2021-09-20 16:24:24")
@ApiModelProperty(value = "活动结束时间", example = "2021-09-20 16:24:24")
private Date playEndTime;
@ApiModelProperty(value = "报名开始时间", example = "2021-09-10 16:24:24")
@ -73,24 +73,29 @@ public class Competition implements Serializable {
@ApiModelProperty(value = "报名结束时间", example = "2021-09-20 16:24:24")
private Date signUpEndTime;
@ApiModelProperty(value = "学校id", example = "0")
private Integer schoolId;
@ApiModelProperty(value = "平台来源(0:中台,1:职站)", example = "0")
@ApiModelProperty(value = "平台来源(5:幼儿园,6:供应商)", example = "5")
private Integer platformSource;
@ApiModelProperty(value = "大赛范围(0:本校内 1:全平台 2:指定区域、院校)", example = "0")
private Integer competitionScope;
@ApiModelProperty(value = "中台是否开启(0开启 1未开启 默认0)", example = "0")
private Integer ztOpen;
@ApiModelProperty(value = "活动范围(1:全平台 5:幼儿园,6:供应商)", example = "0")
private String competitionScope;
@ApiModelProperty(value = "是否开启(0开启 1未开启 默认0)", example = "0")
private Integer isOpen;
@ApiModelProperty(value = "发布类型(0发布信息,1完整比赛)默认为0")
@ApiModelProperty(value = "发布类型(0发布信息,1完整活动)默认为0")
private Integer releaseType;
@ApiModelProperty(value = "是否展示报名人员(0否,1是)")
private String whetherToShowApplicants;
@ApiModelProperty(value = "举办地点")
private String reportingPlace;
@ApiModelProperty(value = "创建来源(0默认平台创建)")
private Integer createSource;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@ -99,41 +104,37 @@ public class Competition implements Serializable {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@ApiModelProperty(value = "赛事附件")
@ApiModelProperty(value = "数量上限限制")
private Integer quantityLimit;
@ApiModelProperty(value = "邀请码")
private String invitationCode;
@ApiModelProperty(value = "是否需要邀请码(0不需要,1需要)默认为0")
private Integer isNeedCode;
//======非数据库字段===================
@ApiModelProperty(value = "活动附件")
@TableField(exist = false)
private List<CompetitionAnnex> competitionAnnexList;
@ApiModelProperty(value = "大赛范围选择")
@TableField(exist = false)
private List<CompetitionRange> competitionRangeList;
@ApiModelProperty(value = "比赛内容")
@TableField(exist = false)
private List<CompetitionContent> contentList;
@ApiModelProperty(value = "比赛范围")
@TableField(exist = false)
private String range;
@ApiModelProperty(value = "赛制")
@TableField(exist = false)
private Integer rule;
@ApiModelProperty(value = "比赛范围(省市学校集合)")
@TableField(exist = false)
private List<CompetitionRangeResp> competitionRangeRespList;
@ApiModelProperty(value = "比赛报名信息")
@ApiModelProperty(value = "活动报名信息")
@TableField(exist = false)
private CompetitionRegistration competitionRegistration;
@ApiModelProperty(value = "完整赛事设置信息")
@TableField(exist = false)
private CompleteCompetitionSetup completeCompetitionSetup;
@ApiModelProperty(value = "赛事阶段内容信息")
@TableField(exist = false)
private List<CompetitionStage> competitionStage;
}

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事附件表
* 活动附件表
* </p>
*
* @author cheney
@ -22,16 +22,16 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_annex")
@ApiModel(value="CompetitionAnnex对象", description="赛事附件表")
@ApiModel(value="CompetitionAnnex对象", description="活动附件表")
public class CompetitionAnnex implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "赛事附件主键")
@ApiModelProperty(value = "活动附件主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事主键(c_competition表主键)")
@ApiModelProperty(value = "活动主键(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "文件名称")

@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事公告表
* 活动公告表
* </p>
*
* @author cheney
@ -24,16 +24,16 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_announcement")
@ApiModel(value="CompetitionAnnouncement对象", description="赛事公告表")
@ApiModel(value="CompetitionAnnouncement对象", description="活动公告表")
public class CompetitionAnnouncement implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "赛事公告主键")
@ApiModelProperty(value = "活动公告主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事主键(c_competition表主键)")
@ApiModelProperty(value = "活动主键(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "公告标题")
@ -67,7 +67,7 @@ public class CompetitionAnnouncement implements Serializable {
@TableField(exist = false)
private String founderName;
@ApiModelProperty(value = "大赛公告附件存储集合")
@ApiModelProperty(value = "活动公告附件存储集合")
@TableField(exist = false)
private List<CompetitionAnnouncementAnnex> announcementAnnexList;

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事公告附件表
* 活动公告附件表
* </p>
*
* @author cheney
@ -22,16 +22,16 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_announcement_annex")
@ApiModel(value="CompetitionAnnouncementAnnex对象", description="赛事公告附件表")
@ApiModel(value="CompetitionAnnouncementAnnex对象", description="活动公告附件表")
public class CompetitionAnnouncementAnnex implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "赛事附件主键")
@ApiModelProperty(value = "活动附件主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事公告主键(c_competition_announcement表主键)")
@ApiModelProperty(value = "活动公告主键(c_competition_announcement表主键)")
private Integer announcementId;
@ApiModelProperty(value = "文件名称")

@ -34,10 +34,10 @@ public class CompetitionContent implements Serializable {
@ApiModelProperty(value = "阶段id(取c_competition_stage主键id)")
private Integer stageId;
@ApiModelProperty(value = "赛事开始时间")
@ApiModelProperty(value = "活动开始时间")
private Date startTime;
@ApiModelProperty(value = "赛事结束时间")
@ApiModelProperty(value = "活动结束时间")
private Date endTime;
@ApiModelProperty(value = "课程id")
@ -79,7 +79,7 @@ public class CompetitionContent implements Serializable {
@ApiModelProperty(value = "线下地址展示(默认为0不展示)")
private Integer offlineButton;
@ApiModelProperty(value = "比赛内容描述")
@ApiModelProperty(value = "活动内容描述")
private String contentDescription;
@ApiModelProperty(value = "评分规则")

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事进展表
* 活动进展表
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_progress")
@ApiModel(value="CompetitionProgress对象", description="赛事进展表")
@ApiModel(value="CompetitionProgress对象", description="活动进展表")
public class CompetitionProgress implements Serializable {
private static final long serialVersionUID = 1L;
@ -31,16 +31,16 @@ public class CompetitionProgress implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事进展标题")
@ApiModelProperty(value = "活动进展标题")
private String title;
@ApiModelProperty(value = "赛事主键Id(c_competition表主键)")
@ApiModelProperty(value = "活动主键Id(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "赛事进展状态(0未完成,1进行中,2已完成)")
@ApiModelProperty(value = "活动进展状态(0未完成,1进行中,2已完成)")
private Integer status;
@ApiModelProperty(value = "赛事进展描述")
@ApiModelProperty(value = "活动进展描述")
private String description;
@ApiModelProperty(value = "创建时间")

@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事范围表
* 活动范围表
* </p>
*
* @author cheney
@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_range")
@ApiModel(value="CompetitionRange对象", description="赛事范围表")
@ApiModel(value="CompetitionRange对象", description="活动范围表")
public class CompetitionRange implements Serializable {
private static final long serialVersionUID = 1L;
@ -32,7 +32,7 @@ public class CompetitionRange implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事主键(c_competition表主键)")
@ApiModelProperty(value = "活动主键(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "省")

@ -12,7 +12,7 @@ import java.util.Date;
/**
* <p>
* 赛事排名表
* 活动排名表
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_ranking")
@ApiModel(value = "CompetitionRanking对象", description = "赛事排名表")
@ApiModel(value = "CompetitionRanking对象", description = "活动排名表")
public class CompetitionRanking implements Serializable {
private static final long serialVersionUID = 1L;
@ -37,13 +37,13 @@ public class CompetitionRanking implements Serializable {
@ApiModelProperty(value = "团队id")
private Integer teamId;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "账号id")
private Integer accountId;
@ApiModelProperty(value = "赛事阶段id(c_competition_stage赛事阶段设置表)")
@ApiModelProperty(value = "活动阶段id(c_competition_stage活动阶段设置表)")
private Integer stageId;
@ApiModelProperty(value = "是否为总分排名(1为是 默认0不是)")

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事报名人员表
* 活动报名人员表
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_registration")
@ApiModel(value="CompetitionRegistration对象", description="赛事报名人员表")
@ApiModel(value="CompetitionRegistration对象", description="活动报名人员表")
public class CompetitionRegistration implements Serializable {
private static final long serialVersionUID = 1L;
@ -31,7 +31,7 @@ public class CompetitionRegistration implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事主键Id(c_competition表主键)")
@ApiModelProperty(value = "活动主键Id(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "用户主键Id")

@ -13,7 +13,7 @@ import java.util.Date;
/**
* <p>
* 赛事排名定时发布表
* 活动排名定时发布表
* </p>
*
* @author cheney
@ -23,7 +23,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_release_time")
@ApiModel(value="CompetitionReleaseTime对象", description="赛事排名定时发布表")
@ApiModel(value="CompetitionReleaseTime对象", description="活动排名定时发布表")
public class CompetitionReleaseTime implements Serializable {
private static final long serialVersionUID = 1L;
@ -35,7 +35,7 @@ public class CompetitionReleaseTime implements Serializable {
@ApiModelProperty(value = "阶段id")
private Integer stageId;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "发布类型(0默认发布 1批量手动导入)")

@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事规则表
* 活动规则表
* </p>
*
* @author cheney
@ -24,7 +24,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_rule")
@ApiModel(value="CompetitionRule对象", description="赛事规则表")
@ApiModel(value="CompetitionRule对象", description="活动规则表")
public class CompetitionRule implements Serializable {
private static final long serialVersionUID = 1L;
@ -33,7 +33,7 @@ public class CompetitionRule implements Serializable {
@TableId(value = "rule_id", type = IdType.AUTO)
private Integer ruleId;
@ApiModelProperty(value = "完整赛事设置id(取c_complete_competition_setup表主键)")
@ApiModelProperty(value = "完整活动设置id(取c_complete_competition_setup表主键)")
private Integer setupId;
@ApiModelProperty(value = "赛制(0为积分赛,1为淘汰赛,2为单项赛)")

@ -12,7 +12,7 @@ import java.util.Date;
/**
* <p>
* 赛事阶段设置表
* 活动阶段设置表
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_stage")
@ApiModel(value="CompetitionStage对象", description="赛事阶段设置表")
@ApiModel(value="CompetitionStage对象", description="活动阶段设置表")
public class CompetitionStage implements Serializable {
private static final long serialVersionUID = 1L;
@ -40,7 +40,7 @@ public class CompetitionStage implements Serializable {
@ApiModelProperty(value = "序号(第几阶段)")
private Integer number;
@ApiModelProperty(value = "比赛方式(0实操,1理论,2线下)默认为0")
@ApiModelProperty(value = "活动方式(0实操,1理论,2线下)默认为0")
private Integer method;
@ApiModelProperty(value = "权重(积分赛,所有阶段权和为1)")
@ -62,7 +62,7 @@ public class CompetitionStage implements Serializable {
@ApiModelProperty(value = "是否公布成绩详情(0为公布,1不公布)默认为1")
private Integer resultsDetails;
@ApiModelProperty(value = "参数标识,大于0表示参加过比赛")
@ApiModelProperty(value = "参数标识,大于0表示参加过活动")
@TableField(exist = false)
private Integer count;
@ -92,11 +92,11 @@ public class CompetitionStage implements Serializable {
@TableField(exist = false)
private Integer contentId;
@ApiModelProperty(value = "赛事开始时间")
@ApiModelProperty(value = "活动开始时间")
@TableField(exist = false)
private Date startTime;
@ApiModelProperty(value = "赛事结束时间")
@ApiModelProperty(value = "活动结束时间")
@TableField(exist = false)
private Date endTime;
@ -136,7 +136,7 @@ public class CompetitionStage implements Serializable {
@TableField(exist = false)
private Integer offlineButton;
@ApiModelProperty(value = "比赛内容描述")
@ApiModelProperty(value = "活动内容描述")
@TableField(exist = false)
private String contentDescription;
@ -156,7 +156,7 @@ public class CompetitionStage implements Serializable {
@TableField(exist = false)
private String systemName;
@ApiModelProperty(value = "赛事内容")
@ApiModelProperty(value = "活动内容")
@TableField(exist = false)
private CompetitionContent competitionContent;

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事阶段内容设置
* 活动阶段内容设置
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_stage_content_setting")
@ApiModel(value="CompetitionStageContentSetting对象", description="赛事线下阶段内容设置")
@ApiModel(value="CompetitionStageContentSetting对象", description="活动线下阶段内容设置")
public class CompetitionStageContentSetting implements Serializable {
private static final long serialVersionUID = 1L;
@ -31,7 +31,7 @@ public class CompetitionStageContentSetting implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "阶段id")

@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事阶段文件
* 活动阶段文件
* </p>
*
* @author cheney
@ -24,7 +24,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_stage_file")
@ApiModel(value = "CompetitionStageFile对象", description = "赛事阶段文件")
@ApiModel(value = "CompetitionStageFile对象", description = "活动阶段文件")
public class CompetitionStageFile implements Serializable {
private static final long serialVersionUID = 1L;
@ -33,7 +33,7 @@ public class CompetitionStageFile implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "阶段id")

@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 赛事团队表
* 活动团队表
* </p>
*
* @author cheney
@ -24,7 +24,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_team")
@ApiModel(value="CompetitionTeam对象", description="赛事团队表")
@ApiModel(value="CompetitionTeam对象", description="活动团队表")
public class CompetitionTeam implements Serializable {
private static final long serialVersionUID = 1L;
@ -33,7 +33,7 @@ public class CompetitionTeam implements Serializable {
@TableId(value = "team_id", type = IdType.AUTO)
private Integer teamId;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "团队名称")

@ -0,0 +1,41 @@
package com.huoran.competition.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 记录用户删除的赛事
* </p>
*
* @author cheney
* @since 2023-12-12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_competition_user_del")
@ApiModel(value="CompetitionUserDel对象", description="记录用户删除的赛事")
public class CompetitionUserDel implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "被删除不显示的活动")
private Integer competitionId;
@ApiModelProperty(value = "账户id")
private Integer accountId;
}

@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
/**
* <p>
* 完整赛事设置
* 完整活动设置
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_complete_competition_setup")
@ApiModel(value="CompleteCompetitionSetup对象", description="完整赛事设置")
@ApiModel(value="CompleteCompetitionSetup对象", description="完整活动设置")
public class CompleteCompetitionSetup implements Serializable {
private static final long serialVersionUID = 1L;
@ -31,10 +31,10 @@ public class CompleteCompetitionSetup implements Serializable {
@TableId(value = "setup_id", type = IdType.AUTO)
private Integer setupId;
@ApiModelProperty(value = "赛事id(c_competition表主键)")
@ApiModelProperty(value = "活动id(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "赛事类型(0为个人赛,1为团队赛)默认为0")
@ApiModelProperty(value = "活动类型(0为个人赛,1为团队赛)默认为0")
private Integer competitionType;
@ApiModelProperty(value = "数量上限限制")

@ -34,7 +34,7 @@ public class TeamInstructor implements Serializable {
private Integer id;
@ApiModelProperty(value = "团队id(取c_competition主键)")
@NotNull(message = "大赛不能为空")
@NotNull(message = "活动不能为空")
private Integer competitionId;
@ApiModelProperty(value = "账号id")

@ -34,10 +34,10 @@ public class TeamParticipant implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事阶段id(c_competition_stage)")
@ApiModelProperty(value = "活动阶段id(c_competition_stage)")
private Integer stageId;
@ApiModelProperty(value = "赛事id(c_competition)")
@ApiModelProperty(value = "活动id(c_competition)")
private Integer competitionId;
@ApiModelProperty(value = "允许参赛人员账号")

@ -5,33 +5,34 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @描述竞赛管理表
* @描述活动管理表
* @作者: Rong
* @日期: 2022-06-16
*/
@Data
@ApiModel(value = "登录后赛事列表分页")
@ApiModel(value = "登录后活动列表分页")
public class AfterLoginPageCompetitionListReq extends PageReq{
@ApiModelProperty(value = "关键词(竞赛名称/创建人)",example = "事")
@ApiModelProperty(value = "关键词(活动名称/创建人)",example = "事")
private String keyWord;
@ApiModelProperty(value = "大赛范围(0:本校内 1:全平台 2.指定区域、院校 3.不限)",example = "3")
@ApiModelProperty(value = "活动范围(0:本校内 1:全平台 2.指定区域、院校 3.不限)",example = "3")
private String competitionScope;
@ApiModelProperty(value = "")
private Integer provinceId;
@ApiModelProperty(value = "账号id")
private Integer accountId;
@ApiModelProperty(value = "")
private Integer cityId;
@ApiModelProperty(value = "开始时间")
private String startTime;
@ApiModelProperty(value = "排序(1:近期排名 2.最近更新)")
private Integer sequence;
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "平台来源(5:幼儿园,6:供应商)", example = "5")
private Integer platformSource;
@ApiModelProperty(value = "账号id")
private Integer accountId;
@ApiModelProperty(value = "赛事类型(1.本校赛事/2.赛事广场/3.已报名赛事)")
private Integer eventType;
@ApiModelProperty(value = "读取的列表(0:首页活动/1.已报名活动)", example = "5")
private Integer listType;
}

@ -6,10 +6,10 @@ import lombok.Data;
@Data
public class AllowedParticipateCompetitionReq {
@ApiModelProperty(value = "大赛id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "大赛阶段id")
@ApiModelProperty(value = "活动阶段id")
private Integer stageId;
@ApiModelProperty(value = "序号(第几阶段)")

@ -13,7 +13,7 @@ public class BatchUploadListCompetitionReq extends PageReq implements Serializab
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "阶段Id")

@ -9,6 +9,6 @@ import java.util.List;
@Data
public class CompetitionContentReq {
@ApiModelProperty(value = "多个赛事内容", required = true)
@ApiModelProperty(value = "多个活动内容", required = true)
List<CompetitionContent> competitionContents;
}

@ -5,15 +5,15 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @描述竞赛管理表
* @描述活动管理表
* @作者: Rong
* @日期: 2022-06-16
*/
@Data
@ApiModel(value = "大赛详情请求参数")
@ApiModel(value = "活动详情请求参数")
public class CompetitionDetailReq extends PageReq{
@ApiModelProperty(value = "大赛id")
@ApiModelProperty(value = "活动id")
private Integer contestId;

@ -12,7 +12,7 @@ import java.util.List;
public class ContestStageFileReq extends PageReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "阶段id")

@ -14,7 +14,7 @@ import java.util.List;
public class DelCompetitionRankingReq {
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "阶段id(集合)")

@ -14,7 +14,7 @@ import java.util.List;
@ApiModel(value = "团队得分详情")
public class DetailsOfTotalTeamScoresReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "要查询的阶段id(多个)")

@ -5,18 +5,18 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @描述竞赛管理表
* @描述活动管理表
* @作者: Rong
* @日期: 2022-06-16
*/
@Data
@ApiModel(value = "禁用启用赛事所需参数")
@ApiModel(value = "禁用启用活动所需参数")
public class DisableEnableCompetitionReq {
@ApiModelProperty(value = "禁用平台来源(0中台,1职站)",example = "1")
private Integer type;
@ApiModelProperty(value = "禁用的赛事id",example = "1")
@ApiModelProperty(value = "禁用的活动id",example = "1")
private Integer competitionId;
@ApiModelProperty(value = "是否开启(默认0启用 1禁用)", example = "0")

@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
@Data
@ApiModel(value = "批量导入大赛成绩所需")
@ApiModel(value = "批量导入活动成绩所需")
public class ExcelImpGradeReq {
@ApiModelProperty(value = "姓名")
@ -41,7 +41,7 @@ public class ExcelImpGradeReq {
return timeSum;
}
/*@ApiModelProperty(value = "提交时间(用于区分线下赛事的提交时间)")
/*@ApiModelProperty(value = "提交时间(用于区分线下活动的提交时间)")
@NotNull(message = "提交时间不能为空!")
private Date submitTime;*/

@ -9,7 +9,7 @@ import java.util.Date;
@Data
@ApiModel(value = "批量导入大赛排名所需")
@ApiModel(value = "批量导入活动排名所需")
public class ExcelImpRankReq {
@ApiModelProperty(value = "团队名称")

@ -12,7 +12,7 @@ import lombok.Data;
public class FrontDeskStageRankingReq extends PageReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "当前的阶段id")
@ -22,9 +22,9 @@ public class FrontDeskStageRankingReq extends PageReq {
@ApiModelProperty(value = "团队id(逗号隔开)")
private String teamIds;
@ApiModelProperty(value = "完整赛事设置")
@ApiModelProperty(value = "完整活动设置")
private CompleteCompetitionSetup competitionSetup;
@ApiModelProperty(value = "赛事阶段设置表")
@ApiModelProperty(value = "活动阶段设置表")
private CompetitionStage competitionStage;
}

@ -10,7 +10,7 @@ import lombok.Data;
public class FrontDeskStageTeamScoreDetailsReq extends PageReq{
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "当前的阶段id")
@ -32,7 +32,7 @@ public class FrontDeskStageTeamScoreDetailsReq extends PageReq{
@ApiModelProperty(value = "账号id")
private String accountId;
@ApiModelProperty(value = "赛事类型(0为个人赛,1为团队赛)默认为0",hidden = true)
@ApiModelProperty(value = "活动类型(0为个人赛,1为团队赛)默认为0",hidden = true)
private Integer competitionType;
/*
@ApiModelProperty(value = "要查询的阶段id(多个)")

@ -6,11 +6,11 @@ import lombok.Data;
@Data
@ApiModel(value = "前台竞赛阶段参数")
@ApiModel(value = "前台活动阶段参数")
public class FrontStageCompetitionReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "团队id")

@ -6,10 +6,10 @@ import lombok.Data;
@Data
public class IsParticipantReq {
@ApiModelProperty(value = "大赛id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "大赛阶段id")
@ApiModelProperty(value = "活动阶段id")
private Integer stageId;
@ApiModelProperty(value = "账号(无需传值)")

@ -10,7 +10,7 @@ import lombok.Data;
public class ManualPublishingParameterReq extends PageReq{
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "当前的阶段id")

@ -12,7 +12,7 @@ import java.util.List;
public class OverallStandingsInThePointsRaceReq extends PageReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "要查询的阶段id(多个)")

@ -5,28 +5,28 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @描述竞赛管理表
* @描述活动管理表
* @作者: Rong
* @日期: 2022-06-16
*/
@Data
@ApiModel(value = "赛事列表分页")
@ApiModel(value = "活动列表分页")
public class PageCompetitionListReq extends PageReq{
@ApiModelProperty(value = "关键词(竞赛名称/创建人)",example = "事")
@ApiModelProperty(value = "关键词(活动名称/创建人)",example = "事")
private String keyWord;
@ApiModelProperty(value = "发布状态(0未发布,1已发布)")
private Integer publishStatus;
@ApiModelProperty(value = "大赛来源(0中台,1职站)",example = "1")
private String platformSource;
@ApiModelProperty(value = "平台来源(5:幼儿园,6:供应商)", example = "5")
private Integer platformSource;
@ApiModelProperty(value = "大赛范围(0:本校内 1:全平台 2.指定区域、院校)",example = "0")
@ApiModelProperty(value = "活动范围(1:全平台 5:幼儿园,6:供应商)", example = "0")
private String competitionScope;
@ -35,7 +35,7 @@ public class PageCompetitionListReq extends PageReq{
@ApiModelProperty(value = "结束时间")
private String endTime;
/*
@ApiModelProperty(value = "省")
private Integer provinceId;
@ -46,7 +46,7 @@ public class PageCompetitionListReq extends PageReq{
@ApiModelProperty(value = "排序(1:近期排名 2.最近更新)")
private Integer sequence;
private Integer sequence;*/
@ApiModelProperty(value = "账号id")
private Integer accountId;

@ -17,11 +17,11 @@ public class PageGradeListReq extends PageReq {
private String keyWord;
@ApiModelProperty(value = "赛事阶段id")
@ApiModelProperty(value = "活动阶段id")
private Integer stageId;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;

@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @描述竞赛管理表
* @描述活动管理表
* @作者: Rong
* @日期: 2022-06-16
*/
@ -16,7 +16,7 @@ public class PageRegistrationStaffReq extends PageReq{
@ApiModelProperty(value = "关键词(学生姓名/手机号)",example = "18818574533")
private String keyWord;
@ApiModelProperty(value = "赛事ID",example = "1485860415656255489")
@ApiModelProperty(value = "活动ID",example = "1485860415656255489")
private String competitionId;
private Integer pageNum;

@ -20,10 +20,10 @@ import java.util.Date;
public class StageRankingReq {
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "赛事阶段id")
@ApiModelProperty(value = "活动阶段id")
private Integer stageId;
@ApiModelProperty(value = "团队id")

@ -14,7 +14,7 @@ import java.util.List;
public class StageTeamScoreDetailsReq extends PageReq{
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "当前的阶段id")

@ -10,7 +10,7 @@ import lombok.Data;
public class WhetherToPublishParameterReq {
@ApiModelProperty(value = "大赛Id")
@ApiModelProperty(value = "活动Id")
private Integer competitionId;
@ApiModelProperty(value = "当前的阶段id")

@ -6,10 +6,10 @@ import lombok.Data;
@Data
@ApiModel(value = "大赛范围选择")
@ApiModel(value = "活动范围选择")
public class CompetitionRangeResp {
@ApiModelProperty(value = "竞赛主键")
@ApiModelProperty(value = "活动主键")
private String contestId;
@ApiModelProperty(value = "省")

@ -22,7 +22,7 @@ public class CompetitionRuleResp {
@TableId(value = "rule_id", type = IdType.AUTO)
private Integer ruleId;
@ApiModelProperty(value = "完整赛事设置id(取c_complete_competition_setup表主键)")
@ApiModelProperty(value = "完整活动设置id(取c_complete_competition_setup表主键)")
private Integer setupId;
@ApiModelProperty(value = "赛制(0为积分赛,1为淘汰赛,2为单项赛)")
@ -47,7 +47,7 @@ public class CompetitionRuleResp {
@ApiModelProperty(value = "序号(第几阶段)")
private Integer number;
@ApiModelProperty(value = "比赛方式(0实操,1理论,2线下)默认为0")
@ApiModelProperty(value = "活动方式(0实操,1理论,2线下)默认为0")
private Integer method;
@ApiModelProperty(value = "权重(积分赛,所有阶段权和为1)")
@ -65,7 +65,7 @@ public class CompetitionRuleResp {
@ApiModelProperty(value = "成绩公布时间")
private Double resultAnnouncementTime;
@ApiModelProperty(value = "赛事id(c_competition表主键)")
@ApiModelProperty(value = "活动id(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "团队成绩计算方式(0:最高分,1:平均分,2:总分)")

@ -14,14 +14,14 @@ import java.util.Date;
/**
* <p>
* 赛事阶段文件
* 活动阶段文件
* </p>
*
* @author cheney
* @since 2023-11-13
*/
@Data
@ApiModel(value = "CompetitionStageFile对象", description = "赛事阶段文件列标")
@ApiModel(value = "CompetitionStageFile对象", description = "活动阶段文件列标")
public class CompetitionStageFileResp implements Serializable {
private static final long serialVersionUID = 1L;
@ -30,7 +30,7 @@ public class CompetitionStageFileResp implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "赛事id")
@ApiModelProperty(value = "活动id")
private Integer competitionId;
@ApiModelProperty(value = "阶段id")

@ -14,7 +14,7 @@ import java.util.List;
/**
* <p>
* 赛事排名表
* 活动排名表
* </p>
*
* @author cheney
@ -40,7 +40,7 @@ public class DetailsOfTotalTeamScoresResp {
private Double teamScore;
@ApiModelProperty(value = "赛事规则")
@ApiModelProperty(value = "活动规则")
private CompetitionRuleResp competitionRules;

@ -13,7 +13,7 @@ import java.util.Date;
/**
* <p>
* 赛事阶段设置表
* 活动阶段设置表
* </p>
*
* @author cheney
@ -22,7 +22,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "前台竞赛阶段", description = "前台竞赛阶段")
@ApiModel(value = "前台活动阶段", description = "前台活动阶段")
public class FrontStageCompetitionResp {
@ -37,7 +37,7 @@ public class FrontStageCompetitionResp {
@ApiModelProperty(value = "序号(第几阶段)")
private Integer number;
@ApiModelProperty(value = "比赛方式(0实操,1理论,2线下)默认为0")
@ApiModelProperty(value = "活动方式(0实操,1理论,2线下)默认为0")
private Integer method;
@ApiModelProperty(value = "权重(积分赛,所有阶段权和为1)")

@ -8,7 +8,7 @@ import java.util.List;
@Data
@ApiModel(value = "赛事总分排名")
@ApiModel(value = "活动总分排名")
public class OverallEventRankingResp {
@ApiModelProperty(value = "阶段id")
@ -20,7 +20,7 @@ public class OverallEventRankingResp {
@ApiModelProperty(value = "权重(积分赛,所有阶段权和为1)")
private Double pointWeight;
/* @ApiModelProperty(value = "赛事类型(0为个人赛,1为团队赛)默认为0")
/* @ApiModelProperty(value = "活动类型(0为个人赛,1为团队赛)默认为0")
private Integer competitionType;*/

@ -25,7 +25,7 @@ public class StageRankingResp {
private String schoolName;
@ApiModelProperty(value = "耗时(用于区分线下赛事的耗时)")
@ApiModelProperty(value = "耗时(用于区分线下活动的耗时)")
private String timeSum;

@ -21,11 +21,11 @@ public class TeamAndLeaderResp {
private String teamLeader;
@ApiModelProperty(value = "赛事主键(c_competition表主键)")
@ApiModelProperty(value = "活动主键(c_competition表主键)")
private Integer competitionId;
@ApiModelProperty(value = "大赛名称")
@ApiModelProperty(value = "活动名称")
private String competitionName;
@ApiModelProperty(value = "学校")

@ -9,7 +9,7 @@ import java.util.List;
/**
* <p>
* 赛事排名表
* 活动排名表
* </p>
*
* @author cheney
@ -33,7 +33,7 @@ public class TotalRankingScoreDetailsResp {
private String teamCalculationMethod;
@ApiModelProperty(value = "赛事规则")
@ApiModelProperty(value = "活动规则")
private CompetitionRuleResp competitionRules;

@ -15,13 +15,13 @@ import java.util.List;
public class CompetitionDetailsVO {
@ApiModelProperty(value = "大赛id")
@ApiModelProperty(value = "活动id")
private Integer contestId;
@ApiModelProperty(value = "大赛名称")
@ApiModelProperty(value = "活动名称")
private String contestName;
@ApiModelProperty(value = "比赛形式(0为个人赛,1为团队赛)默认为0")
@ApiModelProperty(value = "活动形式(0为个人赛,1为团队赛)默认为0")
private Integer competitionType;
@ApiModelProperty(value = "赛制(0为积分赛,1为淘汰赛,2为单项赛)")
@ -30,13 +30,13 @@ public class CompetitionDetailsVO {
@ApiModelProperty(value = "阶段数")
private Integer stageNum;
@ApiModelProperty(value = "赛事开始时间")
@ApiModelProperty(value = "活动开始时间")
private String startTime;
@ApiModelProperty(value = "赛事结束时间")
@ApiModelProperty(value = "活动结束时间")
private String endTime;
@ApiModelProperty(value = "比赛方式(0实操,1理论,2线下)默认为0")
@ApiModelProperty(value = "活动方式(0实操,1理论,2线下)默认为0")
private Integer method;

@ -26,18 +26,21 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "竞赛名称")
@ApiModelProperty(value = "活动名称")
private String competitionName;
@ApiModelProperty(value = "创建人")
private String founderName;
@ApiModelProperty(value = "大赛范围(0:本校内 1:全平台 2:指定区域、院校)", example = "0")
private Integer competitionScope;
@ApiModelProperty(value = "平台来源(0:中台,1:职站)", example = "0")
@ApiModelProperty(value = "平台来源(5:幼儿园,6:供应商)", example = "5")
private Integer platformSource;
@ApiModelProperty(value = "活动范围(1:全平台 5:幼儿园,6:供应商)", example = "0")
private String competitionScope;
/*@ApiModelProperty(value = "平台来源(0:中台,1:职站)", example = "0")
private Integer platformSource;*/
@ApiModelProperty(value = "发布状态(0未发布,1已发布)")
private Integer publishStatus;
@ -50,28 +53,28 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "报名人数")
private String applicantNum;
@ApiModelProperty(value = "竞赛开始时间")
@ApiModelProperty(value = "活动开始时间")
private Date playStartTime;
@ApiModelProperty(value = "竞赛结束时间")
@ApiModelProperty(value = "活动结束时间")
private Date playEndTime;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "比赛范围")
@ApiModelProperty(value = "活动范围")
private String range;
@ApiModelProperty(value = "比赛范围(省市学校集合)")
@ApiModelProperty(value = "活动范围(省市学校集合)")
private List<CompetitionRangeResp> contestRangeRespList;
@ApiModelProperty(value = "比赛阶段")
@ApiModelProperty(value = "活动阶段")
private List<CompetitionStage> competitionStageList;
@ApiModelProperty(value = "比赛内容")
@ApiModelProperty(value = "活动内容")
private List<CompetitionContent> contentList;
@ApiModelProperty(value = "赛事设置")
@ApiModelProperty(value = "活动设置")
private CompleteCompetitionSetup setup;
@ApiModelProperty(value = "主办方", example = "或然科技")
@ -80,7 +83,7 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "承办方", example = "或然科技")
private String undertaker;
@ApiModelProperty(value = "竞赛描述", example = "或然科技赛事")
@ApiModelProperty(value = "活动描述", example = "或然科技活动")
private String description;
@ApiModelProperty(value = "报名开始时间", example = "2021-09-10 16:24:24")
@ -92,13 +95,13 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "创建人Id", example = "1")
private String founderId;
@ApiModelProperty(value = "竞赛名称", example = "数据库数据库色即是空")
@ApiModelProperty(value = "活动名称", example = "数据库数据库色即是空")
private String name;
@ApiModelProperty(value = "竞赛封面图", example = "http://localhost:9400/occupationlab/doc.html")
@ApiModelProperty(value = "活动封面图", example = "http://localhost:9400/occupationlab/doc.html")
private String coverUrl;
@ApiModelProperty(value = "竞赛轮播图", example = "http://localhost:9400/occupationlab/doc.html")
@ApiModelProperty(value = "活动轮播图", example = "http://localhost:9400/occupationlab/doc.html")
private String carouselUrl;
@ApiModelProperty(value = "更新时间")
@ -117,19 +120,19 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "团队id")
private Integer teamId;
@ApiModelProperty(value = "赛事赛制")
@ApiModelProperty(value = "活动赛制")
private Integer rule;
@ApiModelProperty(value = "赛事规则id")
@ApiModelProperty(value = "活动规则id")
private Integer ruleId;
@ApiModelProperty(value = "报名时间")
private Date registrationTime;
@ApiModelProperty(value = "发布类型(0发布信息,1完整比赛)默认为0")
@ApiModelProperty(value = "发布类型(0发布信息,1完整活动)默认为0")
private Integer releaseType;
@ApiModelProperty(value = "赛事类型(0为个人赛,1为团队赛)默认为0")
@ApiModelProperty(value = "活动类型(0为个人赛,1为团队赛)默认为0")
private Integer competitionType;
@ApiModelProperty(value = "邀请码")
@ -141,5 +144,8 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "指定区域名称")
private String locations;
@ApiModelProperty(value = "创建来源(0默认平台创建)")
private String createSource;
}

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 赛事附件表 Mapper 接口
* 活动附件表 Mapper 接口
* </p>
*
* @author cheney

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 赛事公告附件表 Mapper 接口
* 活动公告附件表 Mapper 接口
* </p>
*
* @author cheney

@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
/**
* <p>
* 赛事公告表 Mapper 接口
* 活动公告表 Mapper 接口
* </p>
*
* @author cheney

@ -16,7 +16,7 @@ import java.util.List;
/**
* <p>
* 赛事信息表 Mapper 接口
* 活动信息表 Mapper 接口
* </p>
*
* @author cheney
@ -26,16 +26,22 @@ public interface CompetitionMapper extends BaseMapper<Competition> {
IPage<CompetitionVO> contestPageConditionQueryByOccupationlab(Page<CompetitionVO> page,@Param("req") PageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> contestPageConditionQueryByNakadai(Page<CompetitionVO> page, @Param("req") PageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> backgroundActivityList(Page<CompetitionVO> page, @Param("req") PageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> foregroundAppletActivityList(Page<CompetitionVO> page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> postRegistrationList(Page<CompetitionVO> page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> allContestsByStu(Page<CompetitionVO> page,@Param("req") PageCompetitionListReq pageCompetitionListReq);
IPage<CompetitionVO> designatedRangeCompetitionByStu(Page<CompetitionVO> page, @Param("req") PageCompetitionListReq req);
//本校赛事
//本校活动
IPage<CompetitionVO> schoolCompetition(Page<CompetitionVO> page, @Param("req") AfterLoginPageCompetitionListReq req);
//赛事广场
//活动广场
IPage<CompetitionVO> tournamentSquare(Page<CompetitionVO> page, @Param("req") AfterLoginPageCompetitionListReq req);
IPage<CompetitionVO> registeredBySchoolAndAllPlatforms(Page<CompetitionVO> page,@Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq);
@ -49,4 +55,11 @@ public interface CompetitionMapper extends BaseMapper<Competition> {
IPage<CompetitionVO> tournamentSquareNew(Page<CompetitionVO> page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq);
List<CompetitionStage> selectCompetitionStageNew(@Param("ruleId")Integer ruleId,@Param("accountId") Integer accountId);
//获取sys_platform表平台信息
String obtainPlatformInformation(@Param("platformId")String platformId );
}

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 赛事进展表 Mapper 接口
* 活动进展表 Mapper 接口
* </p>
*
* @author cheney

@ -10,7 +10,7 @@ import java.util.List;
/**
* <p>
* 赛事范围表 Mapper 接口
* 活动范围表 Mapper 接口
* </p>
*
* @author cheney

@ -17,7 +17,7 @@ import java.util.List;
/**
* <p>
* 赛事排名表 Mapper 接口
* 活动排名表 Mapper 接口
* </p>
*
* @author cheney

@ -13,7 +13,7 @@ import java.util.List;
/**
* <p>
* 赛事报名人员表 Mapper 接口
* 活动报名人员表 Mapper 接口
* </p>
*
* @author cheney

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 赛事排名定时发布表 Mapper 接口
* 活动排名定时发布表 Mapper 接口
* </p>
*
* @author cheney

@ -10,7 +10,7 @@ import java.util.List;
/**
* <p>
* 赛事规则表 Mapper 接口
* 活动规则表 Mapper 接口
* </p>
*
* @author cheney

@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 赛事阶段内容设置 Mapper 接口
* 活动阶段内容设置 Mapper 接口
* </p>
*
* @author cheney

@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
/**
* <p>
* 赛事阶段文件 Mapper 接口
* 活动阶段文件 Mapper 接口
* </p>
*
* @author cheney

@ -10,7 +10,7 @@ import java.util.List;
/**
* <p>
* 赛事阶段设置表 Mapper 接口
* 活动阶段设置表 Mapper 接口
* </p>
*
* @author cheney

@ -18,7 +18,7 @@ import java.util.List;
/**
* <p>
* 赛事团队表 Mapper 接口
* 活动团队表 Mapper 接口
* </p>
*
* @author cheney
@ -36,7 +36,7 @@ public interface CompetitionTeamMapper extends BaseMapper<CompetitionTeam> {
CompetitionTeam verifyThatStudentsAreInTeam(@Param("team") CompetitionTeam team);
//获取团队赛事下的队长所在的团队名称
//获取团队活动下的队长所在的团队名称
String getTheTeamName(@Param("competitionId") Integer competitionId, @Param("teamName") String teamName);
String getTeamInformation(@Param("competitionId") Integer competitionId);
@ -47,7 +47,7 @@ public interface CompetitionTeamMapper extends BaseMapper<CompetitionTeam> {
//团队赛求和
double teamSum(@Param("req") StageRankingReq req);
//网上个人积分比赛
//网上个人积分活动
List<ListOfStageResultsResp> onlineIndividualPointsCompetition(@Param("req") StageRankingReq req);
@ -80,4 +80,5 @@ public interface CompetitionTeamMapper extends BaseMapper<CompetitionTeam> {
List<ListOfStageResultsResp> multipleStageTeamScoreDetails(@Param("req") StageTeamScoreDetailsReq req);
}

@ -0,0 +1,16 @@
package com.huoran.competition.mapper;
import com.huoran.competition.entity.CompetitionUserDel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 记录用户删除的赛事 Mapper 接口
* </p>
*
* @author cheney
* @since 2023-12-12
*/
public interface CompetitionUserDelMapper extends BaseMapper<CompetitionUserDel> {
}

@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* <p>
* 完整赛事设置 Mapper 接口
* 完整活动设置 Mapper 接口
* </p>
*
* @author cheney

@ -47,15 +47,12 @@
</if>
ORDER BY c.create_time desc
</select>
<select id="contestPageConditionQueryByNakadai"
<select id="backgroundActivityList"
resultType="com.huoran.competition.entity.vo.CompetitionVO">
SELECT
*
FROM
(
SELECT
c.id,
c.NAME as competitionName,
c.NAME AS competitionName,
c.founder_name,
c.competition_scope,
c.platform_source,
@ -67,55 +64,33 @@
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0
) AS applicant_num,
c.zt_open,
c.is_open
FROM
c_competition c
WHERE
c.platform_source = 0 UNION
SELECT
c.id,
c.NAME as competitionName,
( SELECT school_name FROM nakadai.school s WHERE s.school_id = c.school_id ) AS founder_name,
c.competition_scope,
c.platform_source,
c.publish_status,
c.play_start_time,
c.play_end_time,
c.create_time,
IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0
) AS applicant_num,
c.zt_open,
c.is_open
c.is_open,
create_source,
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' end) as createSource
FROM
c_competition c
WHERE
c.platform_source = 1
AND c.publish_status = 1
AND c.is_open = 0
) AS temp
1 = 1
where 1=1 and temp.is_open = 0
<if test=" req.startTime!=null and req.endTime!=null ">
and temp.create_time between #{req.startTime} and #{req.endTime}
and create_time between #{req.startTime} and #{req.endTime}
</if>
<if test=" req.platformSource!=null ">
and platform_source =#{req.platformSource}
</if>
<if test=" req.competitionScope!=null ">
and competition_scope =#{req.competitionScope}
<if test=" req.competitionScope!=null and req.competitionScope!=''">
AND FIND_IN_SET(competition_scope,#{req.competitionScope})
</if>
<if test=" req.keyWord!=null and req.keyWord!='' ">
and CONCAT( IFNULL( temp.competitionName, '' ), IFNULL( temp.founder_name, '' ) ) LIKE CONCAT('%'
and CONCAT( IFNULL( c.NAME, '' ), IFNULL( founder_name, '' ) ) LIKE CONCAT('%'
#{req.keyWord} '%' )
</if>
ORDER BY
temp.create_time DESC
create_time DESC
</select>
<select id="allContestsByStu" resultType="com.huoran.competition.entity.vo.CompetitionVO">
SELECT
@ -659,4 +634,104 @@
GROUP BY
c1.stage_id
</select>
<select id="obtainPlatformInformation" resultType="java.lang.String">
SELECT GROUP_CONCAT(platform_name) from nakadai.sys_platform WHERE FIND_IN_SET(platform_id,#{platformId})
</select>
<select id="foregroundAppletActivityList" resultType="com.huoran.competition.entity.vo.CompetitionVO">
SELECT
c.id,
c.NAME AS competitionName,
c.founder_name,
c.competition_scope,
c.platform_source,
c.publish_status,
c.play_start_time,
c.play_end_time,
c.create_time,
IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0
) AS applicant_num,
c.is_open,
create_source,
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' end) as createSource
FROM
c_competition c
WHERE
c.is_open = 0
and c.publish_status = 1
<if test=" req.startTime!=null and req.endTime!=null ">
and create_time between #{req.startTime} and #{req.endTime}
</if>
<if test=" req.platformSource!=null ">
and platform_source =#{req.platformSource}
</if>
<if test=" req.competitionScope!=null and req.competitionScope!=''">
AND FIND_IN_SET(competition_scope,#{req.competitionScope})
</if>
<if test=" req.keyWord!=null and req.keyWord!='' ">
and CONCAT( IFNULL( c.NAME, '' ), IFNULL( founder_name, '' ) ) LIKE CONCAT('%'
#{req.keyWord} '%' )
</if>
ORDER BY
create_time DESC
</select>
<select id="postRegistrationList" resultType="com.huoran.competition.entity.vo.CompetitionVO">
SELECT
*
FROM
(
SELECT
c.id,
c.NAME AS competitionName,
c.founder_name,
c.competition_scope,
c.platform_source,
c.publish_status,
c.play_start_time,
c.play_end_time,
c.create_time,
IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0
) AS applicant_num,
c.is_open,
create_source,
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' END ) AS createSource,
( SELECT d.id FROM c_competition_user_del d WHERE d.account_id = r.account_id AND d.competition_id = c.id ) AS isDelCompetition
FROM
c_competition_registration r
INNER JOIN c_competition c ON c.id = r.competition_id
WHERE
r.account_id = #{req.accountId}
AND r.is_disable = 0
) t
WHERE
t.isDelCompetition IS NULL
<if test=" req.startTime!=null and req.endTime!=null ">
and t.create_time between #{req.startTime} and #{req.endTime}
</if>
<if test=" req.platformSource!=null ">
and t.platform_source =#{req.platformSource}
</if>
<if test=" req.competitionScope!=null and req.competitionScope!=''">
AND FIND_IN_SET(competition_scope,#{req.competitionScope})
</if>
<if test=" req.keyWord!=null and req.keyWord!='' ">
and CONCAT( IFNULL( t.competitionName, '' ), IFNULL( founder_name, '' ) ) LIKE CONCAT('%'
#{req.keyWord} '%' )
</if>
ORDER BY
create_time DESC
</select>
</mapper>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.huoran.competition.mapper.CompetitionUserDelMapper">
</mapper>

@ -7,7 +7,7 @@ import java.util.List;
/**
* <p>
* 赛事附件表 服务类
* 活动附件表 服务类
* </p>
*
* @author cheney

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 赛事公告附件表 服务类
* 活动公告附件表 服务类
* </p>
*
* @author cheney

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 赛事公告表 服务类
* 活动公告表 服务类
* </p>
*
* @author cheney

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 赛事进展表 服务类
* 活动进展表 服务类
* </p>
*
* @author cheney

@ -10,7 +10,7 @@ import java.util.List;
/**
* <p>
* 赛事范围表 服务类
* 活动范围表 服务类
* </p>
*
* @author cheney

@ -17,7 +17,7 @@ import java.util.Map;
/**
* <p>
* 赛事排名表 服务类
* 活动排名表 服务类
* </p>
*
* @author cheney

@ -13,7 +13,7 @@ import java.util.List;
/**
* <p>
* 赛事报名人员表 服务类
* 活动报名人员表 服务类
* </p>
*
* @author cheney
@ -34,4 +34,6 @@ public interface CompetitionRegistrationService extends IService<CompetitionRegi
void exportDataInBatches(List<RegistrationVO> listOfExportSub, HttpServletResponse response) throws IOException;
R apply(CompetitionRegistration competitionRegistration);
CompetitionRegistration enquireWhetherToRegister(Integer accountId,String competitionId);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save