diff --git a/competition/src/main/java/com/huoran/competition/config/SwaggerConfig.java b/competition/src/main/java/com/huoran/competition/config/SwaggerConfig.java index 9565063..9ab46b1 100644 --- a/competition/src/main/java/com/huoran/competition/config/SwaggerConfig.java +++ b/competition/src/main/java/com/huoran/competition/config/SwaggerConfig.java @@ -59,7 +59,7 @@ public class SwaggerConfig { private ApiInfo apiInfo() { return new ApiInfoBuilder() - .title("赛事微服务接口文档") + .title("活动微服务接口文档") .description("cheney") .contact("developer@mail.com") .version("1.0") diff --git a/competition/src/main/java/com/huoran/competition/controller/AuthenticationController.java b/competition/src/main/java/com/huoran/competition/controller/AuthenticationController.java new file mode 100644 index 0000000..f9bda3e --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/controller/AuthenticationController.java @@ -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("认证成功"); + } +} + +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnexController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnexController.java index 3987116..b517729 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnexController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnexController.java @@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.*; /** *

- * 赛事附件表 前端控制器 + * 活动附件表 前端控制器 *

* * @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(); diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementAnnexController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementAnnexController.java index bf0441e..3571803 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementAnnexController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementAnnexController.java @@ -17,13 +17,13 @@ import java.util.List; /** *

- * 赛事公告附件表 前端控制器 + * 活动公告附件表 前端控制器 *

* * @author cheney * @since 2022-11-16 */ -@Api(tags = "赛事公告附件管理") +@Api(tags = "kindergarten-活动公告附件管理") @RestController @RequestMapping("/competition/announcementAnnex") public class CompetitionAnnouncementAnnexController { diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementController.java index 7d85323..a19ae6b 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionAnnouncementController.java @@ -21,13 +21,13 @@ import java.util.List; /** *

- * 赛事公告表 前端控制器 + * 活动公告表 前端控制器 *

* * @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); diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java index 68b8eb5..8b84356 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java @@ -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); } diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionController.java index 50bd7c2..3a8b09a 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionController.java @@ -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; /** *

- * 赛事信息表 前端控制器 + * 活动信息表 前端控制器 *

* * @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 annexUpdateWrapper = new QueryWrapper<>(); + annexUpdateWrapper.eq("competition_id", competition.getId()); + competitionAnnexService.remove(annexUpdateWrapper); - if (competition.getCompetitionScope() == 2) { - if (competition.getCompetitionRangeList().size() > 0) { - //1.首先删除原有的大赛范围选择 - UpdateWrapper 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().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 competitionIds) { + public R deleteCompetition(@ApiParam(name = "competitionIds", value = "活动ID", required = true) @RequestParam List competitionIds) { competitionIds.forEach(competitionId -> { - //删除赛事下的定时 + //删除活动下的定时 competitionReleaseTimeService.remove(new QueryWrapper().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 wrapper = new QueryWrapper<>(); wrapper.eq("competition_id", competitionId); wrapper.eq("account_id", accountId); @@ -172,35 +168,36 @@ public class CompetitionController { competition.setCompetitionRegistration(registration); List CompetitionAnnexList = competitionAnnexService.getCompetitionAnnexByCompetitionId(competitionId); List 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 setupQueryWrapper = new QueryWrapper<>(); + /*QueryWrapper setupQueryWrapper = new QueryWrapper<>(); setupQueryWrapper.eq("competition_id", competitionId); CompleteCompetitionSetup competitionSetup = completeCompetitionSetupService.getOne(setupQueryWrapper); - competition.setCompleteCompetitionSetup(competitionSetup); + competition.setCompleteCompetitionSetup(competitionSetup);*/ - QueryWrapper ruleQueryWrapper = new QueryWrapper<>(); + /* QueryWrapper ruleQueryWrapper = new QueryWrapper<>(); ruleQueryWrapper.eq("setup_id", competitionSetup.getSetupId()); CompetitionRule one = competitionRuleService.getOne(ruleQueryWrapper); if (one != null) { competition.setRule(one.getRule()); - } + }*/ // } - //查询赛事阶段内容数据 + /* //查询活动阶段内容数据 List 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> pageFuture = competitionService.notLoggedInBeforeStudentEvents(pageCompetitionListReq); IPage 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> pageFuture = competitionService.competitionAfterLogin(pageCompetitionListReq); IPage 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"); -// } } + diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionPerformanceController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionPerformanceController.java index 44530ff..b6ac6f8 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionPerformanceController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionPerformanceController.java @@ -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线下) + * 依据活动活动方式查询数据:为线下时查询分数表,其余查实验报告表 *

* 已删除的实验报告不计入统计中!!! * * @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 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 list = new ArrayList<>(); @@ -113,16 +116,18 @@ public class CompetitionPerformanceController { } - /** - * 比赛方式(0实操,1理论,2线下) - * 依据赛事比赛方式删除数据:为线下时删除分数表数据,其余删除实验报告表数据 + */ +/** + * 活动方式(0实操,1理论,2线下) + * 依据活动活动方式删除数据:为线下时删除分数表数据,其余删除实验报告表数据 *

* 已删除的实验报告不计入统计中!!! * * @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 { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionProgressController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionProgressController.java index 707c7a5..dbcc47d 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionProgressController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionProgressController.java @@ -17,13 +17,13 @@ import java.util.List; /** *

- * 赛事进展表 前端控制器 + * 活动进展表 前端控制器 *

* * @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(); diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionRangeController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionRangeController.java index 508f308..dc988b6 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionRangeController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionRangeController.java @@ -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; +*/ /** *

- * 赛事范围表 前端控制器 + * 活动范围表 前端控制器 *

* * @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 wrapper = new QueryWrapper<>(); wrapper.eq("competition_id",competitionId); List list = competitionRangeService.list(wrapper); @@ -64,3 +67,4 @@ public class CompetitionRangeController { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionRankingController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionRankingController.java index d1638c6..7952125 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionRankingController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionRankingController.java @@ -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 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 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 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 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 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 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 opsForString = redisTemplate.opsForValue(); //保存的key名 String key = "toggleTheSortingMode:competitionId:" + competitionId + "stageId:" + stageId + "isOverallRanking:" + isOverallRanking; @@ -408,3 +419,4 @@ public class CompetitionRankingController { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionRegistrationController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionRegistrationController.java index 119b9ba..28e2557 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionRegistrationController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionRegistrationController.java @@ -21,13 +21,13 @@ import java.util.List; /** *

- * 赛事报名人员表 前端控制器 + * 活动报名人员表 前端控制器 *

* * @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)); diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionReleaseTimeController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionReleaseTimeController.java index 5f6b98f..052aa19 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionReleaseTimeController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionReleaseTimeController.java @@ -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; +*/ /** *

- * 赛事排名定时发布表 前端控制器 + * 活动排名定时发布表 前端控制器 *

* * @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 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 list = competitionReleaseTimeService. @@ -210,7 +226,9 @@ public class CompetitionReleaseTimeController { } } - }*/ + }*//* + } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionRuleController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionRuleController.java index 8807b14..c42cbbb 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionRuleController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionRuleController.java @@ -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.*; +*/ /** *

- * 赛事规则表 前端控制器 + * 活动规则表 前端控制器 *

* * @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); } } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionStageController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionStageController.java index 2ca0d7b..0cc4b5c 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionStageController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionStageController.java @@ -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; +*/ /** *

- * 赛事阶段设置表 前端控制器 + * 活动阶段设置表 前端控制器 *

* * @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 { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionStageFileController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionStageFileController.java index 23c4901..d15f907 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionStageFileController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionStageFileController.java @@ -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 { } } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionTeamController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionTeamController.java index 7769639..8d31720 100644 --- a/competition/src/main/java/com/huoran/competition/controller/CompetitionTeamController.java +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionTeamController.java @@ -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; +*/ /** *

- * 赛事团队表 前端控制器 + * 活动团队表 前端控制器 *

* * @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 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 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 { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/controller/CompetitionUserDelController.java b/competition/src/main/java/com/huoran/competition/controller/CompetitionUserDelController.java new file mode 100644 index 0000000..6c8352c --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/controller/CompetitionUserDelController.java @@ -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; + +/** + *

+ * 记录用户删除的赛事 前端控制器 + *

+ * + * @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("新增失败"); + } + + + + +} + diff --git a/competition/src/main/java/com/huoran/competition/controller/CompleteCompetitionSetupController.java b/competition/src/main/java/com/huoran/competition/controller/CompleteCompetitionSetupController.java deleted file mode 100644 index 90aee98..0000000 --- a/competition/src/main/java/com/huoran/competition/controller/CompleteCompetitionSetupController.java +++ /dev/null @@ -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; - -/** - *

- * 完整赛事设置 前端控制器 - *

- * - * @author cheney - * @since 2022-11-16 - */ -@Api(tags = "完整赛事管理") -@RestController -@RequestMapping("/complete/competitionSetup") -public class CompleteCompetitionSetupController { - -} - diff --git a/competition/src/main/java/com/huoran/competition/controller/TeamInstructorController.java b/competition/src/main/java/com/huoran/competition/controller/TeamInstructorController.java index 87fc3e3..3c7fe14 100644 --- a/competition/src/main/java/com/huoran/competition/controller/TeamInstructorController.java +++ b/competition/src/main/java/com/huoran/competition/controller/TeamInstructorController.java @@ -17,13 +17,13 @@ import javax.validation.Valid; /** *

- * 赛事指导老师表 前端控制器 + * 活动指导老师表 前端控制器 *

* * @author cheney * @since 2022-12-02 */ -@Api(tags = "赛事指导老师管理") +@Api(tags = "kindergarten-活动指导老师管理") @RestController @RequestMapping("/competition/teamInstructor") public class TeamInstructorController { diff --git a/competition/src/main/java/com/huoran/competition/controller/TeamParticipantController.java b/competition/src/main/java/com/huoran/competition/controller/TeamParticipantController.java index f7170d8..56481b9 100644 --- a/competition/src/main/java/com/huoran/competition/controller/TeamParticipantController.java +++ b/competition/src/main/java/com/huoran/competition/controller/TeamParticipantController.java @@ -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; +*/ /** *

* 团队阶段参赛人员表 前端控制器 @@ -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 { } +*/ diff --git a/competition/src/main/java/com/huoran/competition/entity/CardVerify.java b/competition/src/main/java/com/huoran/competition/entity/CardVerify.java new file mode 100644 index 0000000..b2643dd --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/entity/CardVerify.java @@ -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; +} diff --git a/competition/src/main/java/com/huoran/competition/entity/Competition.java b/competition/src/main/java/com/huoran/competition/entity/Competition.java index ec29418..f97893b 100644 --- a/competition/src/main/java/com/huoran/competition/entity/Competition.java +++ b/competition/src/main/java/com/huoran/competition/entity/Competition.java @@ -15,7 +15,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事信息表 + * 活动信息表 *

* * @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 competitionAnnexList; - @ApiModelProperty(value = "大赛范围选择") - @TableField(exist = false) - private List competitionRangeList; - @ApiModelProperty(value = "比赛内容") - @TableField(exist = false) - private List contentList; - @ApiModelProperty(value = "比赛范围") - @TableField(exist = false) - private String range; + @ApiModelProperty(value = "赛制") @TableField(exist = false) private Integer rule; - @ApiModelProperty(value = "比赛范围(省市学校集合)") - @TableField(exist = false) - private List 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; } diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnex.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnex.java index 8e54c1f..da47c37 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnex.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnex.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事附件表 + * 活动附件表 *

* * @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 = "文件名称") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncement.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncement.java index 4fc6998..8538f07 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncement.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncement.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事公告表 + * 活动公告表 *

* * @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 announcementAnnexList; diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncementAnnex.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncementAnnex.java index 726c117..5934bf9 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncementAnnex.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionAnnouncementAnnex.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事公告附件表 + * 活动公告附件表 *

* * @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 = "文件名称") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionContent.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionContent.java index 8004e65..ac76230 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionContent.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionContent.java @@ -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 = "评分规则") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionProgress.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionProgress.java index 064d0a5..a8d5a23 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionProgress.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionProgress.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事进展表 + * 活动进展表 *

* * @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 = "创建时间") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionRange.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionRange.java index fa140ba..5472e52 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionRange.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionRange.java @@ -13,7 +13,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事范围表 + * 活动范围表 *

* * @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 = "省") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionRanking.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionRanking.java index 13b03d4..c12476f 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionRanking.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionRanking.java @@ -12,7 +12,7 @@ import java.util.Date; /** *

- * 赛事排名表 + * 活动排名表 *

* * @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不是)") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionRegistration.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionRegistration.java index 9871e83..33800a9 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionRegistration.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionRegistration.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事报名人员表 + * 活动报名人员表 *

* * @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") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionReleaseTime.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionReleaseTime.java index 60c811e..de5696d 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionReleaseTime.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionReleaseTime.java @@ -13,7 +13,7 @@ import java.util.Date; /** *

- * 赛事排名定时发布表 + * 活动排名定时发布表 *

* * @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批量手动导入)") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionRule.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionRule.java index 27aab03..77cf22e 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionRule.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionRule.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事规则表 + * 活动规则表 *

* * @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为单项赛)") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionStage.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionStage.java index 5226aed..0e2adac 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionStage.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionStage.java @@ -12,7 +12,7 @@ import java.util.Date; /** *

- * 赛事阶段设置表 + * 活动阶段设置表 *

* * @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; diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionStageContentSetting.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionStageContentSetting.java index 7b8944b..494d8d0 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionStageContentSetting.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionStageContentSetting.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事阶段内容设置 + * 活动阶段内容设置 *

* * @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") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionStageFile.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionStageFile.java index 8931246..6fa2ddf 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionStageFile.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionStageFile.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事阶段文件 + * 活动阶段文件 *

* * @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") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionTeam.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionTeam.java index 268523e..0474651 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompetitionTeam.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionTeam.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; /** *

- * 赛事团队表 + * 活动团队表 *

* * @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 = "团队名称") diff --git a/competition/src/main/java/com/huoran/competition/entity/CompetitionUserDel.java b/competition/src/main/java/com/huoran/competition/entity/CompetitionUserDel.java new file mode 100644 index 0000000..63aa7ec --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/entity/CompetitionUserDel.java @@ -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; + +/** + *

+ * 记录用户删除的赛事 + *

+ * + * @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; + + +} diff --git a/competition/src/main/java/com/huoran/competition/entity/CompleteCompetitionSetup.java b/competition/src/main/java/com/huoran/competition/entity/CompleteCompetitionSetup.java index 5707678..3ed8d4b 100644 --- a/competition/src/main/java/com/huoran/competition/entity/CompleteCompetitionSetup.java +++ b/competition/src/main/java/com/huoran/competition/entity/CompleteCompetitionSetup.java @@ -12,7 +12,7 @@ import lombok.experimental.Accessors; /** *

- * 完整赛事设置 + * 完整活动设置 *

* * @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 = "数量上限限制") diff --git a/competition/src/main/java/com/huoran/competition/entity/TeamInstructor.java b/competition/src/main/java/com/huoran/competition/entity/TeamInstructor.java index dfb6a5c..eead7a3 100644 --- a/competition/src/main/java/com/huoran/competition/entity/TeamInstructor.java +++ b/competition/src/main/java/com/huoran/competition/entity/TeamInstructor.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/TeamParticipant.java b/competition/src/main/java/com/huoran/competition/entity/TeamParticipant.java index 9ab93f9..ea72533 100644 --- a/competition/src/main/java/com/huoran/competition/entity/TeamParticipant.java +++ b/competition/src/main/java/com/huoran/competition/entity/TeamParticipant.java @@ -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 = "允许参赛人员账号") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/AfterLoginPageCompetitionListReq.java b/competition/src/main/java/com/huoran/competition/entity/req/AfterLoginPageCompetitionListReq.java index be342e8..f48250b 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/AfterLoginPageCompetitionListReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/AfterLoginPageCompetitionListReq.java @@ -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; } \ No newline at end of file diff --git a/competition/src/main/java/com/huoran/competition/entity/req/AllowedParticipateCompetitionReq.java b/competition/src/main/java/com/huoran/competition/entity/req/AllowedParticipateCompetitionReq.java index cb7e5ea..95a58e3 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/AllowedParticipateCompetitionReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/AllowedParticipateCompetitionReq.java @@ -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 = "序号(第几阶段)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/BatchUploadListCompetitionReq.java b/competition/src/main/java/com/huoran/competition/entity/req/BatchUploadListCompetitionReq.java index 8c7e9df..bdf566e 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/BatchUploadListCompetitionReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/BatchUploadListCompetitionReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/CompetitionContentReq.java b/competition/src/main/java/com/huoran/competition/entity/req/CompetitionContentReq.java index bb0e526..ae33846 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/CompetitionContentReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/CompetitionContentReq.java @@ -9,6 +9,6 @@ import java.util.List; @Data public class CompetitionContentReq { - @ApiModelProperty(value = "多个赛事内容", required = true) + @ApiModelProperty(value = "多个活动内容", required = true) List competitionContents; } diff --git a/competition/src/main/java/com/huoran/competition/entity/req/CompetitionDetailReq.java b/competition/src/main/java/com/huoran/competition/entity/req/CompetitionDetailReq.java index 4f4b83b..412427b 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/CompetitionDetailReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/CompetitionDetailReq.java @@ -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; diff --git a/competition/src/main/java/com/huoran/competition/entity/req/ContestStageFileReq.java b/competition/src/main/java/com/huoran/competition/entity/req/ContestStageFileReq.java index 1d225c3..65f09a5 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/ContestStageFileReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/ContestStageFileReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/DelCompetitionRankingReq.java b/competition/src/main/java/com/huoran/competition/entity/req/DelCompetitionRankingReq.java index 81f47a8..1c7e0c9 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/DelCompetitionRankingReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/DelCompetitionRankingReq.java @@ -14,7 +14,7 @@ import java.util.List; public class DelCompetitionRankingReq { - @ApiModelProperty(value = "赛事id") + @ApiModelProperty(value = "活动id") private Integer competitionId; @ApiModelProperty(value = "阶段id(集合)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/DetailsOfTotalTeamScoresReq.java b/competition/src/main/java/com/huoran/competition/entity/req/DetailsOfTotalTeamScoresReq.java index 57658f7..8ed25dd 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/DetailsOfTotalTeamScoresReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/DetailsOfTotalTeamScoresReq.java @@ -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(多个)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/DisableEnableCompetitionReq.java b/competition/src/main/java/com/huoran/competition/entity/req/DisableEnableCompetitionReq.java index 7d7fa0e..a7becca 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/DisableEnableCompetitionReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/DisableEnableCompetitionReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpGradeReq.java b/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpGradeReq.java index 3bebb7c..e03ae1e 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpGradeReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpGradeReq.java @@ -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;*/ diff --git a/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpRankReq.java b/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpRankReq.java index bdccb8a..9f58796 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpRankReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/ExcelImpRankReq.java @@ -9,7 +9,7 @@ import java.util.Date; @Data -@ApiModel(value = "批量导入大赛排名所需") +@ApiModel(value = "批量导入活动排名所需") public class ExcelImpRankReq { @ApiModelProperty(value = "团队名称") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageRankingReq.java b/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageRankingReq.java index 08e7d32..4261b7c 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageRankingReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageRankingReq.java @@ -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; } \ No newline at end of file diff --git a/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageTeamScoreDetailsReq.java b/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageTeamScoreDetailsReq.java index f1c7b8d..bbb33b2 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageTeamScoreDetailsReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/FrontDeskStageTeamScoreDetailsReq.java @@ -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(多个)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/FrontStageCompetitionReq.java b/competition/src/main/java/com/huoran/competition/entity/req/FrontStageCompetitionReq.java index ec8b267..41777f5 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/FrontStageCompetitionReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/FrontStageCompetitionReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/IsParticipantReq.java b/competition/src/main/java/com/huoran/competition/entity/req/IsParticipantReq.java index ec693f7..bfe79b3 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/IsParticipantReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/IsParticipantReq.java @@ -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 = "账号(无需传值)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/ManualPublishingParameterReq.java b/competition/src/main/java/com/huoran/competition/entity/req/ManualPublishingParameterReq.java index c7c64cc..2f76aca 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/ManualPublishingParameterReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/ManualPublishingParameterReq.java @@ -10,7 +10,7 @@ import lombok.Data; public class ManualPublishingParameterReq extends PageReq{ - @ApiModelProperty(value = "大赛Id") + @ApiModelProperty(value = "活动Id") private Integer competitionId; @ApiModelProperty(value = "当前的阶段id") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/OverallStandingsInThePointsRaceReq.java b/competition/src/main/java/com/huoran/competition/entity/req/OverallStandingsInThePointsRaceReq.java index b37833e..e64b0ac 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/OverallStandingsInThePointsRaceReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/OverallStandingsInThePointsRaceReq.java @@ -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(多个)") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/PageCompetitionListReq.java b/competition/src/main/java/com/huoran/competition/entity/req/PageCompetitionListReq.java index 52e02d7..9c82b25 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/PageCompetitionListReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/PageCompetitionListReq.java @@ -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; diff --git a/competition/src/main/java/com/huoran/competition/entity/req/PageGradeListReq.java b/competition/src/main/java/com/huoran/competition/entity/req/PageGradeListReq.java index 9636025..5b5a420 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/PageGradeListReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/PageGradeListReq.java @@ -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; diff --git a/competition/src/main/java/com/huoran/competition/entity/req/PageRegistrationStaffReq.java b/competition/src/main/java/com/huoran/competition/entity/req/PageRegistrationStaffReq.java index 7be3f28..0a9f02d 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/PageRegistrationStaffReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/PageRegistrationStaffReq.java @@ -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; diff --git a/competition/src/main/java/com/huoran/competition/entity/req/StageRankingReq.java b/competition/src/main/java/com/huoran/competition/entity/req/StageRankingReq.java index 407a13c..e0b94ce 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/StageRankingReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/StageRankingReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/StageTeamScoreDetailsReq.java b/competition/src/main/java/com/huoran/competition/entity/req/StageTeamScoreDetailsReq.java index dc24c6d..58ab688 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/StageTeamScoreDetailsReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/StageTeamScoreDetailsReq.java @@ -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") diff --git a/competition/src/main/java/com/huoran/competition/entity/req/WhetherToPublishParameterReq.java b/competition/src/main/java/com/huoran/competition/entity/req/WhetherToPublishParameterReq.java index ff7d5e3..43d095c 100644 --- a/competition/src/main/java/com/huoran/competition/entity/req/WhetherToPublishParameterReq.java +++ b/competition/src/main/java/com/huoran/competition/entity/req/WhetherToPublishParameterReq.java @@ -10,7 +10,7 @@ import lombok.Data; public class WhetherToPublishParameterReq { - @ApiModelProperty(value = "大赛Id") + @ApiModelProperty(value = "活动Id") private Integer competitionId; @ApiModelProperty(value = "当前的阶段id") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRangeResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRangeResp.java index 04b5634..92c1fbf 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRangeResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRangeResp.java @@ -6,10 +6,10 @@ import lombok.Data; @Data -@ApiModel(value = "大赛范围选择") +@ApiModel(value = "活动范围选择") public class CompetitionRangeResp { - @ApiModelProperty(value = "竞赛主键") + @ApiModelProperty(value = "活动主键") private String contestId; @ApiModelProperty(value = "省") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRuleResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRuleResp.java index a36d0e3..5087e36 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRuleResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionRuleResp.java @@ -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:总分)") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionStageFileResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionStageFileResp.java index 2bfcb6f..6eee161 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionStageFileResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/CompetitionStageFileResp.java @@ -14,14 +14,14 @@ import java.util.Date; /** *

- * 赛事阶段文件 + * 活动阶段文件 *

* * @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") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/DetailsOfTotalTeamScoresResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/DetailsOfTotalTeamScoresResp.java index 70c93bf..0cdee71 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/DetailsOfTotalTeamScoresResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/DetailsOfTotalTeamScoresResp.java @@ -14,7 +14,7 @@ import java.util.List; /** *

- * 赛事排名表 + * 活动排名表 *

* * @author cheney @@ -40,7 +40,7 @@ public class DetailsOfTotalTeamScoresResp { private Double teamScore; - @ApiModelProperty(value = "赛事规则") + @ApiModelProperty(value = "活动规则") private CompetitionRuleResp competitionRules; diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/FrontStageCompetitionResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/FrontStageCompetitionResp.java index c37b455..c2fae80 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/FrontStageCompetitionResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/FrontStageCompetitionResp.java @@ -13,7 +13,7 @@ import java.util.Date; /** *

- * 赛事阶段设置表 + * 活动阶段设置表 *

* * @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)") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/OverallEventRankingResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/OverallEventRankingResp.java index 5404d1e..3454af4 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/OverallEventRankingResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/OverallEventRankingResp.java @@ -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;*/ diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/StageRankingResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/StageRankingResp.java index 4a1827e..5e5eddb 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/StageRankingResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/StageRankingResp.java @@ -25,7 +25,7 @@ public class StageRankingResp { private String schoolName; - @ApiModelProperty(value = "耗时(用于区分线下赛事的耗时)") + @ApiModelProperty(value = "耗时(用于区分线下活动的耗时)") private String timeSum; diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/TeamAndLeaderResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/TeamAndLeaderResp.java index 66fc8c5..da44538 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/TeamAndLeaderResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/TeamAndLeaderResp.java @@ -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 = "学校") diff --git a/competition/src/main/java/com/huoran/competition/entity/resp/TotalRankingScoreDetailsResp.java b/competition/src/main/java/com/huoran/competition/entity/resp/TotalRankingScoreDetailsResp.java index 0cc698a..8ff7a67 100644 --- a/competition/src/main/java/com/huoran/competition/entity/resp/TotalRankingScoreDetailsResp.java +++ b/competition/src/main/java/com/huoran/competition/entity/resp/TotalRankingScoreDetailsResp.java @@ -9,7 +9,7 @@ import java.util.List; /** *

- * 赛事排名表 + * 活动排名表 *

* * @author cheney @@ -33,7 +33,7 @@ public class TotalRankingScoreDetailsResp { private String teamCalculationMethod; - @ApiModelProperty(value = "赛事规则") + @ApiModelProperty(value = "活动规则") private CompetitionRuleResp competitionRules; diff --git a/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionDetailsVO.java b/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionDetailsVO.java index 4d182e7..8948af9 100644 --- a/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionDetailsVO.java +++ b/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionDetailsVO.java @@ -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; diff --git a/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java b/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java index 5b8001f..28db550 100644 --- a/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java +++ b/competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java @@ -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 contestRangeRespList; - @ApiModelProperty(value = "比赛阶段") + @ApiModelProperty(value = "活动阶段") private List competitionStageList; - @ApiModelProperty(value = "比赛内容") + @ApiModelProperty(value = "活动内容") private List 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; + } diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnexMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnexMapper.java index a3e29d7..f88eadf 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnexMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnexMapper.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** *

- * 赛事附件表 Mapper 接口 + * 活动附件表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementAnnexMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementAnnexMapper.java index a441751..c8a2777 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementAnnexMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementAnnexMapper.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** *

- * 赛事公告附件表 Mapper 接口 + * 活动公告附件表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementMapper.java index c2d5fb1..9239ef1 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionAnnouncementMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** *

- * 赛事公告表 Mapper 接口 + * 活动公告表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionMapper.java index ba1ef9a..7b655f0 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionMapper.java @@ -16,7 +16,7 @@ import java.util.List; /** *

- * 赛事信息表 Mapper 接口 + * 活动信息表 Mapper 接口 *

* * @author cheney @@ -26,16 +26,22 @@ public interface CompetitionMapper extends BaseMapper { IPage contestPageConditionQueryByOccupationlab(Page page,@Param("req") PageCompetitionListReq pageCompetitionListReq); - IPage contestPageConditionQueryByNakadai(Page page, @Param("req") PageCompetitionListReq pageCompetitionListReq); + IPage backgroundActivityList(Page page, @Param("req") PageCompetitionListReq pageCompetitionListReq); + + IPage foregroundAppletActivityList(Page page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq); + + IPage postRegistrationList(Page page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq); + + IPage allContestsByStu(Page page,@Param("req") PageCompetitionListReq pageCompetitionListReq); IPage designatedRangeCompetitionByStu(Page page, @Param("req") PageCompetitionListReq req); - //本校赛事 + //本校活动 IPage schoolCompetition(Page page, @Param("req") AfterLoginPageCompetitionListReq req); - //赛事广场 + //活动广场 IPage tournamentSquare(Page page, @Param("req") AfterLoginPageCompetitionListReq req); IPage registeredBySchoolAndAllPlatforms(Page page,@Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq); @@ -49,4 +55,11 @@ public interface CompetitionMapper extends BaseMapper { IPage tournamentSquareNew(Page page, @Param("req") AfterLoginPageCompetitionListReq pageCompetitionListReq); List selectCompetitionStageNew(@Param("ruleId")Integer ruleId,@Param("accountId") Integer accountId); + + + //获取sys_platform表平台信息 + String obtainPlatformInformation(@Param("platformId")String platformId ); + + + } diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionProgressMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionProgressMapper.java index cc14400..38b70ea 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionProgressMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionProgressMapper.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** *

- * 赛事进展表 Mapper 接口 + * 活动进展表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRangeMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRangeMapper.java index c37bc58..09f7b4f 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRangeMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRangeMapper.java @@ -10,7 +10,7 @@ import java.util.List; /** *

- * 赛事范围表 Mapper 接口 + * 活动范围表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRankingMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRankingMapper.java index dd4ea3a..5689583 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRankingMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRankingMapper.java @@ -17,7 +17,7 @@ import java.util.List; /** *

- * 赛事排名表 Mapper 接口 + * 活动排名表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRegistrationMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRegistrationMapper.java index 1ed5d77..c924825 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRegistrationMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRegistrationMapper.java @@ -13,7 +13,7 @@ import java.util.List; /** *

- * 赛事报名人员表 Mapper 接口 + * 活动报名人员表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionReleaseTimeMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionReleaseTimeMapper.java index 7661c66..4d9645f 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionReleaseTimeMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionReleaseTimeMapper.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** *

- * 赛事排名定时发布表 Mapper 接口 + * 活动排名定时发布表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRuleMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRuleMapper.java index 82aa0bb..8191f49 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionRuleMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionRuleMapper.java @@ -10,7 +10,7 @@ import java.util.List; /** *

- * 赛事规则表 Mapper 接口 + * 活动规则表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageContentSettingMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageContentSettingMapper.java index a7c9cc7..dcbe306 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageContentSettingMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageContentSettingMapper.java @@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Mapper; /** *

- * 赛事阶段内容设置 Mapper 接口 + * 活动阶段内容设置 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageFileMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageFileMapper.java index 192c45a..d3ca4b3 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageFileMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageFileMapper.java @@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param; /** *

- * 赛事阶段文件 Mapper 接口 + * 活动阶段文件 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageMapper.java index 985b43f..14b78b0 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionStageMapper.java @@ -10,7 +10,7 @@ import java.util.List; /** *

- * 赛事阶段设置表 Mapper 接口 + * 活动阶段设置表 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionTeamMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionTeamMapper.java index f1ba32e..357d319 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompetitionTeamMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionTeamMapper.java @@ -18,7 +18,7 @@ import java.util.List; /** *

- * 赛事团队表 Mapper 接口 + * 活动团队表 Mapper 接口 *

* * @author cheney @@ -36,7 +36,7 @@ public interface CompetitionTeamMapper extends BaseMapper { 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 { //团队赛求和 double teamSum(@Param("req") StageRankingReq req); - //网上个人积分比赛 + //网上个人积分活动 List onlineIndividualPointsCompetition(@Param("req") StageRankingReq req); @@ -80,4 +80,5 @@ public interface CompetitionTeamMapper extends BaseMapper { List multipleStageTeamScoreDetails(@Param("req") StageTeamScoreDetailsReq req); + } diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompetitionUserDelMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompetitionUserDelMapper.java new file mode 100644 index 0000000..80ac7c4 --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/mapper/CompetitionUserDelMapper.java @@ -0,0 +1,16 @@ +package com.huoran.competition.mapper; + +import com.huoran.competition.entity.CompetitionUserDel; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 记录用户删除的赛事 Mapper 接口 + *

+ * + * @author cheney + * @since 2023-12-12 + */ +public interface CompetitionUserDelMapper extends BaseMapper { + +} diff --git a/competition/src/main/java/com/huoran/competition/mapper/CompleteCompetitionSetupMapper.java b/competition/src/main/java/com/huoran/competition/mapper/CompleteCompetitionSetupMapper.java index 00bf67a..dac687b 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/CompleteCompetitionSetupMapper.java +++ b/competition/src/main/java/com/huoran/competition/mapper/CompleteCompetitionSetupMapper.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestParam; /** *

- * 完整赛事设置 Mapper 接口 + * 完整活动设置 Mapper 接口 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml index 4a4fa79..831d583 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml +++ b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml @@ -47,15 +47,12 @@ ORDER BY c.create_time desc - + + + diff --git a/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionUserDelMapper.xml b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionUserDelMapper.xml new file mode 100644 index 0000000..534fe7e --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionUserDelMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnexService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnexService.java index ff9f0ce..57ad497 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnexService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnexService.java @@ -7,7 +7,7 @@ import java.util.List; /** *

- * 赛事附件表 服务类 + * 活动附件表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementAnnexService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementAnnexService.java index 05d920a..9013e54 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementAnnexService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementAnnexService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事公告附件表 服务类 + * 活动公告附件表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementService.java index 55ab707..56dc100 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionAnnouncementService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事公告表 服务类 + * 活动公告表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionProgressService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionProgressService.java index aec6fff..6687bd6 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionProgressService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionProgressService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事进展表 服务类 + * 活动进展表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionRangeService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionRangeService.java index 4ae990f..d0b2a29 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionRangeService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionRangeService.java @@ -10,7 +10,7 @@ import java.util.List; /** *

- * 赛事范围表 服务类 + * 活动范围表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionRankingService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionRankingService.java index 205264d..868264c 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionRankingService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionRankingService.java @@ -17,7 +17,7 @@ import java.util.Map; /** *

- * 赛事排名表 服务类 + * 活动排名表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionRegistrationService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionRegistrationService.java index 491b9d0..281a1b0 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionRegistrationService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionRegistrationService.java @@ -13,7 +13,7 @@ import java.util.List; /** *

- * 赛事报名人员表 服务类 + * 活动报名人员表 服务类 *

* * @author cheney @@ -34,4 +34,6 @@ public interface CompetitionRegistrationService extends IService listOfExportSub, HttpServletResponse response) throws IOException; R apply(CompetitionRegistration competitionRegistration); + + CompetitionRegistration enquireWhetherToRegister(Integer accountId,String competitionId); } diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionReleaseTimeService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionReleaseTimeService.java index 32dfc45..4be093b 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionReleaseTimeService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionReleaseTimeService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事排名定时发布表 服务类 + * 活动排名定时发布表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionRuleService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionRuleService.java index 4587afa..22e3a8d 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionRuleService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionRuleService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事规则表 服务类 + * 活动规则表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionService.java index 8b9fe35..2bd3bcc 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionService.java @@ -14,7 +14,7 @@ import java.util.concurrent.Future; /** *

- * 赛事信息表 服务类 + * 活动信息表 服务类 *

* * @author cheney @@ -28,7 +28,7 @@ public interface CompetitionService extends IService { R competitionPageConditionQueryByOccupationlab(PageCompetitionListReq pageCompetitionListReq); - R competitionPageConditionQueryByNakadai(PageCompetitionListReq pageCompetitionListReq); + R backgroundActivityList(PageCompetitionListReq pageCompetitionListReq); Future> notLoggedInBeforeStudentEvents(PageCompetitionListReq pageCompetitionListReq); @@ -36,7 +36,7 @@ public interface CompetitionService extends IService { R addCompetition(Competition competition); - R detailsOfCompetitionStage(CompetitionDetailReq req); +// R detailsOfCompetitionStage(CompetitionDetailReq req); R allowedParticipateCompetition(AllowedParticipateCompetitionReq req) throws ScriptException; diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionStageContentSettingService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionStageContentSettingService.java index b52f710..ddfad89 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionStageContentSettingService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionStageContentSettingService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 赛事阶段内容设置 服务类 + * 活动阶段内容设置 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionStageFileService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionStageFileService.java index d4ac9bb..5c85921 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionStageFileService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionStageFileService.java @@ -10,7 +10,7 @@ import java.util.List; /** *

- * 赛事阶段文件 服务类 + * 活动阶段文件 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionStageService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionStageService.java index 7191d4a..c01f8a4 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionStageService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionStageService.java @@ -16,7 +16,7 @@ import java.util.List; /** *

- * 赛事阶段设置表 服务类 + * 活动阶段设置表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionTeamService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionTeamService.java index 9e8efe9..ef1323a 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompetitionTeamService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionTeamService.java @@ -9,7 +9,7 @@ import javax.script.ScriptException; /** *

- * 赛事团队表 服务类 + * 活动团队表 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/CompetitionUserDelService.java b/competition/src/main/java/com/huoran/competition/service/CompetitionUserDelService.java new file mode 100644 index 0000000..287cde4 --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/service/CompetitionUserDelService.java @@ -0,0 +1,16 @@ +package com.huoran.competition.service; + +import com.huoran.competition.entity.CompetitionUserDel; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 记录用户删除的赛事 服务类 + *

+ * + * @author cheney + * @since 2023-12-12 + */ +public interface CompetitionUserDelService extends IService { + +} diff --git a/competition/src/main/java/com/huoran/competition/service/CompleteCompetitionSetupService.java b/competition/src/main/java/com/huoran/competition/service/CompleteCompetitionSetupService.java index 903e12b..4371735 100644 --- a/competition/src/main/java/com/huoran/competition/service/CompleteCompetitionSetupService.java +++ b/competition/src/main/java/com/huoran/competition/service/CompleteCompetitionSetupService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** *

- * 完整赛事设置 服务类 + * 完整活动设置 服务类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnexServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnexServiceImpl.java index 35f95d0..0e6475d 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnexServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnexServiceImpl.java @@ -12,7 +12,7 @@ import java.util.List; /** *

- * 赛事附件表 服务实现类 + * 活动附件表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementAnnexServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementAnnexServiceImpl.java index 4d7aac0..bf07b67 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementAnnexServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementAnnexServiceImpl.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Service; /** *

- * 赛事公告附件表 服务实现类 + * 活动公告附件表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementServiceImpl.java index 57de676..ca23ecc 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionAnnouncementServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Service; /** *

- * 赛事公告表 服务实现类 + * 活动公告表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionContentServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionContentServiceImpl.java index e021d40..d676596 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionContentServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionContentServiceImpl.java @@ -38,7 +38,7 @@ public class CompetitionContentServiceImpl extends ServiceImpl { if (!ObjectUtil.isEmpty(competitionContent.getCompetitionStageContentSetting())){ - //添加线下赛事内容 + //添加线下活动内容 stageContentSettingMapper.insert(competitionContent.getCompetitionStageContentSetting()); } baseMapper.insert(competitionContent); @@ -79,14 +79,14 @@ public class CompetitionContentServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("stage_id",competitionContent.getStageId()); CompetitionStageContentSetting stageContentSetting = stageContentSettingMapper.selectOne(queryWrapper); if (!ObjectUtil.isEmpty(stageContentSetting)){ stageContentSettingMapper.updateById(competitionContent.getCompetitionStageContentSetting()); }else { - //新增线下赛事内容 + //新增线下活动内容 stageContentSettingMapper.insert(competitionContent.getCompetitionStageContentSetting()); } @@ -107,7 +107,7 @@ public class CompetitionContentServiceImpl extends ServiceImpl - * 赛事进展表 服务实现类 + * 活动进展表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRangeServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRangeServiceImpl.java index a0bded5..3561868 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRangeServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRangeServiceImpl.java @@ -14,7 +14,7 @@ import java.util.List; /** *

- * 赛事范围表 服务实现类 + * 活动范围表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRankingServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRankingServiceImpl.java index ccf9788..a29594a 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRankingServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRankingServiceImpl.java @@ -46,7 +46,7 @@ import java.util.stream.Collectors; /** *

- * 赛事排名表 服务实现类 + * 活动排名表 服务实现类 *

* * @author cheney @@ -205,7 +205,7 @@ public class CompetitionRankingServiceImpl extends ServiceImpl parse = JSON.parseObject(record, new TypeReference>() { }); @@ -688,16 +688,16 @@ public class CompetitionRankingServiceImpl extends ServiceImpl frontStageCompetition(FrontStageCompetitionReq req) { - //获取本竞赛下的阶段信息以及权重比 + //获取本活动下的阶段信息以及权重比 List acquisitionWeightRatio = ruleMapper.acquisitionWeightRatio(req.getCompetitionId()); - //查看赛事类型是个人赛还是团队赛事 + //查看活动类型是个人赛还是团队活动 List newList = new ArrayList<>(); @@ -710,11 +710,11 @@ public class CompetitionRankingServiceImpl extends ServiceImpl overallEventRankingRespList = new ArrayList<>(); - //查看赛事类型是个人赛还是团队赛事 + //查看活动类型是个人赛还是团队活动 CompleteCompetitionSetup competitionSetup = competitionSetupMapper.getRaceSettingsByRaceId(req.getCompetitionId()); for (Integer stageId : req.getStageIds()) { OverallEventRankingResp rankingResp = new OverallEventRankingResp(); @@ -962,17 +962,17 @@ public class CompetitionRankingServiceImpl extends ServiceImpl pointRace(FrontDeskStageRankingReq req) { IPage pageList = null; - //赛事类型(0为个人赛,1为团队赛)默认为0 + //活动类型(0为个人赛,1为团队赛)默认为0 if (req.getCompetitionSetup().getCompetitionType() == TeamCalculationMethodConstant.TYPE_OF_EVENT_INDIVIDUAL_COMPETITION) {//个人赛 Page page = new Page(req.getPageNum(), req.getPageSize()); pageList = teamMapper.frontDeskIndividualStageRanking(page, req); return pageList; } else if (req.getCompetitionSetup().getCompetitionType() == TeamCalculationMethodConstant.TYPE_OF_EVENT_TEAM_EVENT) {//团队赛 //团队排名:用时以及分数依据当前阶段成绩的计算方式(最高分、平均分、求和)取 - //如:当前阶段赛事成绩计算方式为取最高分,则用户用时以及分数取得是当前团队下的最高分当前成绩的用时以及分数 + //如:当前阶段活动成绩计算方式为取最高分,则用户用时以及分数取得是当前团队下的最高分当前成绩的用时以及分数 //团队成绩计算方式(0:最高分,1:平均分,2:求和) - //1.获取参与该大赛的团队 + //1.获取参与该活动的团队 String teamIds = teamMapper.getTeamInformation(req.getCompetitionId()); if (teamIds != null || teamIds.length() >= 0) { req.setTeamIds(teamIds); diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRegistrationServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRegistrationServiceImpl.java index a0edb8d..8405ab2 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRegistrationServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRegistrationServiceImpl.java @@ -37,7 +37,7 @@ import java.util.List; /** *

- * 赛事报名人员表 服务实现类 + * 活动报名人员表 服务实现类 *

* * @author cheney @@ -92,21 +92,21 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl setupQueryWrapper = new QueryWrapper<>(); - setupQueryWrapper.eq("competition_id",contestId); + setupQueryWrapper.eq("competition_id", contestId); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(setupQueryWrapper); //团队赛类型 - if (setup.getCompetitionType()==1){ + if (setup.getCompetitionType() == 1) { QueryWrapper teamQueryWrapper = new QueryWrapper<>(); - teamQueryWrapper.eq("account_id",accountId); - teamQueryWrapper.eq("competition_id",contestId); + teamQueryWrapper.eq("account_id", accountId); + teamQueryWrapper.eq("competition_id", contestId); CompetitionTeam one = competitionTeamService.getOne(teamQueryWrapper); - if (one!=null){ - if (one.getCaptain()==0){ + if (one != null) { + if (one.getCaptain() == 0) { QueryWrapper competitionTeamQueryWrapper = new QueryWrapper<>(); - competitionTeamQueryWrapper.eq("pid",one.getTeamId()); - competitionTeamQueryWrapper.eq("competition_id",contestId); + competitionTeamQueryWrapper.eq("pid", one.getTeamId()); + competitionTeamQueryWrapper.eq("competition_id", contestId); List list = competitionTeamService.list(competitionTeamQueryWrapper); - if (list!=null && list.size()>0){ + if (list != null && list.size() > 0) { return R.error("取消失败,需要把成员移除后取消!"); } competitionTeamService.removeById(one); @@ -124,20 +124,20 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl page = new Page(req.getPageNum(), req.getPageSize()); IPage applicantVOList = baseMapper.selectApplicantByCondition(page, req); QueryWrapper setupQueryWrapper = new QueryWrapper<>(); - setupQueryWrapper.eq("competition_id",req.getCompetitionId()); + setupQueryWrapper.eq("competition_id", req.getCompetitionId()); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(setupQueryWrapper); List excelDataList = new ArrayList<>(); List personalExcelData = new ArrayList<>(); //导出团队名称 - if (setup.getCompetitionType()==1){ + if (setup.getCompetitionType() == 1) { applicantVOList.getRecords().forEach(registrationVO -> { QueryWrapper teamQueryWrapper = new QueryWrapper<>(); - teamQueryWrapper.eq("competition_id",req.getCompetitionId()); - teamQueryWrapper.eq("account_id",registrationVO.getAccountId()); + teamQueryWrapper.eq("competition_id", req.getCompetitionId()); + teamQueryWrapper.eq("account_id", registrationVO.getAccountId()); CompetitionTeam team = competitionTeamMapper.selectOne(teamQueryWrapper); - if (team!=null && team.getCaptain()==0){ + if (team != null && team.getCaptain() == 0) { registrationVO.setTeamName(team.getTeamName()); - }else if (team!=null){ + } else if (team != null) { CompetitionTeam team1 = competitionTeamMapper.selectById(team.getPid()); registrationVO.setTeamName(team1.getTeamName()); } @@ -147,7 +147,7 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl { PersonalExcelData personalExcelData1 = new PersonalExcelData(); @@ -164,10 +164,10 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl setupQueryWrapper = new QueryWrapper<>(); - setupQueryWrapper.eq("competition_id",competitionRegistration.getCompetitionId()); + setupQueryWrapper.eq("competition_id", competitionRegistration.getCompetitionId()); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(setupQueryWrapper); //团队赛限制验证 - if (setup.getCompetitionType()==1){ - if (competitionRegistration.getTeamId()!=null){ + if (setup.getCompetitionType() == 1) { + if (competitionRegistration.getTeamId() != null) { //团队数量限制 - if (setup.getQuantityLimit()!=null){ + if (setup.getQuantityLimit() != null) { QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("competition_id",competitionRegistration.getCompetitionId()); + wrapper.eq("competition_id", competitionRegistration.getCompetitionId()); wrapper.groupBy("team_id"); List competitionRegistrations = baseMapper.selectList(wrapper); - if (competitionRegistrations!=null && competitionRegistration.isJoin() && competitionRegistrations.size()>=setup.getQuantityLimit()){ + if (competitionRegistrations != null && competitionRegistration.isJoin() && competitionRegistrations.size() >= setup.getQuantityLimit()) { throw new CustomException(ExceptionEnum.TEAM_LIMIT2); } } //团队人数限制 - if (setup.getMaxTeamSize()!=null){ + if (setup.getMaxTeamSize() != null) { QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("competition_id",competitionRegistration.getCompetitionId()); - wrapper.eq("team_id",competitionRegistration.getTeamId()); + wrapper.eq("competition_id", competitionRegistration.getCompetitionId()); + wrapper.eq("team_id", competitionRegistration.getTeamId()); List competitionRegistrations = baseMapper.selectList(wrapper); - if (competitionRegistrations!=null && competitionRegistration.isJoin() && competitionRegistrations.size()>=setup.getMaxTeamSize()){ + if (competitionRegistrations != null && competitionRegistration.isJoin() && competitionRegistrations.size() >= setup.getMaxTeamSize()) { throw new CustomException(ExceptionEnum.TEAM_LIMIT1); } } } - }else { + } else { //个人赛人数限制 - if (setup.getQuantityLimit()!=null){ + if (setup.getQuantityLimit() != null) { QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("competition_id",competitionRegistration.getCompetitionId()); + wrapper.eq("competition_id", competitionRegistration.getCompetitionId()); List competitionRegistrations = baseMapper.selectList(wrapper); - if (competitionRegistrations!=null && competitionRegistrations.size()>=setup.getQuantityLimit()){ + if (competitionRegistrations != null && competitionRegistrations.size() >= setup.getQuantityLimit()) { throw new CustomException(ExceptionEnum.TEAM_LIMIT3); } } } //内部添加,一路绿灯 - if (competitionRegistration.getIdentification() ==null || competitionRegistration.getIdentification() != 1) { + if (competitionRegistration.getIdentification() == null || competitionRegistration.getIdentification() != 1) { //是否需要报名邀请码 Integer code = setup.getIsNeedCode(); if (code == 1) { @@ -257,8 +257,8 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl competitionStages = competitionStageMapper.selectCompetitionStageBySetupId(setup.getSetupId()); for (CompetitionStage competitionStage : competitionStages) { @@ -283,4 +283,13 @@ public class CompetitionRegistrationServiceImpl extends ServiceImpl 0 ? R.ok() : R.error(); } } + + @Override + public CompetitionRegistration enquireWhetherToRegister(Integer accountId, String competitionId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("competition_id", competitionId); + queryWrapper.eq("account_id", accountId); + CompetitionRegistration registration = baseMapper.selectOne(queryWrapper); + return registration; + } } diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionReleaseTimeServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionReleaseTimeServiceImpl.java index 6841a62..c44a002 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionReleaseTimeServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionReleaseTimeServiceImpl.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Service; /** *

- * 赛事排名定时发布表 服务实现类 + * 活动排名定时发布表 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRuleServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRuleServiceImpl.java index 9b46063..28c15c4 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRuleServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionRuleServiceImpl.java @@ -14,7 +14,7 @@ import java.util.List; /** *

- * 赛事规则表 服务实现类 + * 活动规则表 服务实现类 *

* * @author cheney @@ -49,7 +49,7 @@ public class CompetitionRuleServiceImpl extends ServiceImpl updatedStages = competitionRule.getCompetitionStageList(); - //查询当前赛事的所有阶段 + //查询当前活动的所有阶段 List existingStages = competitionStageMapper.selectList( new QueryWrapper().eq("rule_id",competitionRule.getRuleId()) ); @@ -115,16 +115,16 @@ public class CompetitionRuleServiceImpl extends ServiceImpl().eq("stage_id",existingStage.getStageId())); - //删除赛事阶段内容设置c_competition_stage_content_setting + //删除活动阶段内容设置c_competition_stage_content_setting competitionStageContentSettingMapper.delete( new QueryWrapper().eq("stage_id",existingStage.getStageId())); - //赛事阶段文件c_competition_stage_file + //活动阶段文件c_competition_stage_file competitionStageFileMapper.delete( new QueryWrapper().eq("stage_id",existingStage.getStageId())); - //赛事排名表c_competition_ranking + //活动排名表c_competition_ranking competitionRankingMapper.delete( new QueryWrapper().eq("stage_id",existingStage.getStageId())); - //赛事排名定时发布表c_competition_release_time + //活动排名定时发布表c_competition_release_time competitionReleaseTimeMapper.delete( new QueryWrapper().eq("stage_id",existingStage.getStageId())); //团队阶段参赛人员表c_team_participant diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionServiceImpl.java index fb116db..cd302d8 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionServiceImpl.java @@ -34,7 +34,7 @@ import java.util.stream.Collectors; /** *

- * 赛事信息表 服务实现类 + * 活动信息表 服务实现类 *

* * @author cheney @@ -91,12 +91,12 @@ public class CompetitionServiceImpl extends ServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("name", competition.getName()); - //大赛范围(0:本校内 1:全平台 2:指定区域、院校) - switch (competition.getCompetitionScope()) { + //活动范围(0:本校内 1:全平台 2:指定区域、院校) + /*switch (competition.getCompetitionScope()) { case 0: wrapper.eq("school_id", competition.getSchoolId()); break; - } + }*/ if (competition.getId() != null) { wrapper.last(" and id != " + competition.getId()); } @@ -108,7 +108,7 @@ public class CompetitionServiceImpl extends ServiceImpl applicantWrapper = new QueryWrapper<>(); applicantWrapper.eq("competition_id", competitionId); applicantWrapper.select("id"); @@ -117,7 +117,7 @@ public class CompetitionServiceImpl extends ServiceImpl applicantIds = applicants.stream().map(CompetitionRegistration::getId).collect(Collectors.toList()); competitionRegistrationMapper.deleteBatchIds(applicantIds); } - // 删除赛事进展 + // 删除活动进展 QueryWrapper contestProgressWrapper = new QueryWrapper<>(); contestProgressWrapper.eq("competition_id", competitionId); contestProgressWrapper.select("id"); @@ -128,7 +128,7 @@ public class CompetitionServiceImpl extends ServiceImpl setupQueryWrapper = new QueryWrapper<>(); setupQueryWrapper.eq("competition_id", competitionId); CompleteCompetitionSetup completeCompetitionSetup = completeCompetitionSetupMapper.selectOne(setupQueryWrapper); @@ -156,7 +156,7 @@ public class CompetitionServiceImpl extends ServiceImpl 0; } @@ -169,9 +169,19 @@ public class CompetitionServiceImpl extends ServiceImpl page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); - IPage pageList = baseMapper.contestPageConditionQueryByNakadai(page, pageCompetitionListReq); + IPage pageList = baseMapper.backgroundActivityList(page, pageCompetitionListReq); + pageList.getRecords().forEach(c->{ + if (c.getCompetitionScope().equals("1")){ + c.setCompetitionScope("全平台"); + }else{ + c.setCompetitionScope(baseMapper.obtainPlatformInformation(c.getCompetitionScope())); + } + + + }); return getR(pageList); } @@ -180,7 +190,7 @@ public class CompetitionServiceImpl extends ServiceImpl> notLoggedInBeforeStudentEvents(PageCompetitionListReq pageCompetitionListReq) { Page page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); IPage pageList = null; - //大赛范围(0:本校内 1:全平台 2.指定区域、院校) 3表示不限 + //活动范围(0:本校内 1:全平台 2.指定区域、院校) 3表示不限 if ("2".equals(pageCompetitionListReq.getCompetitionScope())) { pageList = baseMapper.designatedRangeCompetitionByStu(page, pageCompetitionListReq); } else { @@ -191,14 +201,14 @@ public class CompetitionServiceImpl extends ServiceImpl stages = baseMapper.selectCompetitionStageNew(contest.getRuleId(), accountId); contest.setCompetitionStageList(stages); } @@ -213,7 +223,7 @@ public class CompetitionServiceImpl extends ServiceImpl page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); // IPage pageList = null; -// //赛事类型(1.本校赛事/2.赛事广场/3.已报名赛事) +// //活动类型(1.本校活动/2.活动广场/3.已报名活动) // switch (pageCompetitionListReq.getEventType()) { // case 1: // pageList = baseMapper.schoolCompetition(page, pageCompetitionListReq); @@ -226,8 +236,8 @@ public class CompetitionServiceImpl extends ServiceImpl> competitionAfterLogin(AfterLoginPageCompetitionListReq pageCompetitionListReq) { return CompletableFuture.supplyAsync(() -> { Page page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); - IPage pageList = null; - //赛事类型(1.本校赛事/2.赛事广场/3.已报名赛事) - switch (pageCompetitionListReq.getEventType()) { + IPage pageList = null; + //读取的列表(0:首页活动/1.已报名活动) + switch (pageCompetitionListReq.getListType()){ + case 0: + //查询未删除且启用发布状态为发布后的 + baseMapper.foregroundAppletActivityList(page, pageCompetitionListReq); + break; + case 1: + //查询我报名的列表 + baseMapper.postRegistrationList(page, pageCompetitionListReq); + break; + + } + + + //活动类型(1.本校活动/2.活动广场/3.已报名活动) + /* switch (pageCompetitionListReq.getEventType()) { case 1: pageList = baseMapper.schoolCompetition(page, pageCompetitionListReq); break; @@ -265,8 +289,8 @@ public class CompetitionServiceImpl extends ServiceImpl { + /*pageList.getRecords().forEach(contest -> { if (contest.getCompetitionScope() == 1) { contest.setRange("全平台"); } else if (contest.getCompetitionScope() == 2) { @@ -287,26 +311,26 @@ public class CompetitionServiceImpl extends ServiceImpl stages = baseMapper.selectCompetitionStageNew(contest.getRuleId(), pageCompetitionListReq.getAccountId()); contest.setCompetitionStageList(stages); - }); + });*/ return pageList; }, competitionExecutor); } private R getR(IPage pageList) { pageList.getRecords().forEach(contest -> { - if (contest.getCompetitionScope() == 1) { + /* if (contest.getCompetitionScope() == 1) { contest.setRange("全平台"); } else if (contest.getCompetitionScope() == 2) { contest.setRange("指定范围"); - //依据赛事id查询指定范围的省、市、学校 + //依据活动id查询指定范围的省、市、学校 contest.setContestRangeRespList(competitionRangeMapper.getRangeByContestId(contest.getId())); } else if (contest.getCompetitionScope() == 0) { contest.setRange("本校内"); - } - //查询赛事阶段数据 + }*/ + //查询活动阶段数据 List stages = baseMapper.selectCompetitionStage(contest.getId(), 0); R competitionContent = competitionContentService.getCompetitionContent(contest.getId()); @@ -341,14 +365,14 @@ public class CompetitionServiceImpl extends ServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("competition_id", contest.getId()); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(wrapper); if (setup != null) { setup.setInvitationCode(null); contest.setSetup(setup); - //查询用户当前赛事的团队id + //查询用户当前活动的团队id if (setup.getCompetitionType() == 1) { QueryWrapper teamQueryWrapper = new QueryWrapper<>(); teamQueryWrapper.eq("competition_id", contest.getId()); @@ -376,48 +400,37 @@ public class CompetitionServiceImpl extends ServiceImpl比赛范围为非本校内的比赛,名字要全平台判重。本校内的竞赛名字,只需要本校内判重 boolean isRepeat = repeat(competition); if (isRepeat) { - return R.error("赛事已存在"); + return R.error("活动已经存在"); } + int insert = baseMapper.insert(competition); if (competition.getCompetitionAnnexList().size() > 0) { - competition.getCompetitionAnnexList().forEach(CompetitionAnnex -> { - CompetitionAnnex.setCompetitionId(competition.getId()); - competitionAnnexMapper.insert(CompetitionAnnex);//保存比赛附件 + competition.getCompetitionAnnexList().forEach(competitionAnnex -> { + competitionAnnex.setCompetitionId(competition.getId()); + competitionAnnexMapper.insert(competitionAnnex); // Save competition annex }); - } - if (competition.getCompetitionRangeList().size() > 0) { + + /*if (competition.getCompetitionRangeList().size() > 0) { competition.getCompetitionRangeList().forEach(competitionRange -> { Integer getCompetitionId = competition.getId(); competitionRange.setCompetitionId(getCompetitionId); - competitionRangeMapper.insert(competitionRange);//保存比赛范围 + competitionRangeMapper.insert(competitionRange); // Save activity range }); - } - Integer setupId = 0; - //赛事类型为完整赛事,保存其他信息 -// if (competition.getReleaseType()==1){ - competition.getCompleteCompetitionSetup().setCompetitionId(competition.getId()); - int insert1 = completeCompetitionSetupMapper.insert(competition.getCompleteCompetitionSetup()); - if (insert1 > 0) { - setupId = competition.getCompleteCompetitionSetup().getSetupId(); - } -// } + }*/ + Integer setupId = 0; return insert > 0 ? R.ok().put("setupId", setupId).put("competitionId", competition.getId()) : R.error(); } - @Override + + + /*@Override public R detailsOfCompetitionStage(CompetitionDetailReq req) { - //1.本次竞赛参加了该阶段的全部团队,用于与参加本阶段比赛的数据作对比 + //1.本次活动参加了该阶段的全部团队,用于与参加本阶段活动的数据作对比 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("competition_id", req.getContestId()); queryWrapper.eq("captain", 0); @@ -427,6 +440,8 @@ public class CompetitionServiceImpl extends ServiceImpl pageList = baseMapper.detailsOfCompetitionStage(page, req); return R.ok().put("page", pageList).put("applicantSize", competitionTeams.size()); } +*/ + @Override public R allowedParticipateCompetition(AllowedParticipateCompetitionReq req) throws ScriptException { @@ -449,7 +464,7 @@ public class CompetitionServiceImpl extends ServiceImpl respList = (List) r.get("list"); if (respList != null && respList.size() > 0) { - //查询完整赛事设置 + //查询完整活动设置 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("competition_id", req.getCompetitionId()); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(wrapper); @@ -484,7 +499,7 @@ public class CompetitionServiceImpl extends ServiceImpl sub = CollectionUtil.sub(respList, 0, min); - //赛事类型(0为个人赛,1为团队赛) + //活动类型(0为个人赛,1为团队赛) if (setup.getCompetitionType() == 0) { List list = new ArrayList<>(); for (ListOfStageResultsResp resultsResp : sub) { @@ -493,7 +508,7 @@ public class CompetitionServiceImpl extends ServiceImpl list = new ArrayList<>(); for (ListOfStageResultsResp resultsResp : sub) { @@ -502,7 +517,7 @@ public class CompetitionServiceImpl extends ServiceImpl teamQueryWrapper = new QueryWrapper<>(); teamQueryWrapper.eq("competition_id", req.getCompetitionId()); @@ -585,20 +600,20 @@ public class CompetitionServiceImpl extends ServiceImpl - * 赛事阶段内容设置 服务实现类 + * 活动阶段内容设置 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageFileServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageFileServiceImpl.java index 8d4cca1..c5352f4 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageFileServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageFileServiceImpl.java @@ -20,7 +20,7 @@ import java.util.List; /** *

- * 赛事阶段文件 服务实现类 + * 活动阶段文件 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageServiceImpl.java index 1d89bd3..797407f 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionStageServiceImpl.java @@ -44,7 +44,7 @@ import java.util.stream.Collectors; /** *

- * 赛事阶段设置表 服务实现类 + * 活动阶段设置表 服务实现类 *

* * @author cheney @@ -111,7 +111,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("competition_id", competitionId); queryWrapper.eq("captain", 0); @@ -162,14 +162,14 @@ public class CompetitionStageServiceImpl extends ServiceImpl queryWrapper1 = new QueryWrapper<>(); queryWrapper1.eq("stage_id", stageId); queryWrapper1.last(" AND unix_timestamp( start_time ) <= unix_timestamp( NOW( ) ) " + " AND unix_timestamp( end_time ) <= unix_timestamp( NOW( ) )"); CompetitionContent competitionContent = competitionContentMapper.selectOne(queryWrapper1); - if (competitionContent == null) {//阶段赛未结束前的处理(没有进入比赛的人员 分数为—) + if (competitionContent == null) {//阶段赛未结束前的处理(没有进入活动的人员 分数为—) if (competitionSetup.getCompetitionType() == 0) { //个人赛 @@ -183,7 +183,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl ruleQueryWrapper = new QueryWrapper<>(); ruleQueryWrapper.eq("setup_id", competitionSetup.getSetupId()); CompetitionRule rule = ruleMapper.selectOne(ruleQueryWrapper); if (rule.getRule() == 1) {//rule 赛制(0为积分赛,1为淘汰赛,2为单项赛) if (list != null && list.size() > 0) { - //查询完整赛事设置 + //查询完整活动设置 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("competition_id", competitionId); @@ -330,7 +330,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl teamWithResults = pointRace.stream().map(ListOfStageResultsResp::getTeamId).collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 @@ -382,12 +382,12 @@ public class CompetitionStageServiceImpl extends ServiceImpl allApplicants = selectApplicantByCondition.stream().map(RegistrationVO::getAccountId).collect(Collectors.toList()); //参与本次阶段,有成绩的队伍 B集合 List teamWithResults = pointRace.stream().map(ListOfStageResultsResp::getAccountId).collect(Collectors.toList()); List intClusterIds = teamWithResults.stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 @@ -430,7 +430,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl falseData = new ArrayList<>(); // 对比 @@ -480,7 +480,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl competitionTeams = teamMapper.selectList(queryWrapper); - //查看赛事类型是个人赛还是团队赛事 + //查看活动类型是个人赛还是团队活动 CompleteCompetitionSetup competitionSetup = competitionSetupMapper.getRaceSettingsByRaceId(req.getCompetitionId()); Integer competitionType = competitionSetup.getCompetitionType(); @@ -502,7 +502,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl pointRace = pointRace(req.getCompetitionId(), stageId, competitionSetup, competitionStage); - //判断当前阶段比赛是否开始 (防止出现比赛还没开始数据就已经存在了) + //判断当前阶段活动是否开始 (防止出现活动还没开始数据就已经存在了) QueryWrapper queryWrapper1 = new QueryWrapper<>(); queryWrapper1.eq("stage_id", stageId); queryWrapper1.last(" AND start_time <= now()"); @@ -594,7 +594,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl pointRace(Integer competitionId, Integer stageId, CompleteCompetitionSetup competitionSetup, CompetitionStage competitionStage) { - //赛事类型(0为个人赛,1为团队赛)默认为0 + //活动类型(0为个人赛,1为团队赛)默认为0 if (competitionSetup.getCompetitionType() == TeamCalculationMethodConstant.TYPE_OF_EVENT_INDIVIDUAL_COMPETITION) {//个人赛 - if (competitionStage.getMethod() == 2) { //比赛方式(0实操,1理论,2线下) + if (competitionStage.getMethod() == 2) { //活动方式(0实操,1理论,2线下) List offlineIndividualPointsCompetition = teamMapper.offlineIndividualPointsCompetition(new StageRankingReq().setStageId(stageId).setCompetitionId(competitionId)); offlineIndividualPointsCompetition.sort(new Comparator() { @Override @@ -883,14 +883,14 @@ public class CompetitionStageServiceImpl extends ServiceImpl offLineTeamPointsCompetition; - if (competitionStage.getMethod() == 2) { //比赛方式为线下时候查询的ol_user_score表统计分数,线下比赛是没有实验报告 + if (competitionStage.getMethod() == 2) { //活动方式为线下时候查询的ol_user_score表统计分数,线下活动是没有实验报告 //团队积分赛线下 ———— 求各个团队的最高分、平均分、总和 offLineTeamPointsCompetition = teamMapper.offLineTeamPointsCompetition(new StageRankingReq().setStageId(stageId).setCompetitionId(competitionId).setTeamIds(teamIds)); @@ -1006,7 +1006,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl page = new Page(req.getPageNum(), req.getPageSize()); IPage pageList = null; switch (competitionStage.getMethod()) { @@ -1161,7 +1161,7 @@ public class CompetitionStageServiceImpl extends ServiceImpl - * 赛事团队表 服务实现类 + * 活动团队表 服务实现类 *

* * @author cheney @@ -82,13 +82,13 @@ public class CompetitionTeamServiceImpl extends ServiceImpl data = Maps.newHashMap(); -// 查询赛事类型 +// 查询活动类型 QueryWrapper setupQueryWrapper = new QueryWrapper<>(); setupQueryWrapper.eq("competition_id",competitionId); CompleteCompetitionSetup setup = completeCompetitionSetupMapper.selectOne(setupQueryWrapper); -// 赛事类型(0为个人赛,1为团队赛)默认为0 +// 活动类型(0为个人赛,1为团队赛)默认为0 Integer competitionType = setup.getCompetitionType(); - //查询团队是否有限制成员参加一项阶段赛事 + //查询团队是否有限制成员参加一项阶段活动 QueryWrapper ruleQueryWrapper = new QueryWrapper<>(); ruleQueryWrapper.eq("setup_id",setup.getSetupId()); CompetitionRule competitionRule = competitionRuleMapper.selectOne(ruleQueryWrapper); @@ -166,7 +166,7 @@ public class CompetitionTeamServiceImpl extends ServiceImpl teamInstructors = teamInstructorMapper.selectList(queryWrapper3); -// 竞赛阶段信息 +// 活动阶段信息 List stages = null; if (competitionType == 0){ stages = baseMapper.competitionStage(competitionId,accountId,null); diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompetitionUserDelServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionUserDelServiceImpl.java new file mode 100644 index 0000000..b7fcb40 --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompetitionUserDelServiceImpl.java @@ -0,0 +1,20 @@ +package com.huoran.competition.service.impl; + +import com.huoran.competition.entity.CompetitionUserDel; +import com.huoran.competition.mapper.CompetitionUserDelMapper; +import com.huoran.competition.service.CompetitionUserDelService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 记录用户删除的赛事 服务实现类 + *

+ * + * @author cheney + * @since 2023-12-12 + */ +@Service +public class CompetitionUserDelServiceImpl extends ServiceImpl implements CompetitionUserDelService { + +} diff --git a/competition/src/main/java/com/huoran/competition/service/impl/CompleteCompetitionSetupServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/CompleteCompetitionSetupServiceImpl.java index 0024ae4..8195ca2 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/CompleteCompetitionSetupServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/CompleteCompetitionSetupServiceImpl.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam; /** *

- * 完整赛事设置 服务实现类 + * 完整活动设置 服务实现类 *

* * @author cheney diff --git a/competition/src/main/java/com/huoran/competition/service/impl/UserScoreServiceImpl.java b/competition/src/main/java/com/huoran/competition/service/impl/UserScoreServiceImpl.java index f95ac36..64d34ae 100644 --- a/competition/src/main/java/com/huoran/competition/service/impl/UserScoreServiceImpl.java +++ b/competition/src/main/java/com/huoran/competition/service/impl/UserScoreServiceImpl.java @@ -205,7 +205,7 @@ public class UserScoreServiceImpl extends ServiceImpl teamWithResults = list.stream().map(ListOfStageResultsResp::getTeamId).collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 @@ -106,7 +106,7 @@ public class RankUtil { public List matchingSetPersonage(List selectApplicantByCondition, List list) { - //报名本次大赛的全部人员 A集合 + //报名本次活动的全部人员 A集合 List allApplicants = selectApplicantByCondition.stream().map(RegistrationVO::getAccountId).collect(Collectors.toList()); //参与本次阶段,有成绩的队伍 B集合 @@ -115,7 +115,7 @@ public class RankUtil { List intClusterIds = teamWithResults.stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 @@ -164,7 +164,7 @@ public class RankUtil { public List singleStageMatchingSetPersonage(List selectApplicantByCondition, List list) { - //报名本次大赛的全部人员 A集合 + //报名本次活动的全部人员 A集合 List allApplicants = selectApplicantByCondition.stream().map(RegistrationVO::getAccountId).collect(Collectors.toList()); //参与本次阶段,有成绩的队伍 B集合 @@ -173,7 +173,7 @@ public class RankUtil { List intClusterIds = teamWithResults.stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 @@ -218,7 +218,7 @@ public class RankUtil { //参与本次阶段,有成绩的队伍 B集合 List teamWithResults = list.stream().map(ListOfStageResultsResp::getTeamId).collect(Collectors.toList()); - //falseData:假数据,用于区分大赛没有参加团队的但是要给一条数据 + //falseData:假数据,用于区分活动没有参加团队的但是要给一条数据 List falseData = new ArrayList<>(); // 对比 diff --git a/competition/src/main/java/com/huoran/competition/utils/attestation/CardVerifyUtil.java b/competition/src/main/java/com/huoran/competition/utils/attestation/CardVerifyUtil.java new file mode 100644 index 0000000..c706236 --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/utils/attestation/CardVerifyUtil.java @@ -0,0 +1,65 @@ +package com.huoran.competition.utils.attestation; + +import com.alibaba.fastjson.JSON; +import com.huoran.competition.entity.CardVerify; +import org.apache.http.HttpResponse; +import org.apache.http.util.EntityUtils; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * 实名认证工具类 + */ +public class CardVerifyUtil { + + + + + /** + * + * @param frontImg 人脸面照片转base64得出的字符串 + * @param backImg 国徽面照片转base64得出的字符串 + * @return + */ + public static CardVerify cardVerify(String frontImg, String backImg) { + String host = "https://miitangs14.market.alicloudapi.com";//调用地址 + String path = "/v1/tools/ocr/idCard"; //调用路径 + String method = "POST"; + String appcode = "4c22c2b34b2d4b5aaa57186a49aa3a4c"; //阿里云中自己的APPCode + Map headers = new HashMap(); + //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105 + headers.put("Authorization", "APPCODE " + appcode); + //根据API的要求,定义相对应的Content-Type + headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); + //需要给X-Ca-Nonce的值生成随机字符串,每次请求不能相同 + headers.put("X-Ca-Nonce", UUID.randomUUID().toString()); + Map querys = new HashMap(); + Map bodys = new HashMap(); + bodys.put("backImg",backImg); + bodys.put("frontImg", frontImg); + bodys.put("reqNo", "miitangtest01"); + bodys.put("userLicenseNo", "userLicenseNo"); + try { + /** + * 重要提示如下: + * HttpUtils请从 + * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java + * 下载 + * + * 相应的依赖请参照 + * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml + */ + HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys); + //获取response的body + String s = EntityUtils.toString(response.getEntity()); + CardVerify cardVerify = JSON.parseObject(s, CardVerify.class); + return cardVerify; + } catch (Exception e) { + CardVerify cardVerify = new CardVerify(); + cardVerify.setCode("10000"); + return cardVerify; + } + } +} \ No newline at end of file diff --git a/competition/src/main/java/com/huoran/competition/utils/attestation/HttpUtils.java b/competition/src/main/java/com/huoran/competition/utils/attestation/HttpUtils.java new file mode 100644 index 0000000..e7b35f4 --- /dev/null +++ b/competition/src/main/java/com/huoran/competition/utils/attestation/HttpUtils.java @@ -0,0 +1,313 @@ +package com.huoran.competition.utils.attestation; +import org.apache.commons.lang.StringUtils; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.conn.ClientConnectionManager; +import org.apache.http.conn.scheme.Scheme; +import org.apache.http.conn.scheme.SchemeRegistry; +import org.apache.http.conn.ssl.SSLSocketFactory; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.message.BasicNameValuePair; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 实名认证工具类 + */ +public class HttpUtils { + + /** + * get + * + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @return + * @throws Exception + */ + public static HttpResponse doGet(String host, String path, String method, + Map headers, + Map querys) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpGet request = new HttpGet(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + return httpClient.execute(request); + } + + /** + * post form + * + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @param bodys + * @return + * @throws Exception + */ + public static HttpResponse doPost(String host, String path, String method, + Map headers, + Map querys, + Map bodys) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpPost request = new HttpPost(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + if (bodys != null) { + List nameValuePairList = new ArrayList(); + + for (String key : bodys.keySet()) { + nameValuePairList.add(new BasicNameValuePair(key, bodys.get(key))); + } + UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8"); + formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8"); + request.setEntity(formEntity); + } + + return httpClient.execute(request); + } + + /** + * Post String + * + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @param body + * @return + * @throws Exception + */ + public static HttpResponse doPost(String host, String path, String method, + Map headers, + Map querys, + String body) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpPost request = new HttpPost(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + if (StringUtils.isNotBlank(body)) { + request.setEntity(new StringEntity(body, "utf-8")); + } + + return httpClient.execute(request); + } + + /** + * Post stream + * + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @param body + * @return + * @throws Exception + */ + public static HttpResponse doPost(String host, String path, String method, + Map headers, + Map querys, + byte[] body) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpPost request = new HttpPost(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + if (body != null) { + request.setEntity(new ByteArrayEntity(body)); + } + + return httpClient.execute(request); + } + + /** + * Put String + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @param body + * @return + * @throws Exception + */ + public static HttpResponse doPut(String host, String path, String method, + Map headers, + Map querys, + String body) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpPut request = new HttpPut(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + if (StringUtils.isNotBlank(body)) { + request.setEntity(new StringEntity(body, "utf-8")); + } + + return httpClient.execute(request); + } + + /** + * Put stream + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @param body + * @return + * @throws Exception + */ + public static HttpResponse doPut(String host, String path, String method, + Map headers, + Map querys, + byte[] body) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpPut request = new HttpPut(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + if (body != null) { + request.setEntity(new ByteArrayEntity(body)); + } + + return httpClient.execute(request); + } + + /** + * Delete + * + * @param host + * @param path + * @param method + * @param headers + * @param querys + * @return + * @throws Exception + */ + public static HttpResponse doDelete(String host, String path, String method, + Map headers, + Map querys) + throws Exception { + HttpClient httpClient = wrapClient(host); + + HttpDelete request = new HttpDelete(buildUrl(host, path, querys)); + for (Map.Entry e : headers.entrySet()) { + request.addHeader(e.getKey(), e.getValue()); + } + + return httpClient.execute(request); + } + + private static String buildUrl(String host, String path, Map querys) throws UnsupportedEncodingException { + StringBuilder sbUrl = new StringBuilder(); + sbUrl.append(host); + if (!StringUtils.isBlank(path)) { + sbUrl.append(path); + } + if (null != querys) { + StringBuilder sbQuery = new StringBuilder(); + for (Map.Entry query : querys.entrySet()) { + if (0 < sbQuery.length()) { + sbQuery.append("&"); + } + if (StringUtils.isBlank(query.getKey()) && !StringUtils.isBlank(query.getValue())) { + sbQuery.append(query.getValue()); + } + if (!StringUtils.isBlank(query.getKey())) { + sbQuery.append(query.getKey()); + if (!StringUtils.isBlank(query.getValue())) { + sbQuery.append("="); + sbQuery.append(URLEncoder.encode(query.getValue(), "utf-8")); + } + } + } + if (0 < sbQuery.length()) { + sbUrl.append("?").append(sbQuery); + } + } + + return sbUrl.toString(); + } + + private static HttpClient wrapClient(String host) { + HttpClient httpClient = new DefaultHttpClient(); + if (host.startsWith("https://")) { + sslClient(httpClient); + } + + return httpClient; + } + + private static void sslClient(HttpClient httpClient) { + try { + SSLContext ctx = SSLContext.getInstance("TLS"); + X509TrustManager tm = new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { + return null; + } + public void checkClientTrusted(X509Certificate[] xcs, String str) { + + } + public void checkServerTrusted(X509Certificate[] xcs, String str) { + + } + }; + ctx.init(null, new TrustManager[] { tm }, null); + SSLSocketFactory ssf = new SSLSocketFactory(ctx); + ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); + ClientConnectionManager ccm = httpClient.getConnectionManager(); + SchemeRegistry registry = ccm.getSchemeRegistry(); + registry.register(new Scheme("https", 443, ssf)); + } catch (KeyManagementException ex) { + throw new RuntimeException(ex); + } catch (NoSuchAlgorithmException ex) { + throw new RuntimeException(ex); + } + } +} \ No newline at end of file diff --git a/competition/src/test/java/CodeGenerator.java b/competition/src/test/java/CodeGenerator.java index efff9c3..cebfc46 100644 --- a/competition/src/test/java/CodeGenerator.java +++ b/competition/src/test/java/CodeGenerator.java @@ -40,10 +40,10 @@ public class CodeGenerator { // 3、数据源配置 DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:mysql://139.9.47.170:3306/occupationlab?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); + dsc.setUrl("jdbc:mysql://121.37.12.51:3308/occupationlab?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setUsername("root"); - dsc.setPassword("HuoRan@2021"); + dsc.setPassword("root"); dsc.setDbType(DbType.MYSQL); mpg.setDataSource(dsc); @@ -60,7 +60,7 @@ public class CodeGenerator { // 5、策略配置 StrategyConfig strategy = new StrategyConfig(); - strategy.setInclude("c_competition_release_time"); + strategy.setInclude("c_competition_user_del"); strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 strategy.setTablePrefix("c_"); //生成实体时去掉表前缀 diff --git a/nakadai/src/main/java/com/huoran/nakadai/utils/MyBatisPlusCodeGenerator.java b/nakadai/src/main/java/com/huoran/nakadai/utils/MyBatisPlusCodeGenerator.java index 0ae385c..a89e7ef 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/utils/MyBatisPlusCodeGenerator.java +++ b/nakadai/src/main/java/com/huoran/nakadai/utils/MyBatisPlusCodeGenerator.java @@ -58,7 +58,7 @@ public class MyBatisPlusCodeGenerator { // 数据源配置 DataSourceConfig config= new DataSourceConfig(); // 从试图获取 - config.setUrl("jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/nakadai?serverTimezone=UTC"); + config.setUrl("jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3308/nakadai?serverTimezone=UTC"); config.setDriverName("com.mysql.cj.jdbc.Driver"); config.setUsername("super"); config.setPassword("huoran888"); diff --git a/nakadai/src/test/java/com/huoran/nakadai/code/CodeGenerator.java b/nakadai/src/test/java/com/huoran/nakadai/code/CodeGenerator.java index 0bf59d5..11f720e 100644 --- a/nakadai/src/test/java/com/huoran/nakadai/code/CodeGenerator.java +++ b/nakadai/src/test/java/com/huoran/nakadai/code/CodeGenerator.java @@ -43,10 +43,10 @@ public class CodeGenerator { // 3、数据源配置 // 3、数据源配置 DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:mysql://139.9.47.170:3306/nakadai?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); + dsc.setUrl("jdbc:mysql://121.37.12.51:3308/nakadai?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setUsername("root"); - dsc.setPassword("HuoRan@2021"); + dsc.setPassword("root"); dsc.setDbType(DbType.MYSQL); mpg.setDataSource(dsc); @@ -63,9 +63,9 @@ public class CodeGenerator { // 5、策略配置 StrategyConfig strategy = new StrategyConfig(); - strategy.setInclude("st_customs_pass"); + strategy.setInclude("sys_platform"); strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 - strategy.setTablePrefix("st_"); //生成实体时去掉表前缀 + strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀 strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略 strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作 diff --git a/occupationlab/src/test/java/com/huoran/occupationlab/code/CodeGenerator.java b/occupationlab/src/test/java/com/huoran/occupationlab/code/CodeGenerator.java index 74b14c7..1b0dd44 100644 --- a/occupationlab/src/test/java/com/huoran/occupationlab/code/CodeGenerator.java +++ b/occupationlab/src/test/java/com/huoran/occupationlab/code/CodeGenerator.java @@ -42,10 +42,10 @@ public class CodeGenerator { // 3、数据源配置 DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:mysql://139.9.47.170:3306/occupationlab?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); + dsc.setUrl("jdbc:mysql://121.37.12.51:3308/occupationlab?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setUsername("root"); - dsc.setPassword("HuoRan@2021"); + dsc.setPassword("root"); dsc.setDbType(DbType.MYSQL); mpg.setDataSource(dsc); diff --git a/pom.xml b/pom.xml index 2cacb9e..2503ab7 100644 --- a/pom.xml +++ b/pom.xml @@ -57,10 +57,25 @@ 3.17.4 1.4.0 2.3.2 + 3.2.0 + 1.14.0 + + + com.squareup.okhttp3 + okhttp + ${okhttp.version} + + + + com.squareup.okio + okio + ${okhttp.version} + + com.aliyun aliyun-java-sdk-imm diff --git a/users/src/test/java/com/huoran/users/test/CodeGenerator.java b/users/src/test/java/com/huoran/users/test/CodeGenerator.java index 58793ec..1c70f5b 100644 --- a/users/src/test/java/com/huoran/users/test/CodeGenerator.java +++ b/users/src/test/java/com/huoran/users/test/CodeGenerator.java @@ -42,7 +42,7 @@ public class CodeGenerator { // 3、数据源配置 DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/nakadai?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); + dsc.setUrl("jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3308/nakadai?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"); dsc.setDriverName("com.mysql.cj.jdbc.Driver"); dsc.setUsername("super"); dsc.setPassword("huoran888");