管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-18 5689a8b7a6e54773e726af25e62c7761101a219a
1
已修改2个文件
25 ■■■■ 文件已修改
src/main/java/com/lf/server/controller/data/PublishController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/PublishService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/data/PublishController.java
@@ -152,7 +152,8 @@
                entity.setToken(WebHelper.getToken(req));
            }
            int count = publishService.insertForPub(entity);
            String method = getConvertMethod(entity.getType());
            int count = publishService.postForPub(entity, method, req);
            return success(count);
        } catch (Exception ex) {
@@ -160,6 +161,23 @@
        }
    }
    /**
     * 获取转换方法
     */
    private String getConvertMethod(String type) throws Exception {
        switch (type) {
            case "DOM":
                return "Convert/ToTiles";
            case "MPT":
            case "3DML":
                return "Convert/ToSG";
            case "BIM":
                return "Convert/ToTileset";
            default:
                throw new Exception("数据类型不匹配");
        }
    }
    @SysLog()
    @ApiOperation(value = "删除多条")
    @ApiImplicitParams({
src/main/java/com/lf/server/service/data/PublishService.java
@@ -8,6 +8,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
@@ -92,9 +93,9 @@
    }
    /**
     * 插入发布数据
     * 发送发布请求
     */
    public int insertForPub(PubEntity entity) throws Exception {
    public int postForPub(PubEntity entity, String method, HttpServletRequest req) throws Exception {
        Thread.sleep(30000);
        return 0;