# BookingMonthServiceImpl.java

    package cloud.wconnect.rateshop.service.booking.impl;

    import cloud.wconnect.rateshop.entity.booking.BookingMonth;
    import cloud.wconnect.rateshop.mapper.booking.BookingMonthMapper;
    import cloud.wconnect.rateshop.service.booking.IBookingMonthService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.springframework.stereotype.Service;

    import java.util.List;

    /**
     * <p>
     *  服务实现类
     * </p>
     *
     * @author yyt
     * @since 2024-07-29
     */
    @Service
    @DS("rate_shop")
    public class BookingMonthServiceImpl extends ServiceImpl<BookingMonthMapper, BookingMonth> implements IBookingMonthService {

        /**
         * 查询指定日期范围的入住月图表分析数据
         *
         * @param propertyIds 资产 id
         * @param startMonth  开始月
         * @param endMonth    结束月
         * @return 入住月图表分析数据
         * @author yyt
         * @date 2024/7/29
         **/
        @Override
        public List<BookingMonth> list(List<Integer> propertyIds, Integer startMonth, Integer endMonth) {
            return list(new QueryWrapper<BookingMonth>().lambda().in(BookingMonth::getPropertyId, propertyIds)
                    .ge(BookingMonth::getYearMonth, startMonth).le(BookingMonth::getYearMonth, endMonth));
        }

    }