价格取整

This commit is contained in:
2025-08-26 09:30:55 +08:00
parent c391de8eca
commit 0828111404
2 changed files with 7 additions and 7 deletions
@@ -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;