From 7cd3dea07f5b7cefad9dea9fd7daf992449aaac8 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 12 三月 2024 18:24:38 +0800
Subject: [PATCH] 修改bug

---
 cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
index b8b31e8..ac2c755 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java
@@ -129,7 +129,6 @@
             if (null != student) {
                 Integer integer = coursePackagePaymentClient.queryResidueClassHour(student.getId());
                 participantVo.setResidueClassHour(integer);
-                participantVo.setIsStudent(1);
 
             } else {
                 participantVo.setResidueClassHour(0);
@@ -148,7 +147,6 @@
                 continue;
             }
             linkedHashMap.put(participant.getIdcard(), participantVo);
-//            listVo.add(participantVo);
 
         }
 
@@ -232,10 +230,16 @@
      * @throws Exception
      */
     @Override
-    public ResultUtil delParticipant(Integer id) throws Exception {
-        Participant participant = this.getById(id);
-        participant.setState(3);
-        this.updateById(participant);
+    public ResultUtil delParticipant(Integer id, Integer isStudent) throws Exception {
+        if(isStudent == 1){
+            TStudent tStudent = studentClient.queryById(id);
+            tStudent.setState(3);
+            studentClient.updateAppUser(tStudent);
+        }else{
+            Participant participant = this.getById(id);
+            participant.setState(3);
+            this.updateById(participant);
+        }
         return ResultUtil.success();
     }
 

--
Gitblit v1.7.1