From befdcdd0e9c89bc9be3a69fc3033c3cf7afd2ee2 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 07 九月 2023 16:15:56 +0800 Subject: [PATCH] 修改图层获取接口、数据发布接口 --- src/main/java/com/moon/server/entity/sys/LayerEntity.java | 10 ++++++++++ src/main/resources/mapper/sys/LayerMapper.xml | 2 +- src/main/java/com/moon/server/entity/data/PublishEntity.java | 10 ++++++++++ src/main/java/com/moon/server/service/data/ShuJianService.java | 5 ++++- src/main/java/com/moon/server/controller/data/PublishController.java | 8 ++++---- src/main/resources/application.yml | 1 + src/main/resources/mapper/data/PublishMapper.xml | 20 ++++++++++---------- 7 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/moon/server/controller/data/PublishController.java b/src/main/java/com/moon/server/controller/data/PublishController.java index 5416019..0e136f7 100644 --- a/src/main/java/com/moon/server/controller/data/PublishController.java +++ b/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("鏁版嵁绫诲瀷涓嶅尮閰�"); } diff --git a/src/main/java/com/moon/server/entity/data/PublishEntity.java b/src/main/java/com/moon/server/entity/data/PublishEntity.java index e677e9e..4716507 100644 --- a/src/main/java/com/moon/server/entity/data/PublishEntity.java +++ b/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; + } } diff --git a/src/main/java/com/moon/server/entity/sys/LayerEntity.java b/src/main/java/com/moon/server/entity/sys/LayerEntity.java index 6c8d46d..263444f 100644 --- a/src/main/java/com/moon/server/entity/sys/LayerEntity.java +++ b/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; + } } diff --git a/src/main/java/com/moon/server/service/data/ShuJianService.java b/src/main/java/com/moon/server/service/data/ShuJianService.java index 69471a1..4b90277 100644 --- a/src/main/java/com/moon/server/service/data/ShuJianService.java +++ b/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); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f804954..b2dcb71 100644 --- a/src/main/resources/application.yml +++ b/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: diff --git a/src/main/resources/mapper/data/PublishMapper.xml b/src/main/resources/mapper/data/PublishMapper.xml index 7bca2ca..c7371af 100644 --- a/src/main/resources/mapper/data/PublishMapper.xml +++ b/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"> diff --git a/src/main/resources/mapper/sys/LayerMapper.xml b/src/main/resources/mapper/sys/LayerMapper.xml index 27b8849..6723498 100644 --- a/src/main/resources/mapper/sys/LayerMapper.xml +++ b/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 -- Gitblit v1.9.3