|
@@ -6,10 +6,7 @@ import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
-import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.DealStatusEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
-import com.ym.mec.biz.dal.enums.OrderTypeEnum;
|
|
|
+import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
@@ -97,6 +94,8 @@ public class StudentOrderController extends BaseController {
|
|
|
private TenantOrderRecordService tenantOrderRecordService;
|
|
|
@Autowired
|
|
|
private OrderPayOpsService orderPayOpsService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPaymentCalenderActivityService musicGroupPaymentCalenderActivityService;
|
|
|
|
|
|
@Value("${spring.profiles.active:dev}")
|
|
|
private String profiles;
|
|
@@ -172,9 +171,11 @@ public class StudentOrderController extends BaseController {
|
|
|
if (orderByOrderNo.getGroupType().equals(GroupType.MUSIC)) {
|
|
|
MusicGroup musicGroup = musicGroupService.get(orderByOrderNo.getMusicGroupId());
|
|
|
List<Goods> goodsList = studentPaymentOrderDetailService.findApplyOrderGoods(orderByOrderNo.getId());
|
|
|
- List<String> orderDetailType = studentPaymentOrderDetailService.getOrderDetailType(orderByOrderNo.getId());
|
|
|
+// List<String> orderDetailType = studentPaymentOrderDetailService.getOrderDetailType(orderByOrderNo.getId());
|
|
|
List<StudentPaymentOrderDetail> orderDetail1 = studentPaymentOrderDetailService.getOrderDetail(orderByOrderNo.getId());
|
|
|
- String kitGroupPurchaseType = orderDetail1.stream().filter(e -> e.getGoodsList() != null).filter(e -> e.getKitGroupPurchaseType() != null).map(e -> e.getKitGroupPurchaseType().getCode()).collect(Collectors.joining(","));
|
|
|
+ List<String> orderDetailType = orderDetail1.stream().map(e->e.getType().getCode()).collect(Collectors.toList());
|
|
|
+ String kitGroupPurchaseType = orderDetail1.stream().filter(e -> e.getGoodsList() != null).
|
|
|
+ filter(e -> e.getKitGroupPurchaseType() != null).map(e -> e.getKitGroupPurchaseType().getCode()).collect(Collectors.joining(","));
|
|
|
orderDetail.put("goods", goodsList);
|
|
|
orderDetail.put("kitGroupPurchaseType", kitGroupPurchaseType);
|
|
|
orderDetail.put("course", musicGroup.getCourseForm());
|
|
@@ -182,6 +183,13 @@ public class StudentOrderController extends BaseController {
|
|
|
orderDetail.put("detailType", orderDetailType);
|
|
|
orderDetail.put("chargeTypeId", musicGroup.getChargeTypeId());
|
|
|
orderDetail.put("courseViewType", musicGroup.getCourseViewType());
|
|
|
+ //如果包含vip和网管,代表购买了活动包
|
|
|
+ if(orderDetailType.contains("VIP") || orderDetailType.contains("PRACTICE")){
|
|
|
+ List<Long> activityList = orderDetail1.stream().filter(e->e.getType() == OrderDetailTypeEnum.VIP
|
|
|
+ || e.getType() == OrderDetailTypeEnum.PRACTICE).map(e->e.getStudentInstrumentId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ orderDetail.put("activity", musicGroupPaymentCalenderActivityService.findByIds(activityList));
|
|
|
+ }
|
|
|
|
|
|
//新的课程形态10.27
|
|
|
MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.getMusicGroupRegCalender(musicGroup.getId());
|