From bdb44a4edf520d6d559c18f9969c2d70de671a61 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 28 十一月 2023 14:27:30 +0800
Subject: [PATCH] 11.27,7

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java
index 5b6bc0a..1f3af00 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java
@@ -16,6 +16,7 @@
 import com.dsh.guns.config.UserExt;
 import com.dsh.guns.core.base.controller.BaseController;
 import com.dsh.guns.modular.system.model.*;
+import com.dsh.course.entity.CoursePackageOrderStudent;
 import com.dsh.guns.modular.system.model.TCoursePackagePayment;
 import com.dsh.guns.modular.system.model.dto.CoursePackage;
 import com.dsh.guns.modular.system.service.ICityService;
@@ -135,6 +136,7 @@
         for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) {
             char c = tCoursePackageDiscount.getContent().charAt(0);
             String value1 = String.valueOf(c);
+
             JSONObject jsonObject ;
             if (value1.equals("[")){
                 jsonObject = JSONObject.fromObject(tCoursePackageDiscount.getContent()
@@ -142,10 +144,10 @@
             }else{
                 jsonObject = JSONObject.fromObject(tCoursePackageDiscount.getContent());
             }
-            // 获取当前课包价格配置
-            Integer coursePackageId1 = tCoursePackagePayment.getCoursePackageId();
-            List<CoursePackagePaymentConfig> coursePackagePaymentConfigs = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(coursePackageId1);
-
+            // 获取所选课时的课包价格配置
+            List<CoursePackagePaymentConfig> coursePackagePaymentConfigs =
+                    coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList1
+                            (tCoursePackagePayment.getCoursePackageConfigId());
             if (coursePackagePaymentConfigs.size()!=0){
                 CoursePackagePaymentConfig coursePackagePaymentConfig = coursePackagePaymentConfigs.get(0);
                 tCoursePackagePayment.setOriginalPrice(coursePackagePaymentConfig.getCashPayment());
@@ -174,7 +176,9 @@
                     break;
                 case 2:
                     // 判断当前用户是否已经购买过当前课包
-                    List<com.dsh.course.feignClient.course.model.TCoursePackagePayment> result= coursePackagePaymentClient.getByUserIdAndCoursePackageId(tCoursePackagePayment.getAppUserId(),tCoursePackagePayment.getCoursePackageId());
+                    List<CoursePackageOrderStudent> result=
+                            coursePackagePaymentClient.getByUserIdAndCoursePackageId(tCoursePackagePayment.getAppUserId(),
+                                    tCoursePackagePayment.getCoursePackageId());
                     // 已经购买了
                     if (result.size()!=0){
                         // 会员续课折扣

--
Gitblit v1.7.1