Pu Zhibing
2025-04-03 d93f63f90bd33d1d04fdcb9ba2d3da281b4b05fc
UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
@@ -215,7 +215,7 @@
            return ResultUtil.error("有未完成的订单");
        }
        list = orderTaxiMapper.queryByState_(uid, 2, 1, 1, 2, 3, 4, 5, 6, 11);
        list = orderTaxiMapper.queryByState_(uid, 2, 1, 1, 2, 3, 4, 5, 6, 7, 11, 12);
        if(list.size() > 0 && orderTaxi.getOrderType() == 2){
            return ResultUtil.error("有未完成的订单");
        }
@@ -670,8 +670,8 @@
    @Override
    public List<Map<String, Object>> queryCoupon(Integer orderId, Integer uid, Integer pageNum, Integer size) throws Exception {
        OrderTaxi orderTaxi = this.selectById(orderId);
        List<Map<String, Object>> list = userCouponRecordService.queryCoupon(uid, orderTaxi.getCompanyId(), 1, 2, orderTaxi.getOrderMoney(), pageNum, size);
        List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(uid, orderTaxi.getCompanyId(), 1, 0, orderTaxi.getOrderMoney(), pageNum, size);
        List<Map<String, Object>> list = userCouponRecordService.queryCoupon(uid, null, 1, 2, orderTaxi.getOrderMoney(), pageNum, size);
        List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(uid, null, 1, 0, orderTaxi.getOrderMoney(), pageNum, size);
        list.addAll(list1);
        return list;
    }
@@ -704,9 +704,9 @@
        UserCouponRecord userCouponRecord = null;
        if(null != couponId){
            userCouponRecord = userCouponRecordService.selectById(couponId);
            if(userCouponRecord.getCompanyId() != orderTaxi.getCompanyId()){
                return ResultUtil.error("优惠券不能用于此订单", "");
            }
//            if(userCouponRecord.getCompanyId() != orderTaxi.getCompanyId()){
//                return ResultUtil.error("优惠券不能用于此订单", "");
//            }
            if(userCouponRecord.getState() == 2){
                return ResultUtil.error("优惠券已使用", "");
            }
@@ -1089,8 +1089,8 @@
        orderServerWarpper.setOrderId(orderTaxi.getId());
        orderServerWarpper.setOrderType(2);
        orderServerWarpper.setState(orderTaxi.getState());
        orderServerWarpper.setLon(null != value ? value.split(",")[0] : "0.0");
        orderServerWarpper.setLat(null != value ? value.split(",")[1] : "0.0");
        orderServerWarpper.setLon(null != value ? value.split(",")[1] : "0.0");
        orderServerWarpper.setLat(null != value ? value.split(",")[0] : "0.0");
        value = value == null ? "0.0,0.0" : value;
        double[] doubles = GpsCoordinateUtils.calBD09toGCJ02(Double.parseDouble(value.split(",")[1]), Double.parseDouble(value.split(",")[0]));
        orderServerWarpper.setNextLongitude(String.valueOf(doubles[0]));