Bläddra i källkod

学员活动购买

zouxuan 2 år sedan
förälder
incheckning
d188e13cd7

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupDefaultClassesUnitPriceService.java

@@ -15,5 +15,5 @@ public interface VipGroupDefaultClassesUnitPriceService extends BaseService<Inte
     * @author zx
     * @date 2022/10/9 15:56
     */
-    BigDecimal getAmount(Integer organId, BigDecimal courseNum);
+    BigDecimal getAmount(Integer categoryId,Integer organId, BigDecimal courseNum);
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java

@@ -227,7 +227,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 				actualAmount = practiceGroupSellPriceService.getAmount(organId,buyNum);
 			}else {
 				//获取分部vip课价格
-				actualAmount = vipGroupDefaultClassesUnitPriceService.getAmount(organId,buyNum);
+				actualAmount = vipGroupDefaultClassesUnitPriceService.getAmount(Integer.parseInt(vipGroupActivity.getVipGroupCategoryIdList()),organId,buyNum);
 			}
 		}
 		return actualAmount;

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupDefaultClassesUnitPriceServiceImpl.java

@@ -38,8 +38,8 @@ public class VipGroupDefaultClassesUnitPriceServiceImpl extends BaseServiceImpl<
 	}
 
 	@Override
-	public BigDecimal getAmount(Integer organId, BigDecimal courseNum) {
-		VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = Optional.ofNullable(vipGroupDefaultClassesUnitPriceDao.getByVipGroup(organId.longValue())).
+	public BigDecimal getAmount(Integer categoryId,Integer organId, BigDecimal courseNum) {
+		VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = Optional.ofNullable(vipGroupDefaultClassesUnitPriceDao.getByVipGroupCategory(categoryId,organId)).
 				orElseThrow(()->new BizException("课程单价设置错误"));
 		return vipGroupDefaultClassesUnitPrice.getOnlineClassesUnitPrice().multiply(courseNum);
 	}