liujie
6 天以前 39e9e0600ed31ee6eff5c3b1287c36c7b7196b90
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -170,8 +170,6 @@
   private IOrderRideService orderRideService;
    
    
   /**
    * 获取正在进行中的订单
    *
@@ -2261,6 +2259,7 @@
      }
   }
    
    @PostMapping("/api/order/queryMyTripList")
    @ApiOperation(value = "获取我的行程列表", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
@@ -2278,12 +2277,13 @@
            
            List<Map<String,Object>> raw = fetchTrips(uid, type, pageNum, size);
            return ResultUtil.success(TripOrderVo.getTripOrderVo(raw));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    /**
     * 私有:拉取指定 type 的行程列表。
     * type=0 → 全部类型;1/2/3 → 对应三种服务;pageNum/size 负责分页。
@@ -2319,7 +2319,7 @@
            if (da == null && db == null) return 0;
            if (da == null) return 1;   // a 在后面
            if (db == null) return -1;  // b 在后面
            return da.compareTo(db);    // 按时间正序(升序)排列
            return da.compareTo(db) * -1;    // 按时间正序(升序)排列
        });
        // 将经纬度转换为城市并设置到数据中
        if (list != null && !list.isEmpty()) {
@@ -2364,6 +2364,8 @@
        }
        return list;
    }
    @PostMapping("/api/user/sendTripSheetEmail")
    @ApiOperation(value = "发送行程单邮件", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
@@ -2395,7 +2397,7 @@
            String filePath = tripSheetGenerator.generatePdf(tripOrderVos);
            File attachment = new File(filePath);
            String displayFileName = "贵人家园出行-行程单.pdf";
            emailUtil.sendEmailWithAttachment(tripSheet.getRecipientEmail(), "贵人家园出行-行程单", "贵人家园出行-行程单", attachment,displayFileName);
            emailUtil.sendEmailWithAttachment(tripSheet.getRecipientEmail(), "贵人家园出行-行程单", "请查收您的行程单", attachment, displayFileName);
            attachment.delete(); // 发送成功后删除临时文件
            Map<String, Object> result = new HashMap<>();
            result.put("orderNum", orderList.size());
@@ -2405,6 +2407,7 @@
            return ResultUtil.error("邮件发送失败"+e.getMessage());
        }
    }
    /**
     * 根据订单类型和ID集合查询订单
     */