Commit 0ad857fa by ping.wu

查询订单餐盒费配置增加外卖和打包带走判断

parent 509e0b82
......@@ -38,6 +38,8 @@ public class CommonFunctionHandle {
* 查询配置,比较配送费
*/
public Long packAmountConfig(ShoppingCartInfoRequestVo shoppingCartInfoRequestVo, Long newPackAmount,Long totalAmount) {
if (Objects.equals(shoppingCartInfoRequestVo.getOrderType(), CreateOrderType.TAKE_OUT.getCode())
|| Objects.equals(shoppingCartInfoRequestVo.getReachStoreType(), OrderType.COLLECT_GOODS.getCode())) {
if(newPackAmount == 0){
return newPackAmount;
}
......@@ -46,7 +48,7 @@ public class CommonFunctionHandle {
if(StringUtils.isEmpty(value)){
return newPackAmount;
}
ApiLog.printLog("查询订单餐盒费配置", String.valueOf(newPackAmount), String.valueOf(totalAmount), value);
PackAmountConfig packAmountConfig = JSONObject.parseObject(value, PackAmountConfig.class);
if(packAmountConfig == null || CollectionUtils.isEmpty(packAmountConfig.getCollectType())){
return newPackAmount;
......@@ -60,6 +62,7 @@ public class CommonFunctionHandle {
break;
}
}
}
return newPackAmount;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment