rain
2024-04-18 3dae83e56bbdef77404be7b47d19136bb8251c8c
src/main/java/com/dji/sample/territory/controller/TbDkjbxxController.java
@@ -68,13 +68,13 @@
     * @param file 需要上传的文件,通过multipart/form-data方式提交
     * @return 返回上传结果的ResponseResult对象,其中包含上传成功的消息
     */
    @PostMapping("/upload")
    public ResponseResult<String> uploadFile(@RequestParam("file") MultipartFile file) {
        tbDkjbxxService.uploadFile(file);
        List<TbDkjbxxEntity> list = tbDkjbxxService.list();
        service.savaInMysql(list);
        return tbDkjbxxService.uploadFile(file);
    }
//    @PostMapping("/upload")
//    public ResponseResult<String> uploadFile(@RequestParam("file") MultipartFile file) {
//        tbDkjbxxService.uploadFile(file);
//        List<TbDkjbxxEntity> list = tbDkjbxxService.list();
////        service.savaInMysql(list);
//        return tbDkjbxxService.uploadFile(file);
//    }
    @PostMapping("/uploadLot")
    public ResponseResult getGeo(@RequestParam String workspaceId,
@@ -82,6 +82,8 @@
                                 @RequestParam double airportLat,
                                 @RequestParam double airportLon,
                                 HttpServletRequest request) throws Exception {
        List<TbDkjbxxEntity> list = tbDkjbxxService.list();
        service.savaInMysql(list,workspaceId);
        MultipartFile multipartFile = tbDkjbxxService.listFile(workspaceId, waylineName, airportLat, airportLon);
        CustomClaim customClaim = (CustomClaim) request.getAttribute(TOKEN_CLAIM);
        String creator = customClaim.getUsername();