价格取整
This commit is contained in:
@@ -45,7 +45,7 @@ public class PVCStickersPrice {
|
||||
} else if (product.getCount() == 100000) {
|
||||
price = 700;
|
||||
}
|
||||
product.setPrice(product.getPrice() + price);
|
||||
product.setPrice(Math.ceil(product.getPrice() + price));
|
||||
}
|
||||
} else if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) {
|
||||
for (Product product : stickersList) {
|
||||
@@ -78,7 +78,7 @@ public class PVCStickersPrice {
|
||||
} else if (product.getCount() == 100000) {
|
||||
price = 1500;
|
||||
}
|
||||
product.setPrice(product.getPrice() + price);
|
||||
product.setPrice(Math.ceil(product.getPrice() + price));
|
||||
}
|
||||
} else {
|
||||
for (Product product : stickersList) {
|
||||
@@ -99,7 +99,7 @@ public class PVCStickersPrice {
|
||||
} else {
|
||||
price = 3;
|
||||
}
|
||||
product.setPrice(product.getPrice() + (price * area > 50 ? price * area : 50));
|
||||
product.setPrice(Math.ceil(product.getPrice() + (price * area > 50 ? price * area : 50)));
|
||||
}
|
||||
}
|
||||
return stickersList;
|
||||
|
||||
Reference in New Issue
Block a user