NutzCN Logo
问答 Pager pager = dao.createPager(0, 500) 没有起作用?
发布于 2000天前 作者 qq_6d75074b 1608 次浏览 复制 上一个帖子 下一个帖子
标签:
	public Object queryAllByType(@Param("type") String type) {
		try {
			Pager pager = dao.createPager(0, 500);
			List<Leavemessage> resultList = super.dao.query(Leavemessage.class,
					Cnd.where("type", "=", type).desc("leavetime"), pager);
			return super.nutzRet(0, "数据查询成功!", resultList);
		} catch (Exception e) {
			e.printStackTrace();
			return super.nutzRet(-1, "数据查询失败!请稍后重试!", e.getMessage());
		}
	}

2019-07-01 19:56:11,423 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM bs_leavemessage  WHERE type=? ORDER BY leavetime DESC  
    |  1 |
    |----|
    | 个人 |
  For example:> "SELECT * FROM bs_leavemessage  WHERE type='个人' ORDER BY leavetime DESC  "
2019-07-01 19:56:11,454 cn.core.mvc.LogTimeProcessor.process(LogTimeProcessor.java:28) DEBUG - [POST]URI=/bmpt/leavemessage/queryAllByType 69ms

2 回复

页数从1开始

添加回复
请先登陆
回到顶部