From f88cfa02e36752e4acad7adc4b045155e8e50f21 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 08 十二月 2023 09:16:29 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
---
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoursePackagePaymentController.java | 22 +++++++++++++++++-----
1 files changed, 17 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..8cd2024 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){
// 会员续课折扣
@@ -362,6 +366,14 @@
return coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id);
}
+
+ @RequestMapping(value = "/getCoursePackageType")
+ @ResponseBody
+ public Integer getCoursePackageType(Integer id) {
+ TCoursePackage coursePackage = coursePackageClient.queryById(id);
+ return coursePackage.getType();
+ }
+
}
--
Gitblit v1.7.1