From 16aa4fa86c45ad7b8e16ae66f787cdb783ba388a Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期四, 21 三月 2024 14:14:10 +0800
Subject: [PATCH] bug修改
---
cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java b/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java
index 57812c9..95e7551 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java
@@ -43,10 +43,19 @@
@Autowired
private TokenUtil tokenUtil;
+ @Resource
+ private StudentClient studentClient;
+
+ @Autowired
+ private UserCompetitionService userCompetitionService;
+
+
+
+
@ResponseBody
@PostMapping("/api/participant/addParticipant")
- @ApiOperation(value = "添加参赛人员", tags = {"APP-赛事活动列表", ""})
+ @ApiOperation(value = "添加参赛人员【2.0】", tags = {"APP-赛事活动列表", "人员管理"})
@ApiImplicitParams({
@ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
})
@@ -66,7 +75,7 @@
@ResponseBody
@PostMapping("/api/participant/queryParticipantList")
- @ApiOperation(value = "获取参赛人员列表", tags = {"APP-赛事活动列表", ""})
+ @ApiOperation(value = "获取参赛人员列表", tags = {"APP-赛事活动列表", "我的二维码", "人员管理", "APP-社区世界杯"})
@ApiImplicitParams({
@ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
@ApiImplicitParam(value = "isPre(1过滤)", name = "是否过滤未实名", required = true, dataType = "int")
@@ -97,15 +106,11 @@
}
- @Resource
- private StudentClient studentClient;
- @Resource
- private AppUserClient appUserClient;
@ResponseBody
@PostMapping("/api/participant/editParticipant")
- @ApiOperation(value = "编辑参赛人员", tags = {"APP-赛事活动列表", ""})
+ @ApiOperation(value = "编辑参赛人员", tags = {"APP-赛事活动列表", "人员管理"})
@ApiImplicitParams({
@ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
})
@@ -131,14 +136,13 @@
TStudent student1 = studentClient.queryById(editParticipant.getId());
student.setName(student1.getName());
student.setIdCard(editParticipant.getIdcard());
+ student.setHeadImg(editParticipant.getHeadImg());
if (editParticipant.getHeight() != null) {
student.setHeight(Double.valueOf(editParticipant.getHeight()));
}
-
if (editParticipant.getWeight() != null) {
student.setWeight(editParticipant.getWeight());
}
-
if (ToolUtil.isNotEmpty(student.getName()) && ToolUtil.isNotEmpty(student.getIdCard())) {
Boolean aBoolean = JuHeUtil.idcardAuthentication(student.getIdCard(), student.getName());
if (!aBoolean) {
@@ -160,17 +164,17 @@
@ResponseBody
@PostMapping("/api/participant/delParticipant")
- @ApiOperation(value = "删除参赛人员", tags = {"APP-赛事活动列表", ""})
+ @ApiOperation(value = "删除参赛人员", tags = {"APP-赛事活动列表", "人员管理"})
@ApiImplicitParams({
@ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
})
- public ResultUtil delParticipant(Integer id) {
+ public ResultUtil delParticipant(Integer id, Integer isStudent) {
try {
Integer uid = tokenUtil.getUserIdFormRedis();
if (null == uid) {
return ResultUtil.tokenErr();
}
- return participantService.delParticipant(id);
+ return participantService.delParticipant(id, isStudent);
} catch (Exception e) {
e.printStackTrace();
return ResultUtil.runErr();
@@ -193,8 +197,7 @@
}
}
- @Autowired
- private UserCompetitionService userCompetitionService;
+
@ResponseBody
@@ -202,4 +205,11 @@
public Integer counts(@RequestBody Integer stuId) {
return userCompetitionService.count(new QueryWrapper<UserCompetition>().eq("participantId", stuId));
}
+
+
+ @ResponseBody
+ @PostMapping("/participant/getParticipant")
+ public Participant getParticipant(@RequestBody Long id){
+ return participantService.getById(id);
+ }
}
--
Gitblit v1.7.1