From 57a7c48cc4c81f7e9719c414e4abae942c93a21b Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 26 七月 2023 15:13:37 +0800
Subject: [PATCH] 后台代码

---
 cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
index 6db453b..779a7b7 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java
@@ -82,6 +82,9 @@
     @Override
     public List<CompetitionListVo> queryMyCompetitionList(Integer uid, Integer type, Integer pageSize, Integer pageNo) throws Exception {
         pageSize = (pageSize - 1) * pageNo;
+        if(0 == type){
+            type = null;
+        }
         return this.baseMapper.queryMyCompetitionList(uid, type, pageSize, pageNo);
     }
 
@@ -115,8 +118,9 @@
         competitionInfo.setProvince(competition.getEntryProvince());
         competitionInfo.setCity(competition.getEntryCity());
         competitionInfo.setAddress(competition.getEntryAddress());
-        competitionInfo.setPayType(competition.getPayType());
-        competitionInfo.setPrice(competition.getPrice().doubleValue());
+        competitionInfo.setCashPrice(competition.getCashPrice());
+        competitionInfo.setPlayPaiCoin(competition.getPlayPaiCoin());
+        competitionInfo.setClassPrice(competition.getClassPrice());
         competitionInfo.setIntroduction(competition.getIntroduction());
         competitionInfo.setRegistrationNotes(competition.getRegistrationNotes());
         competitionInfo.setApply(1);
@@ -135,6 +139,10 @@
             participant.add(participantVo);
         }
         competitionInfo.setParticipant(participant);
+        competitionInfo.setStatus(competition.getStatus());
+        if(paymentCompetition.getPayStatus() == 3){
+            competitionInfo.setStatus(4);
+        }
         return competitionInfo;
     }
 
@@ -204,7 +212,7 @@
                 Student student = studentClient.queryStudentByPhone(participant.getPhone());
                 PaymentDeductionClassHour paymentDeductionClassHour = new PaymentDeductionClassHour();
                 paymentDeductionClassHour.setId(student.getId());
-                paymentDeductionClassHour.setClassHour(competition.getPrice().intValue());
+                paymentDeductionClassHour.setClassHour(competition.getClassPrice());
                 paymentDeductionClassHour.setCode(code);
                 coursePackagePaymentClient.rollbackPaymentDeductionClassHour(paymentDeductionClassHour);
             }

--
Gitblit v1.7.1