-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44ec8dd
commit c9410df
Showing
18 changed files
with
209 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
minidao-pe-example/src/test/java/test/ClientDaoPageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package test; | ||
|
||
import com.alibaba.druid.support.logging.Log; | ||
import com.alibaba.druid.support.logging.LogFactory; | ||
import com.alibaba.druid.util.JdbcUtils; | ||
import examples.dao.EmployeeDao; | ||
import examples.entity.Employee; | ||
import org.jeecgframework.minidao.pojo.MiniDaoPage; | ||
import org.springframework.beans.factory.BeanFactory; | ||
import org.springframework.context.support.ClassPathXmlApplicationContext; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.Date; | ||
|
||
/** | ||
* 测试ID主键规则: Int 自增 | ||
* (注意:测试该方法需要把数据库ID类型改成int,自增) | ||
*/ | ||
public class ClientDaoPageTest { | ||
private final static Log log = LogFactory.getLog(ClientDaoPageTest.class); | ||
public static void main(String args[]) { | ||
BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml"); | ||
EmployeeDao employeeDao = (EmployeeDao) factory.getBean("employeeDao"); | ||
|
||
//第一页数据 | ||
MiniDaoPage<Employee> pageList1 = employeeDao.getAll(new Employee(),2,10); | ||
log.info("getTotal1 = "+pageList1.getTotal()); | ||
log.info("getPages1 = "+pageList1.getPages()); | ||
|
||
|
||
//第二页数据 | ||
MiniDaoPage<Employee> pageList2 = employeeDao.getAll(new Employee(),2,10); | ||
log.info("getTotal2 = "+pageList2.getTotal()); | ||
log.info("getPages2 = "+pageList2.getPages()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.