package org.jeecg.modules.xcx.banner.service.impl;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.hotelbanner.entity.HotelBanner;
import org.jeecg.modules.hotelbanner.service.IHotelBannerService;
import org.jeecg.modules.hotelgoods.entity.HotelGoods;
import org.jeecg.modules.xcx.banner.service.IBannerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BannerServiceImpl implements IBannerService {

    @Resource
    private IHotelBannerService hotelBannerService;

    @Override
    public Result<?> BannerList() {
        List<HotelBanner> hotelBannerList = hotelBannerService.lambdaQuery()
                .eq(HotelBanner::getDelFlag, 0)
                .orderByAsc(HotelBanner::getSort)
                .orderByDesc(HotelBanner::getCreateTime)
                .list();
        return Result.OK(hotelBannerList);
    }
}
