|
@@ -65,7 +65,7 @@ public class ConfirmOrderListener {
|
|
|
ShopCartOrderDto shopCartOrderDto = event.getShopCartOrderDto();
|
|
ShopCartOrderDto shopCartOrderDto = event.getShopCartOrderDto();
|
|
|
OrderParam orderParam = event.getOrderParam();
|
|
OrderParam orderParam = event.getOrderParam();
|
|
|
String userId = SecurityUtils.getUser().getUserId();
|
|
String userId = SecurityUtils.getUser().getUserId();
|
|
|
-// String userId = "36726893042d492aba446439c5f00584";
|
|
|
|
|
|
|
+ //String userId = "36726893042d492aba446439c5f00584";
|
|
|
UserAddr userAddr = userAddrService.getUserAddrByUserId(orderParam.getAddrId(), userId);
|
|
UserAddr userAddr = userAddrService.getUserAddrByUserId(orderParam.getAddrId(), userId);
|
|
|
double total = 0.0;
|
|
double total = 0.0;
|
|
|
int totalCount = 0;
|
|
int totalCount = 0;
|
|
@@ -153,4 +153,8 @@ public class ConfirmOrderListener {
|
|
|
long units = (long) Math.ceil(totalWeight / deliveryWeight);
|
|
long units = (long) Math.ceil(totalWeight / deliveryWeight);
|
|
|
return unitFare.multiply(BigDecimal.valueOf(units));
|
|
return unitFare.multiply(BigDecimal.valueOf(units));
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
|
|
+ System.out.println(calcDeliveryFee(80000.0,20000.0 , BigDecimal.valueOf(5.5)));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|