|
@@ -303,15 +303,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
//乐器及打包辅件
|
|
|
if (goodsGroups != null && goodsGroups.size() > 0) {
|
|
|
for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
- List<Map<String, Object>> goodsPrices = new ArrayList<>();
|
|
|
- for (Goods goods : goodsGroup.getGoodsList()) {
|
|
|
- HashMap<String, Object> goodsPrice = new HashMap<>();
|
|
|
- goodsPrice.put("id", goods.getId());
|
|
|
- goodsPrice.put("discountPrice", goods.getDiscountPrice());
|
|
|
- goodsPrice.put("agreeCostPrice", goods.getAgreeCostPrice());
|
|
|
- goodsPrices.add(goodsPrice);
|
|
|
- }
|
|
|
-
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
|
|
|
studentPaymentOrderDetail4goodsGroup.setRemitFee(BigDecimal.ZERO);
|
|
|
OrderDetailTypeEnum type = null;
|
|
@@ -324,7 +315,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
} else if (goodsGroup.getType().equals(GoodsType.OTHER)) {
|
|
|
type = OrderDetailTypeEnum.TEACHING;
|
|
|
}
|
|
|
- studentPaymentOrderDetail4goodsGroup.setGoodsPrices(JSON.toJSONString(goodsPrices));
|
|
|
studentPaymentOrderDetail4goodsGroup.setType(type);
|
|
|
studentPaymentOrderDetail4goodsGroup.setPrice(goodsGroup.getPrice());
|
|
|
studentPaymentOrderDetail4goodsGroup.setGoodsIdList(goodsGroup.getGoodsIdList());
|
|
@@ -338,17 +328,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
//单独辅件
|
|
|
if (goodsList != null && goodsList.size() > 0) {
|
|
|
- List<Map<String, Object>> goodsPrices = new ArrayList<>();
|
|
|
for (Goods goods : goodsList) {
|
|
|
- HashMap<String, Object> goodsPrice = new HashMap<>();
|
|
|
- goodsPrice.put("id", goods.getId());
|
|
|
- goodsPrice.put("discountPrice", goods.getDiscountPrice());
|
|
|
- goodsPrice.put("agreeCostPrice", goods.getAgreeCostPrice());
|
|
|
- goodsPrices.add(goodsPrice);
|
|
|
-
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goods = new StudentPaymentOrderDetail();
|
|
|
OrderDetailTypeEnum orderDetailType = goods.getType().equals(GoodsType.INSTRUMENT) ? OrderDetailTypeEnum.MUSICAL : OrderDetailTypeEnum.ACCESSORIES;
|
|
|
- studentPaymentOrderDetail4goods.setGoodsPrices(JSON.toJSONString(goodsPrices));
|
|
|
studentPaymentOrderDetail4goods.setType(orderDetailType);
|
|
|
studentPaymentOrderDetail4goods.setPrice(goods.getGroupPurchasePrice());
|
|
|
studentPaymentOrderDetail4goods.setGoodsIdList(goods.getId().toString());
|
|
@@ -360,17 +342,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
//单独教谱
|
|
|
if (otherGoodsList != null && otherGoodsList.size() > 0) {
|
|
|
- List<Map<String, Object>> goodsPrices = new ArrayList<>();
|
|
|
|
|
|
for (Goods goods : otherGoodsList) {
|
|
|
- HashMap<String, Object> goodsPrice = new HashMap<>();
|
|
|
- goodsPrice.put("id", goods.getId());
|
|
|
- goodsPrice.put("discountPrice", goods.getDiscountPrice());
|
|
|
- goodsPrice.put("agreeCostPrice_", goods.getAgreeCostPrice());
|
|
|
- goodsPrices.add(goodsPrice);
|
|
|
-
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
|
|
|
- studentPaymentOrderDetail4otherGoods.setGoodsPrices(JSON.toJSONString(goodsPrices));
|
|
|
studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
|
|
|
studentPaymentOrderDetail4otherGoods.setPrice(goods.getGroupPurchasePrice());
|
|
|
studentPaymentOrderDetail4otherGoods.setGoodsIdList(goods.getId().toString());
|