xieb
2024-04-03 ba82d296ae3f3e5fd7e14907aab2103418d37011
src/main/java/com/dji/sample/patches/controller/ShpToDataSourceController.java
@@ -1,5 +1,7 @@
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.*;
@@ -7,6 +9,7 @@
import java.io.IOException;
import java.util.List;
@RestController
@RequestMapping("${url.patches.prefix}${url.patches.version}")
@@ -14,8 +17,9 @@
    @Autowired
    private ShpToDataSourceServiceImpl shpToDataSourceServiceImpl;
    @PostMapping("/getGeo")
    public void getGeo (@RequestParam("file") MultipartFile file) throws IOException {
        shpToDataSourceServiceImpl.insertGeo(file);
    public ResponseResult<List<LotInfo>> getGeo (@RequestParam("file") MultipartFile file,@RequestParam String workspaceId) throws IOException {
        List<LotInfo> list=shpToDataSourceServiceImpl.insertGeo(file,workspaceId);
        return  ResponseResult.success(list);
    }