From c1a537aaa86fbb878cea6ab29a2df41ae15a4c48 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期日, 18 二月 2024 16:22:35 +0800 Subject: [PATCH] 修改bug --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java index 42ebb79..9c3b445 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java @@ -209,9 +209,6 @@ Map<String, Object> data = price.getData(); Double ordinary = Double.valueOf(data.get("ordinary").toString()); Double precious = Double.valueOf(data.get("precious").toString()); - Double discount = Double.valueOf(data.get("discount").toString()); - Double discountMoney = Double.valueOf(data.get("discountMoney").toString()); - Integer activityId = Integer.valueOf(data.get("activityId").toString()); data.put("ordinary", ordinary * number); data.put("precious", precious * number); } @@ -219,9 +216,7 @@ Map<String, Object> data = price.getData(); Double ordinary = Double.valueOf(data.get("ordinary").toString()); Double precious = Double.valueOf(data.get("precious").toString()); - Double discount = Double.valueOf(data.get("discount").toString()); Double discountMoney = Double.valueOf(data.get("discountMoney").toString()); - Integer activityId = Integer.valueOf(data.get("activityId").toString()); data.put("ordinary", ordinary - discountMoney); data.put("precious", precious - discountMoney); } @@ -302,9 +297,15 @@ Map<String, Object> data = price.getData(); Double ordinary = Double.valueOf(data.get("ordinary").toString()); Double precious = Double.valueOf(data.get("precious").toString()); - Double discount = Double.valueOf(data.get("discount").toString()); + Double discount = null; + if(null != data.get("discount")){ + discount = Double.valueOf(data.get("discount").toString()); + } Double discountMoney = Double.valueOf(data.get("discountMoney").toString()); - Integer activityId = Integer.valueOf(data.get("activityId").toString()); + Integer activityId = null; + if(null != data.get("activityId")){ + activityId = Integer.valueOf(data.get("activityId").toString()); + } orderLogistics.setOrderMoney((cargoType == 1 ? ordinary : precious) + tipMoney); orderLogistics.setTravelMoney((cargoType == 1 ? ordinary : precious)); if(type == 5){ @@ -1044,6 +1045,11 @@ }else{ map.put("receipt", ""); } + if(state == 7){ + Double discountMoney = Double.valueOf(map.get("discountMoney").toString()); + Double orderMoney = Double.valueOf(map.get("orderMoney").toString()); + map.put("orderMoney", orderMoney - discountMoney); + } } return maps; } @@ -1355,8 +1361,8 @@ @Override public List<Map<String, Object>> queryCoupon(Integer language, Integer orderId, Integer uid, Integer pageNum, Integer size) throws Exception { OrderLogistics orderLogistics = this.selectById(orderId); - List<Map<String, Object>> list = userCouponRecordService.queryCoupon(language, uid, orderLogistics.getCompanyId(), 1, 4, orderLogistics.getPayMoney() , pageNum, size); - List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(language, uid, orderLogistics.getCompanyId(), 1, 0, orderLogistics.getPayMoney(), pageNum, size); + List<Map<String, Object>> list = userCouponRecordService.queryCoupon(language, uid, orderLogistics.getCompanyId(), 1, 4, orderLogistics.getOrderMoney() - orderLogistics.getDiscountMoney(), pageNum, size); + List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(language, uid, orderLogistics.getCompanyId(), 1, 0, orderLogistics.getOrderMoney() - orderLogistics.getDiscountMoney(), pageNum, size); list.addAll(list1); return list; } -- Gitblit v1.7.1