From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 七月 2025 16:43:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service --- src/main/java/com/lf/server/controller/show/InquiryController.java | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/lf/server/controller/show/InquiryController.java b/src/main/java/com/lf/server/controller/show/InquiryController.java index 44ee4b2..6948fb1 100644 --- a/src/main/java/com/lf/server/controller/show/InquiryController.java +++ b/src/main/java/com/lf/server/controller/show/InquiryController.java @@ -9,11 +9,14 @@ import com.lf.server.entity.ctrl.ShpRecordEntity; import com.lf.server.entity.data.DownloadEntity; import com.lf.server.entity.data.MetaFileEntity; +import com.lf.server.entity.data.PublishEntity; import com.lf.server.entity.sys.UserEntity; import com.lf.server.helper.AesHelper; import com.lf.server.helper.StringHelper; import com.lf.server.helper.WebHelper; import com.lf.server.service.all.BaseUploadService; +import com.lf.server.service.data.DownloadService; +import com.lf.server.service.data.PublishService; import com.lf.server.service.show.InquiryService; import com.lf.server.service.sys.TokenService; import io.swagger.annotations.Api; @@ -23,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -43,6 +47,9 @@ @Autowired InquiryService inquiryService; + + @Resource + PublishService publishService; @SysLog() @ApiOperation(value = "涓婁紶Shp鏂囦欢璇诲彇绗竴鏉¤褰曠殑WKT") @@ -80,9 +87,29 @@ @PostMapping(value = "/downloadTiles") public ResponseMsg<Object> downloadTiles(@RequestBody DownloadTileEntity dt, HttpServletRequest req, HttpServletResponse res) { try { + if (null == dt || null == dt.getPubid() || StringHelper.isEmpty(dt.getPwd())) { + return fail("鍙戝竷ID鍜屽瘑鐮佷笉鑳戒负绌�"); + } + String err = dt.verifyCoords(); + if (null != err) { + return fail(err); + } + if (!DownloadService.decryptPwd(dt)) { + return fail("瀵嗙爜瑙e瘑澶辫触", null); + } + PublishEntity pub = publishService.selectById(dt.getPubid()); + if (null == pub) { + return fail("鍙戝竷鏁版嵁涓嶅瓨鍦�"); + } - return success(""); + UserEntity ue = tokenService.getCurrentUser(req); + String guid = inquiryService.zipTiles(dt, pub, ue); + if (null == guid) { + return fail("娌℃湁鐡︾墖闇�瑕佹墦鍖呬笅杞�"); + } + + return success(guid); } catch (Exception ex) { return fail(ex, null); } -- Gitblit v1.9.3