月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-09-07 befdcdd0e9c89bc9be3a69fc3033c3cf7afd2ee2
修改图层获取接口、数据发布接口
已修改7个文件
56 ■■■■ 文件已修改
src/main/java/com/moon/server/controller/data/PublishController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/data/PublishEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/entity/sys/LayerEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/service/data/ShuJianService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/data/PublishMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sys/LayerMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/controller/data/PublishController.java
@@ -136,13 +136,13 @@
        switch (type) {
            case "DOM":
                return "type = 'DOM'";
                return "a.type = 'DOM'";
            case "DEM":
                return "type = 'DEM'";
                return "a.type = 'DEM'";
            case "Vector":
                return "type = 'Vector'";
                return "a.type = 'Vector'";
            case "Model":
                return "type = 'Model'";
                return "a.type = 'Model'";
            default:
                throw new Exception("数据类型不匹配");
        }
src/main/java/com/moon/server/entity/data/PublishEntity.java
@@ -66,6 +66,8 @@
    private String updateName;
    private String proxy;
    public PublishEntity() {
    }
@@ -292,4 +294,12 @@
    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }
    public String getProxy() {
        return proxy;
    }
    public void setProxy(String proxy) {
        this.proxy = proxy;
    }
}
src/main/java/com/moon/server/entity/sys/LayerEntity.java
@@ -58,6 +58,8 @@
    private int flag;
    private Integer pubid;
    public LayerEntity() {
    }
@@ -252,4 +254,12 @@
    public void setFlag(int flag) {
        this.flag = flag;
    }
    public Integer getPubid() {
        return pubid;
    }
    public void setPubid(Integer pubid) {
        this.pubid = pubid;
    }
}
src/main/java/com/moon/server/service/data/ShuJianService.java
@@ -38,6 +38,9 @@
    @Value("${shujian.url}")
    String sjUrl;
    @Value("${shujian.ctUrl}")
    String ctUrl;
    @Value("${shujian.path}")
    String sjPath;
@@ -68,7 +71,7 @@
     */
    public void selectSjColorTables(Integer pageSize, Integer pageIndex, HttpServletRequest req, HttpServletResponse res) {
        try {
            String url = String.format(COLOR_TABLE, sjUrl, ak, pageSize, pageIndex);
            String url = String.format(COLOR_TABLE, ctUrl, ak, pageSize, pageIndex);
            HttpHelper httpHelper = new HttpHelper();
            httpHelper.service(req, res, null, url);
src/main/resources/application.yml
@@ -123,6 +123,7 @@
  ak: ak=mf72ff9295c740ec0f37e61433e8a3ad8d
  url: http://172.16.2.10:50005
  path: share/YQData/upload/
  ctUrl: http://172.16.2.10:50001
# 系统配置
sys:
src/main/resources/mapper/data/PublishMapper.xml
@@ -46,14 +46,14 @@
    </select>
    <select id="selectCount" resultType="java.lang.Integer">
        select count(*) from lf.sys_publish
        select count(*) from lf.sys_publish a
        <where>
            1 = 1
            <if test="name != null">
                and upper(name) like #{name}
                and upper(a.name) like #{name}
            </if>
            <if test="dircode != null">
                and dirid like #{dircode}
                and a.dirid like #{dircode}
            </if>
            <if test="type != null">
                and ${type}
@@ -62,15 +62,15 @@
    </select>
    <select id="selectByPage" resultType="com.moon.server.entity.data.PublishEntity">
        select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName
        from lf.sys_publish a
        select ST_AsText(a.geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(a.create_user) createName, fn_uname(a.update_user) updateName, b.proxy
        from lf.sys_publish a left join lf.sys_res b on a.id = b.pubid
        <where>
            1 = 1
            <if test="name != null">
                and upper(name) like #{name}
                and upper(a.name) like #{name}
            </if>
            <if test="dircode != null">
                and dirid like #{dircode}
                and a.dirid like #{dircode}
            </if>
            <if test="type != null">
                and ${type}
@@ -85,9 +85,9 @@
    </select>
    <select id="selectById" resultType="com.moon.server.entity.data.PublishEntity">
        select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName
        from lf.sys_publish a
        where id = #{id}
        select ST_AsText(a.geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(a.create_user) createName, fn_uname(a.update_user) updateName, b.proxy
        from lf.sys_publish a left join lf.sys_res b on a.id = b.pubid
        where a.id = #{id}
    </select>
    <select id="selectByIds" resultType="com.moon.server.entity.data.PublishEntity">
src/main/resources/mapper/sys/LayerMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.moon.server.mapper.sys.LayerMapper">
    <select id="selectLayers" resultType="com.moon.server.entity.sys.LayerEntity">
        select distinct d.*, e.proxy
        select distinct d.*, e.proxy, e.pubid
        from lf.sys_user a
            inner join lf.sys_role_user b on a.id = b.userid
            inner join lf.sys_role_layer c on b.roleid = c.roleid