修改登录权限,修改吊牌翻倍价格

This commit is contained in:
2025-06-23 16:24:43 +08:00
parent 17def0dd1f
commit e178b27aa2
3 changed files with 14 additions and 8 deletions
@@ -416,7 +416,7 @@ public class PriceUtils {
}
Product product = new Product();
product.setCount(count_item);
product.setPrice(Math.ceil(price * number));
product.setPrice(Math.ceil(price));
priceList.add(product);
}
return priceList;
@@ -3428,8 +3428,10 @@ public class PriceUtils {
endIndex = Math.min(i + 1, areas.length - 1);
}
}
if (startIndex == endIndex) {
if (startIndex == 0) {
price = price_list[endIndex];
} else if (startIndex == endIndex) {
price = (price_list[endIndex] / areas[endIndex]) * area;
} else {
price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * price_list[startIndex] + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * price_list[endIndex];
}