|
@@ -112,6 +112,8 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
private TeacherCourseRewardService teacherCourseRewardService;
|
|
|
@Autowired
|
|
|
private StudentPaymentRouteOrderService studentPaymentRouteOrderService;
|
|
|
+ @Autowired
|
|
|
+ private SysCouponCodeService sysCouponCodeService;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory
|
|
|
.getLogger(EduPracticeGroupService.class);
|
|
@@ -447,7 +449,10 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
return BaseController.failed(HttpStatus.FOUND, errMessage);
|
|
|
}
|
|
|
|
|
|
- StudentPaymentOrder studentPaymentOrder=new StudentPaymentOrder();
|
|
|
+ //使用优惠券
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(practiceGroupBuyParams.getCouponIdList(),amount,true);
|
|
|
+ amount = studentPaymentOrder.getActualAmount();
|
|
|
+
|
|
|
studentPaymentOrder.setUserId(practiceGroupBuyParams.getStudentId());
|
|
|
studentPaymentOrder.setGroupType(GroupType.PRACTICE);
|
|
|
String orderNo=idGeneratorService.generatorId("payment") + "";
|