class PlaceServiceImpl implements PlaceService {

    @Override
    public UpdatePlaceStatusDto updateStatus(Long id, PlaceStatus status) {
        log.info(LogMessage.IN_UPDATE_PLACE_STATUS, id, status);
        Place updatable = findById(id);
        PlaceStatus oldStatus = updatable.getStatus();
        checkPlaceStatuses(oldStatus, status, id);
        updatable.setStatus(status);
        updatable.setModifiedDate(ZonedDateTime.now(datasourceTimezone));
        if (status.equals(PlaceStatus.APPROVED)) {
            notificationService.sendImmediatelyReport(updatable);
        }
        if (oldStatus.equals(PlaceStatus.PROPOSED)) {
            rabbitTemplate.convertAndSend(sendEmailTopic, CHANGE_PLACE_STATUS_ROUTING_KEY,
                new SendChangePlaceStatusEmailMessage(updatable.getAuthor().getName(),
                    updatable.getName(), updatable.getStatus().toString().toLowerCase(),
                    updatable.getAuthor().getEmail()));
        }
        return modelMapper.map(placeRepo.save(updatable), UpdatePlaceStatusDto.class);
    }

    @Autowired public  PlaceServiceImpl(PlaceRepo placeRepo,
                            ModelMapper modelMapper,
                            CategoryService categoryService,
                            LocationService locationService,
                            SpecificationService specificationService,
                            UserService userService,
                            OpenHoursService openingHoursService,
                            DiscountService discountService,
                            NotificationService notificationService,
                            @Qualifier(value = "datasourceTimezone") ZoneId datasourceTimezone,
                            RabbitTemplate rabbitTemplate,
                            ProposePlaceServiceImpl proposePlaceService);

}