This commit is contained in:
@@ -48,7 +48,7 @@ public class BladeConfiguration implements WebMvcConfigurer {
|
||||
*/
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/cors/**")
|
||||
registry.addMapping("/**")
|
||||
.allowedOriginPatterns("*")
|
||||
.allowedHeaders("*")
|
||||
.allowedMethods("*")
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/martial/deductionItem")
|
||||
@RequestMapping("/blade-martial/deductionItem")
|
||||
@Tag(name = "扣分项配置管理", description = "扣分项配置接口")
|
||||
public class MartialDeductionItemController extends BladeController {
|
||||
|
||||
|
||||
@@ -129,4 +129,99 @@ public class MartialJudgeInviteController extends BladeController {
|
||||
return R.data(invite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送邀请
|
||||
*/
|
||||
@PostMapping("/send")
|
||||
@Operation(summary = "发送邀请", description = "向评委发送邀请")
|
||||
public R sendInvite(@RequestBody MartialJudgeInvite judgeInvite) {
|
||||
// TODO: 实现邮件/短信发送逻辑
|
||||
judgeInvite.setInviteStatus(0); // 待回复
|
||||
judgeInvite.setInviteTime(java.time.LocalDateTime.now());
|
||||
return R.status(judgeInviteService.saveOrUpdate(judgeInvite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重发邀请
|
||||
*/
|
||||
@PostMapping("/resend/{inviteId}")
|
||||
@Operation(summary = "重发邀请", description = "重新发送邀请")
|
||||
public R resendInvite(@PathVariable Long inviteId) {
|
||||
MartialJudgeInvite invite = judgeInviteService.getById(inviteId);
|
||||
if (invite == null) {
|
||||
return R.fail("邀请记录不存在");
|
||||
}
|
||||
// TODO: 实现邮件/短信重发逻辑
|
||||
invite.setInviteTime(java.time.LocalDateTime.now());
|
||||
return R.status(judgeInviteService.updateById(invite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消邀请
|
||||
*/
|
||||
@PostMapping("/cancel/{inviteId}")
|
||||
@Operation(summary = "取消邀请", description = "取消邀请")
|
||||
public R cancelInvite(@PathVariable Long inviteId, @RequestParam(required = false) String reason) {
|
||||
MartialJudgeInvite invite = judgeInviteService.getById(inviteId);
|
||||
if (invite == null) {
|
||||
return R.fail("邀请记录不存在");
|
||||
}
|
||||
invite.setInviteStatus(3); // 已取消
|
||||
invite.setCancelReason(reason);
|
||||
return R.status(judgeInviteService.updateById(invite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认邀请
|
||||
*/
|
||||
@PostMapping("/confirm/{inviteId}")
|
||||
@Operation(summary = "确认邀请", description = "确认接受邀请")
|
||||
public R confirmInvite(@PathVariable Long inviteId) {
|
||||
MartialJudgeInvite invite = judgeInviteService.getById(inviteId);
|
||||
if (invite == null) {
|
||||
return R.fail("邀请记录不存在");
|
||||
}
|
||||
if (invite.getInviteStatus() != 1) {
|
||||
return R.fail("只能确认已接受的邀请");
|
||||
}
|
||||
// TODO: 实现确认逻辑(如分配场地、项目等)
|
||||
return R.success("确认成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送提醒
|
||||
*/
|
||||
@PostMapping("/reminder/{inviteId}")
|
||||
@Operation(summary = "发送提醒", description = "提醒评委回复邀请")
|
||||
public R sendReminder(@PathVariable Long inviteId, @RequestParam(required = false) String message) {
|
||||
MartialJudgeInvite invite = judgeInviteService.getById(inviteId);
|
||||
if (invite == null) {
|
||||
return R.fail("邀请记录不存在");
|
||||
}
|
||||
// TODO: 实现提醒发送逻辑(邮件/短信)
|
||||
return R.success("提醒发送成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 从评委库导入
|
||||
*/
|
||||
@PostMapping("/import/pool")
|
||||
@Operation(summary = "从评委库导入", description = "从评委库批量导入评委")
|
||||
public R importFromPool(@RequestParam Long competitionId, @RequestParam String judgeIds) {
|
||||
// TODO: 实现从评委库导入逻辑
|
||||
List<Long> ids = Func.toLongList(judgeIds);
|
||||
// 为每个评委生成邀请码
|
||||
return R.success("导入成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出邀请数据
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出邀请数据", description = "导出邀请数据为Excel")
|
||||
public void exportInvites(MartialJudgeInvite judgeInvite) {
|
||||
// TODO: 实现Excel导出逻辑
|
||||
// 使用EasyExcel或POI导出
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/api/mini")
|
||||
@RequestMapping("/mini")
|
||||
@Tag(name = "小程序接口", description = "小程序评分系统专用接口")
|
||||
public class MartialMiniController extends BladeController {
|
||||
|
||||
|
||||
@@ -749,6 +749,7 @@ public class MartialScheduleArrangeServiceImpl implements IMartialScheduleArrang
|
||||
participant.setProjectName(groupData.getGroupName());
|
||||
participant.setCategory(athlete.getCategory());
|
||||
participant.setPerformanceOrder(order++);
|
||||
participant.setScheduleStatus("draft"); // 初始状态为草稿
|
||||
participant.setCreateTime(new Date());
|
||||
scheduleParticipantMapper.insert(participant);
|
||||
}
|
||||
|
||||
@@ -240,14 +240,13 @@ blade:
|
||||
- /blade-desk/notice/submit
|
||||
- /blade-flow/model/submit
|
||||
- /blade-develop/datasource/submit
|
||||
- /blade-system/user/register
|
||||
#安全框架配置
|
||||
secure:
|
||||
#严格模式
|
||||
#缺失令牌字段则取消授权
|
||||
strict-token: true
|
||||
strict-token: false
|
||||
#缺失请求头则取消授权
|
||||
strict-header: true
|
||||
strict-header: false
|
||||
#接口放行
|
||||
skip-url:
|
||||
- /blade-test/**
|
||||
@@ -255,6 +254,8 @@ blade:
|
||||
- /blade-device/**
|
||||
- /blade-system/user/register
|
||||
- /blade-auth/captcha/send
|
||||
- /blade-auth/oauth/token
|
||||
- /mini/login
|
||||
#授权认证配置
|
||||
auth:
|
||||
- method: ALL
|
||||
|
||||
Reference in New Issue
Block a user