|
@@ -19,6 +19,7 @@ import com.ym.mec.common.service.IdGeneratorService;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
@@ -80,6 +81,12 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
@Autowired
|
|
|
private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderService studentPaymentOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
|
|
|
|
|
|
@Autowired
|
|
|
private PayService payService;
|
|
@@ -372,6 +379,29 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
amount = musicGroupStudentFee.getCourseFee();
|
|
|
}
|
|
|
|
|
|
+ Date date = new Date();
|
|
|
+ StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
|
|
|
+ studentPaymentOrder.setUserId(userId);
|
|
|
+ studentPaymentOrder.setOrderNo(idGeneratorService.generatorId("RENEW") + "");
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.RENEW);
|
|
|
+ studentPaymentOrder.setExpectAmount(amount);
|
|
|
+ studentPaymentOrder.setActualAmount(amount);
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
+ studentPaymentOrder.setPaymentChannel("银联");
|
|
|
+ studentPaymentOrder.setMusicGroupId(musicGroupId);
|
|
|
+ studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
+
|
|
|
+ ArrayList<StudentPaymentOrderDetail> studentPaymentOrderDetailList = new ArrayList<>();
|
|
|
+ StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
|
|
|
+ studentPaymentOrderDetail.setType(OrderDetailTypeEnum.COURSE);
|
|
|
+ studentPaymentOrderDetail.setPrice(amount);
|
|
|
+ studentPaymentOrderDetail.setCreateTime(date);
|
|
|
+ studentPaymentOrderDetail.setUpdateTime(date);
|
|
|
+ studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
+ studentPaymentOrderDetailList.add(studentPaymentOrderDetail);
|
|
|
+
|
|
|
+ studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
|
+
|
|
|
try {
|
|
|
return payService.getPayMap(amount, idGeneratorService.generatorId("payment") + "", "https://pay.dayaedu.com/api/yqpay/notify",
|
|
|
"http://dev.dayaedu.com", "测试订单", "测试订单");
|