-
Notifications
You must be signed in to change notification settings - Fork 54
Business Rule(Address Search)
회원, 사장님, 라이더가 공통적으로 사용하는 주소 검색 로직
- 지번 검색
url :(GET) http://localhost/locations/address/zip
** 입력 데이터 **
-
필수 townName(동 이름), buildingNumber(건물 본번), buildingSideNumber(건물 부번)
-
선택 lastSearchBuildingManagementNumber(마지막으로 검색한 건물관리번호) => 페이징을 위해 사용하는 조건, buildingNameForCity(건물이름)
예 : http://localhost/locations/address/zip?buildingNumber=55&buildingSideNumber=0&lastSearchBuildingManagementNumber=301703166025&townName=판교
결과 :
[ { "townCode": "4113510800", "cityName": "경기도", "cityCountryName": "성남시 분당구", "townName": "판교동", "roadNameCode": "411354340401", "roadName": "판교로209번길", "undergroundStatus": null, "buildingNumber": 55, "buildingSideNumber": 0, "zipCode": "13473", "buildingManagementNumber": "4113510800104810001000001", "buildingNameForCity": "", "buildingUseClassification": null, "administrativeTownCode": "4113565000", "administrativeTownName": "판교동", "groundFloorNumber": null, "undergroundFloorNumber": null, "classificationApartmentBuildings": "0", "buildingCount": null, "detailBuildingName": "", "buildingNameChangeHistory": null, "detailBuildingNameChangeHistory": null, "livingStatus": null, "buildingCenterPointXCoordinate": 963929.723456, "buildingCenterPointYCoordinate": 1933906.795892, "exitXCoordinate": 963923.840694, "exitYCoordinate": 1933912.246673, "cityNameEng": null, "cityCountryNameEng": null, "townNameEng": null, "roadNameEng": null, "townMobileClassification": null, "mobileReasonCode": null }, { "townCode": "4477038000", "cityName": "충청남도", "cityCountryName": "서천군", "townName": "판교면", "roadNameCode": "447704580159", "roadName": "대백제로2038번길", "undergroundStatus": null, "buildingNumber": 55, "buildingSideNumber": 0, "zipCode": "33615", "buildingManagementNumber": "4477038021101810002013110", "buildingNameForCity": "", "buildingUseClassification": null, "administrativeTownCode": "4477038000", "administrativeTownName": "판교면", "groundFloorNumber": null, "undergroundFloorNumber": null, "classificationApartmentBuildings": "0", "buildingCount": null, "detailBuildingName": "공가", "buildingNameChangeHistory": null, "detailBuildingNameChangeHistory": null, "livingStatus": null, "buildingCenterPointXCoordinate": 927791.69554, "buildingCenterPointYCoordinate": 1796698.312895, "exitXCoordinate": 927795.198578, "exitYCoordinate": 1796696.53051, "cityNameEng": null, "cityCountryNameEng": null, "townNameEng": null, "roadNameEng": null, "townMobileClassification": null, ...
- 도로명 주소 검색
url :(GET) http://localhost/locations/address/road
** 입력 데이터 **
-
필수 roadName(도로명 이름및 번호), buildingNumber(건물 본번), buildingSideNumber(건물 부번)
-
선택 lastSearchBuildingManagementNumber(마지막으로 검색한 건물관리번호) => 페이징을 위해 사용하는 조건, buildingNameForCity(건물 이름)
예 : http://localhost/locations/address/road?buildingNumber=55&buildingSideNumber=0&roadName=판교로209번길
결과 :
[ { "townCode": "4113510800", "cityName": "경기도", "cityCountryName": "성남시 분당구", "townName": "판교동", "roadNameCode": "411354340401", "roadName": "판교로209번길", "undergroundStatus": null, "buildingNumber": 55, "buildingSideNumber": 0, "zipCode": "13473", "buildingManagementNumber": "4113510800104810001000001", "buildingNameForCity": "", "buildingUseClassification": null, "administrativeTownCode": "4113565000", "administrativeTownName": "판교동", "groundFloorNumber": null, "undergroundFloorNumber": null, "classificationApartmentBuildings": "0", "buildingCount": null, "detailBuildingName": "", "buildingNameChangeHistory": null, "detailBuildingNameChangeHistory": null, "livingStatus": null, "buildingCenterPointXCoordinate": 963929.723456, "buildingCenterPointYCoordinate": 1933906.795892, "exitXCoordinate": 963923.840694, "exitYCoordinate": 1933912.246673, "cityNameEng": null, "cityCountryNameEng": null, "townNameEng": null, "roadNameEng": null, "townMobileClassification": null, "mobileReasonCode": null } ]
모든 주소는 addressCode, addressDetail로 저장해야 한다.
addressCode는 DB 건물주소 PK인 BuildingManagementNumber를 저장한다. 검색과 선택을 통해 입력이 가능하다.
addressDetail은 사용자가 자유롭게 상세 주소를 저장한다.