|
@@ -80,10 +80,14 @@ public class ApiStoreServiceImpl implements ApiStoreService {
|
|
|
JSONObject resp = new JSONObject();
|
|
|
Member member = iMemberService.getById(loginId);
|
|
|
Map<String, Object> map = AddressLngLatExchanger.addressToLngAndLag(shopReq.getAddress());
|
|
|
+ if(map==null){
|
|
|
+ return ResponseResult.error(ResponseResultCodeEnum.SHOP_ADDRESS_INVALID);
|
|
|
+ }
|
|
|
double distance = CoordinateUtils.getDistance(Double.parseDouble(map.get("lng") + ""), Double.parseDouble(map.get("lat") + ""), Double.parseDouble(shopReq.getLongitude()), Double.parseDouble(shopReq.getLatitude()));
|
|
|
if (distance > 50) {
|
|
|
return ResponseResult.error(ResponseResultCodeEnum.SHOP_ADDRESS_ERROR);
|
|
|
}
|
|
|
+ shopReq.setCityCode(map.get("cityCode")+"");
|
|
|
AipOcr client = new AipOcr("23831014", "BELGCxGTPOlcZzeZ85OLyIpD", "pLt8IG1PoXZBaDonLfFM9EkXndI1OBxh");
|
|
|
String idCardName = "";
|
|
|
if (StringUtils.isNotBlank(shopReq.getIdcardFront())) {
|
|
@@ -219,7 +223,7 @@ public class ApiStoreServiceImpl implements ApiStoreService {
|
|
|
// shop.setDoorHeadPhoto(shopReq.getHouseNumber());
|
|
|
shop.setLat(shopReq.getLatitude());
|
|
|
shop.setLng(shopReq.getLongitude());
|
|
|
- // shop.setCityCode(shopReq.getCityCode());
|
|
|
+ shop.setCityCode(shopReq.getCityCode());
|
|
|
shop.setMobile(shopReq.getContactPhone());
|
|
|
shop.setName(shopReq.getShopName());
|
|
|
shop.setStreet(shopReq.getHouseNumber());
|
|
@@ -352,7 +356,7 @@ public class ApiStoreServiceImpl implements ApiStoreService {
|
|
|
return ResponseResult.error(ResponseResultCodeEnum.SHOP_EXIST);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ storeDto.setCityCode(shop.getCityCode());
|
|
|
shop = shopBean(shop, storeDto);
|
|
|
if (storeDto.getCategoryId() != null) {
|
|
|
shop.setCategoryId(storeDto.getCategoryId());
|