| | |
| | | } |
| | | |
| | | private void checkDepositMoney(RentingHouseRegisterDTO registerDTO) { |
| | | BigDecimal depositMoney = registerDTO.getDepositMoney(); |
| | | BigDecimal dingMoney = registerDTO.getDingMoney(); |
| | | BigDecimal monthlyRentMoney = registerDTO.getMonthlyRentMoney(); |
| | | if (nonNull(depositMoney) && nonNull(monthlyRentMoney) && depositMoney.compareTo(monthlyRentMoney) == 1) { |
| | | if (nonNull(dingMoney) && nonNull(monthlyRentMoney) && dingMoney.compareTo(monthlyRentMoney) == 1) { |
| | | throw new ServiceException("500", "定金不能超过月租金"); |
| | | } |
| | | } |
| | |
| | | public R nearby(NearbyDTO nearbyDTO) { |
| | | Rectangle rectangle =new NearbyUtil().getRectangle(nearbyDTO.getDistance(), Double.parseDouble(nearbyDTO.getLongitude()), Double.parseDouble(nearbyDTO.getLatitude())); |
| | | return R.ok(this.baseMapper.nearby(rectangle.getMinX(),rectangle.getMaxX(), |
| | | rectangle.getMinY(),rectangle.getMaxY(),nearbyDTO.getKeyword(), nearbyDTO.getCommunityId())); |
| | | rectangle.getMinY(),rectangle.getMaxY(), nearbyDTO)); |
| | | } |
| | | |
| | | @Override |