src/cn/itbaizhan/health/service/impl/PageServiceImpl.java

(完整代码) 874B

package cn.itbaizhan.health.service.impl;

import java.util.List;

import cn.itbaizhan.health.dao.PageDAOInter;
import cn.itbaizhan.health.service.PageServiceInter;
import cn.itbaizhan.health.vo.Pages;

public class PageServiceImpl implements PageServiceInter {
	private PageDAOInter pageDao;

	public void setPageDao(PageDAOInter pageDao) {
		this.pageDao = pageDao;
	}

	/*---------------------*/

	public Pages findAll(Pages pages, String classType, String sortFields)
			throws Exception {
		String hql = "from " + classType + " tmp order by tmp." + sortFields
				+ " desc";
		List<?> pageList = pageDao.findByPage(hql, pages.getPageNow(), pages
				.getPageSize());
		pages.setPageList(pageList);
		long recordCount = pageDao.findRecordCount(classType);
		pages.setRecordCount(recordCount);
		pages.setPageCount();
		return pages;
	}

}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。