新增门店查询失败提示

This commit is contained in:
LIONCITYS\lioncity
2020-09-10 14:48:20 +08:00
parent 6aa9a72133
commit 2716986de1

View File

@ -91,7 +91,11 @@ public class SystemStoreController {
public ResponseEntity<GetTencentLocationVO> 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