|
|
@@ -157,6 +157,19 @@ public class MembershipService implements MembershipServiceInterface {
|
|
|
|| "purchase_commission".equals(feature);
|
|
|
}
|
|
|
|
|
|
+ // PREMIUM用户可用功能(同FAMILY全部权益)
|
|
|
+ if ("PREMIUM".equals(level)) {
|
|
|
+ return "free_activities".equals(feature)
|
|
|
+ || "free_courses".equals(feature)
|
|
|
+ || "full_price_purchase".equals(feature)
|
|
|
+ || "referral_commission".equals(feature)
|
|
|
+ || "discount_purchase".equals(feature)
|
|
|
+ || "member_activities".equals(feature)
|
|
|
+ || "create_family".equals(feature)
|
|
|
+ || "invite_family".equals(feature)
|
|
|
+ || "purchase_commission".equals(feature);
|
|
|
+ }
|
|
|
+
|
|
|
// PROVIDER也有全部功能
|
|
|
return true;
|
|
|
}
|
|
|
@@ -240,6 +253,15 @@ public class MembershipService implements MembershipServiceInterface {
|
|
|
}
|
|
|
int fee = feeStr != null ? Integer.parseInt(feeStr) : 1314;
|
|
|
amount = fee;
|
|
|
+ } else if ("PREMIUM".equals(levelCode)) {
|
|
|
+ // PREMIUM定价从sysConfig读取
|
|
|
+ if ("monthly".equals(effectivePeriod)) {
|
|
|
+ String feeStr = sysConfigService.getValue("member_fee_premium_monthly");
|
|
|
+ amount = feeStr != null ? Integer.parseInt(feeStr) : 131400;
|
|
|
+ } else {
|
|
|
+ String feeStr = sysConfigService.getValue("member_fee_premium");
|
|
|
+ amount = feeStr != null ? Integer.parseInt(feeStr) : 1316800;
|
|
|
+ }
|
|
|
} else {
|
|
|
// 按period从会员等级表定价
|
|
|
if ("monthly".equals(effectivePeriod)) {
|
|
|
@@ -472,6 +494,13 @@ public class MembershipService implements MembershipServiceInterface {
|
|
|
return originalPrice * discountBps / 10000;
|
|
|
}
|
|
|
}
|
|
|
+ if ("PREMIUM".equals(level)) {
|
|
|
+ String discountStr = sysConfigService.getValue("member_discount_premium");
|
|
|
+ if (discountStr != null) {
|
|
|
+ int discountBps = Integer.parseInt(discountStr); // in bps
|
|
|
+ return originalPrice * discountBps / 10000;
|
|
|
+ }
|
|
|
+ }
|
|
|
return originalPrice;
|
|
|
}
|
|
|
|