package com.jfinal.club.common.banner;


import com.jfinal.club.common.model.Banners;
import com.jfinal.plugin.activerecord.Page;

public class BannersService {

    Banners bannersdao = new Banners().dao();


    /**
     * @return com.jfinal.plugin.activerecord.Page<com.jfinal.club.common.model.Banners>
     * @Author Cc
     * @Description //TODO 根据类型查看banners
     * @Date 2020/3/24
     * @Param [type]
     **/
    public Page<Banners> getBannersByType(int type, int size) {
        return bannersdao.paginate(1, size, "select *", "from banners where type = ? order by sort desc ,addtime desc", type);
    }


}
