From 2716986de15feb93f26866a64d3f39907901e6e0 Mon Sep 17 00:00:00 2001 From: "LIONCITYS\\lioncity" <18026623439@163.com> Date: Thu, 10 Sep 2020 14:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=97=A8=E5=BA=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/yixiang/modules/shop/rest/SystemStoreController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java index d46e69d8..f928bcbf 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java @@ -91,7 +91,11 @@ public class SystemStoreController { public ResponseEntity create(@Validated @RequestBody String jsonStr) { JSONObject jsonObject = JSON.parseObject(jsonStr); String addr = jsonObject.getString("addr"); - return new ResponseEntity<>(LocationUtils.getLocation(addr), HttpStatus.CREATED); + GetTencentLocationVO locationVO = LocationUtils.getLocation(addr); + if(locationVO.getStatus()!=0){ + throw new BadRequestException(locationVO.getMessage()); + } + return new ResponseEntity<>(locationVO, HttpStatus.CREATED); } @ForbidSubmit