import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import cn.wizzer.app.resource.modules.services.BooksService;
import cn.wizzer.framework.page.Pagination;
@IocBean
public class TemplateResourceFounction {
@Inject
private BooksService booksService;
public Pagination cmsBookPage(int pagenumber,int pagesize){
Sql sql = Sqls.create(" select rb.* from cms_book cb left join resource_books rb on cb.book_id = rb.bookId where cb.channel_id = 109 and cb.disabled = 0 and rb.isShelves = 0 ");
Pagination page = booksService.listPage(new Integer(pagenumber), pagesize, sql);
return page;
}
}