|
@@ -210,7 +210,7 @@ public class OrderHandler {
|
|
|
|
|
|
// 判断当前提交的购物车ID,有多少产品在售
|
|
|
int total = 0; // 支付金额
|
|
|
- int toothbrushTotal = 0; // 支付金额
|
|
|
+ int toothbrushTotal = 0; // 需要购买牙刷到某种金额
|
|
|
int sum = 0; // 产品数量
|
|
|
List<CartDto> tempCarts = new ArrayList<CartDto>();
|
|
|
for (CartDto cd : cartDtos) {
|
|
@@ -247,13 +247,16 @@ public class OrderHandler {
|
|
|
case 2: //2:成人牙刷
|
|
|
toothAuthbrush += cd.getCartNum();
|
|
|
toothAllbrush += cd.getCartNum();
|
|
|
+ toothbrushTotal += cd.getCartNum()*cd.getProductPrice();
|
|
|
break;
|
|
|
case 3: // 3:儿童牙刷
|
|
|
toothKidsbrush += cd.getCartNum();
|
|
|
toothAllbrush += cd.getCartNum();
|
|
|
+ toothbrushTotal += cd.getCartNum()*cd.getProductPrice();
|
|
|
break;
|
|
|
case 4: //4:亲子款(成人+儿童)
|
|
|
toothAllbrush += cd.getCartNum();
|
|
|
+ toothbrushTotal += cd.getCartNum()*cd.getProductPrice();
|
|
|
break;
|
|
|
case 5: //5:刷头(lips)
|
|
|
toothLipsbrushHeadNum += cd.getCartNum();
|
|
@@ -495,7 +498,7 @@ public class OrderHandler {
|
|
|
Integer toothKidbrushHeadNum = 0; //儿童刷头数量 - 单只
|
|
|
Integer toothComBinbrushHeadNum = 0; //组合套装刷头数量
|
|
|
|
|
|
- Integer brushelTotal = 0; // 牙刷总金额
|
|
|
+ Integer brushelTotal = 0; // 牙刷总金额 - 判断 需要购买牙刷到某种金额
|
|
|
Integer brushHeadTotal = 0; // 刷头总金额
|
|
|
|
|
|
int brushelCouponTotal = 0; //刷头抵扣券,能够优惠的价格
|
|
@@ -572,7 +575,6 @@ public class OrderHandler {
|
|
|
switch (cartDto.getColorToothType()){
|
|
|
//牙刷分类
|
|
|
case 1: //1:赠品(非牙刷,非刷头)
|
|
|
- brushelTotal += subTotal;
|
|
|
break;
|
|
|
case 2: //2:成人牙刷
|
|
|
toothAuthbrush += cartDto.getCartNum();
|