添加套餐计费模式
This commit is contained in:
1 parent
829f357bae
commit
5bc5a91b3b
4 files changed
+30
-2
No files matched your search
@@ -126,6 +126,8 @@ public class RentalOrders {
|
||||
hash,
|
||||
"package_id",
|
||||
packageId,
|
||||
"billing_mode",
|
||||
text(product, "billing_mode").isEmpty() ? "DURATION" : text(product, "billing_mode"),
|
||||
"network",
|
||||
text(product, "network"),
|
||||
"receiver_address",
|
||||
@@ -182,6 +184,8 @@ public class RentalOrders {
|
||||
BigDecimal percent = new BigDecimal(text(row, "supplier_fee_percent"));
|
||||
BigDecimal fee = gross.multiply(percent).movePointLeft(2).setScale(6, RoundingMode.HALF_UP);
|
||||
require(
|
||||
(text(row, "billing_mode").isEmpty() || "DURATION".equals(text(row, "billing_mode")) || "PER_ORDER".equals(text(row, "billing_mode")))
|
||||
&&
|
||||
sale.signum() > 0
|
||||
&& gross.signum() > 0
|
||||
&& gross.compareTo(sale) <= 0
|
||||
|
||||
Reference in new issue
Block a user