rain
2024-03-29 85e37ac89f2d73e899ffff577618e4b55fa0bd66
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.dji.sample.patches.controller;
 
import com.dji.sample.common.model.ResponseResult;
import com.dji.sample.patches.model.entity.LotInfo;
import com.dji.sample.patches.service.impl.ShpToDataSourceServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
 
import java.io.IOException;
import java.util.List;
 
@RestController
@RequestMapping("${url.patches.prefix}${url.patches.version}")
public class ShpToDataSourceController {
    @Autowired
    private ShpToDataSourceServiceImpl shpToDataSourceServiceImpl;
    @PostMapping("/getGeo")
    public ResponseResult<List<LotInfo>> getGeo (@RequestParam("file") MultipartFile file) throws IOException {
        List<LotInfo> list=shpToDataSourceServiceImpl.insertGeo(file);
        return  ResponseResult.success(list);
    }
 
 
}