From 738ac9519a80da21556ad7605acedba54423ab1d Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 02 九月 2023 14:33:03 +0800 Subject: [PATCH] 添加数简服务发布实体类及参数 --- src/main/java/com/moon/server/entity/ctrl/PubEntity.java | 115 ++++++++++++++++++++++--------------- src/main/java/com/moon/server/service/data/PublishService.java | 1 src/main/java/com/moon/server/service/data/ShuJianService.java | 12 +++- src/main/java/com/moon/server/controller/data/PublishController.java | 18 +++++ src/main/resources/application.yml | 11 +-- 5 files changed, 99 insertions(+), 58 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 9bc4efc..b6a5678 100644 --- a/src/main/java/com/moon/server/controller/data/PublishController.java +++ b/src/main/java/com/moon/server/controller/data/PublishController.java @@ -179,7 +179,6 @@ UserEntity ue = tokenService.getCurrentUser(req); if (ue != null) { entity.setUserId(ue.getId()); - entity.setToken(WebHelper.getToken(req)); } permsService.clearPermsCache(); @@ -193,6 +192,23 @@ } @SysLog() + @ApiOperation(value = "鍙戝竷鏁扮畝鏈嶅姟") + @ApiImplicitParams({ + @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "PubEntity", paramType = "body") + }) + public ResponseMsg<Object> insertShuJianService(@RequestBody PubEntity entity, HttpServletRequest req) { + try { + if (null == entity || null == entity.getIds() || entity.getIds().isEmpty()) { + return fail("瀹炰綋绫讳负绌烘垨鎵句笉鍒板厓鏁版嵁ID", 0); + } + + return success(null); + } catch (Exception ex) { + return fail(ex.getMessage(), -1); + } + } + + @SysLog() @ApiOperation(value = "鍒犻櫎澶氭潯") @ApiImplicitParams({ @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") diff --git a/src/main/java/com/moon/server/entity/ctrl/PubEntity.java b/src/main/java/com/moon/server/entity/ctrl/PubEntity.java index 21652ab..93464d5 100644 --- a/src/main/java/com/moon/server/entity/ctrl/PubEntity.java +++ b/src/main/java/com/moon/server/entity/ctrl/PubEntity.java @@ -1,42 +1,79 @@ package com.moon.server.entity.ctrl; -import io.swagger.models.auth.In; +import com.moon.server.entity.shujian.ColorTableEntity; +import com.moon.server.entity.shujian.GradientColorTableEntity; +import java.io.Serializable; import java.util.List; /** * 鍙戝竷瀹炰綋绫� * @author WWW + * @date 2023-09-02 */ -public class PubEntity { +public class PubEntity implements Serializable { + private static final long serialVersionUID = 1393159573706054735L; + public PubEntity() { + min = 0; + max = 18; + epsgCode = 104903; } + /** + * 绫诲瀷锛欴OM锛孌EM锛孷ector锛孧odel + */ private String type; - private String token; - + /** + * 鏈嶅姟鍚嶇О + */ private String name; - private Integer userId; - + /** + * 鏈�灏忕骇鍒� + */ private Integer min; + /** + * 鏈�澶х骇鍒� + */ private Integer max; - private Integer noData; + /** + * EPSG缂栫爜 + */ + private Integer epsgCode; + /** + * 鐢ㄦ埛ID + */ + private Integer userId; + + /** + * 鐩綍缂栫爜 + */ private String dircode; + /** + * 鍗曚綅缂栫爜 + */ private String depcode; + /** + * 鍏冩暟鎹甀D闆嗗悎 + */ private List<Integer> ids; - private List<Integer> models; + /** + * 棰滆壊琛� + */ + private List<ColorTableEntity> colorTable; - private List<Integer> srids; - - private List<Double> zs; + /** + * 娓愬彉棰滆壊琛� + */ + private List<GradientColorTableEntity> gradientColorTable; public String getType() { return type; @@ -46,28 +83,12 @@ this.type = type; } - public String getToken() { - return token; - } - - public void setToken(String token) { - this.token = token; - } - public String getName() { return name; } public void setName(String name) { this.name = name; - } - - public Integer getUserId() { - return userId; - } - - public void setUserId(Integer userId) { - this.userId = userId; } public Integer getMin() { @@ -86,12 +107,20 @@ this.max = max; } - public Integer getNoData() { - return noData; + public Integer getEpsgCode() { + return epsgCode; } - public void setNoData(Integer noData) { - this.noData = noData; + public void setEpsgCode(Integer epsgCode) { + this.epsgCode = epsgCode; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; } public String getDircode() { @@ -118,27 +147,19 @@ this.ids = ids; } - public List<Integer> getModels() { - return models; + public List<ColorTableEntity> getColorTable() { + return colorTable; } - public void setModels(List<Integer> models) { - this.models = models; + public void setColorTable(List<ColorTableEntity> colorTable) { + this.colorTable = colorTable; } - public List<Integer> getSrids() { - return srids; + public List<GradientColorTableEntity> getGradientColorTable() { + return gradientColorTable; } - public void setSrids(List<Integer> srids) { - this.srids = srids; - } - - public List<Double> getZs() { - return zs; - } - - public void setZs(List<Double> zs) { - this.zs = zs; + public void setGradientColorTable(List<GradientColorTableEntity> gradientColorTable) { + this.gradientColorTable = gradientColorTable; } } diff --git a/src/main/java/com/moon/server/service/data/PublishService.java b/src/main/java/com/moon/server/service/data/PublishService.java index 8c49fef..0619d2e 100644 --- a/src/main/java/com/moon/server/service/data/PublishService.java +++ b/src/main/java/com/moon/server/service/data/PublishService.java @@ -6,7 +6,6 @@ import com.moon.server.entity.ctrl.PubEntity; import com.moon.server.entity.data.MetaEntity; import com.moon.server.entity.data.PublishEntity; -import com.moon.server.helper.PathHelper; import com.moon.server.helper.RestHelper; import com.moon.server.helper.StringHelper; import com.moon.server.mapper.data.PublishMapper; 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 eb71087..ec2b4b7 100644 --- a/src/main/java/com/moon/server/service/data/ShuJianService.java +++ b/src/main/java/com/moon/server/service/data/ShuJianService.java @@ -8,6 +8,7 @@ import com.moon.server.helper.StringHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.List; @@ -19,6 +20,12 @@ @Service public class ShuJianService { private final static Log log = LogFactory.getLog(ShuJianService.class); + + @Value("${shujian.ak}") + private String ak; + + @Value("${shujian.url}") + private String url; /** * 鍒涘缓鏁扮畝鍥惧眰 @@ -80,7 +87,6 @@ } } - /** * 鍒犻櫎鏁扮畝鍥惧眰 */ @@ -89,7 +95,7 @@ DeleteEntity entity = new DeleteEntity(); entity.getId_list().add(id); - // + //.. } catch (Exception ex) { log.error(ex.getMessage(), ex); } @@ -103,7 +109,7 @@ DeleteEntity entity = new DeleteEntity(); entity.getId_list().add(id); - // + //.. } catch (Exception ex) { log.error(ex.getMessage(), ex); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 87d3695..9a1cffe 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -103,11 +103,6 @@ deny: # mybatis -#mybatis: -# type-aliases-package: com.moon.server.entity -# config-location: classpath:mybatis.xml -# mapper-locations: classpath:mapper/**/*.xml - mybatis-plus: type-aliases-package: com.moon.server.entity config-location: classpath:mybatis.xml @@ -117,13 +112,17 @@ logging: config: classpath:logback-spring.xml -# RestTemplate config +# restTemplate config remote: maxTotalConnect: 0 maxConnectPerRoute: 1000 connectTimeout: 30000 readTimeout: -1 +shujian: + ak: ak=mf72ff9295c740ec0f37e61433e8a3ad8d + url: http://172.16.2.10:50001/ + # 绯荤粺閰嶇疆 sys: # 绠$悊鍛業D -- Gitblit v1.9.3