@Test
public void getPageByCondition()
{
TotalAmount TotalAmountPo = new TotalAmount();
TotalAmountPo.setAmount(0);
TotalAmountPo.setTotal(0);
Page PagePo = new Page();
PagePo.setPageNum(1);
PagePo.PageRows=10;
PersonalCondition PersonalConditionPo= new PersonalCondition();
PersonalConditionPo.setSurname("曾");
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String strCreate = "2023-05-18 15:32:05";
String strUpdate = "2023-09-27 15:13:56";
SimpleDateFormat format = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
Date createdDate = null;
Date updateDate = null;
try
{
createdDate = format.parse(strCreate);
System.out.println(createdDate);
updateDate = format.parse(strUpdate);
System.out.println(updateDate);
} catch (ParseException e)
{
e.printStackTrace();
}
// 计算日期差值(以天为单位)
long diffInMillies = Math.abs(updateDate.getTime() - createdDate.getTime());
long diffInDays = diffInMillies / (24 * 60 * 60 * 1000);
System.out.println("日期差值(以天为单位):" + diffInDays);
PersonalConditionPo.setCreate_time(createdDate);
PersonalConditionPo.setUpdate_time(updateDate);
// PersonalConditionPo.setAge(125);
//PersonalConditionPo.setIncome_year(43135);
PersonalVO PersonalVo;
PersonalVo= this.PersonalServiceImpl.GetPageByCondition(PagePo,PersonalConditionPo,TotalAmountPo);
System.out.print(PersonalVo.TotalAmountVo.Total);
System.out.print(PersonalVo.TotalAmountVo.Amount);
Personal Personal;
for (int i=0; i
{
Personal = PersonalVo.PersonalListVo.get(i);
System.out.print(Personal.getDBID());
System.out.print(Personal.getIdentityNumber());
System.out.print(Personal.getSurname());
System.out.print(Personal.getName());
System.out.print(Personal.getMobile());
System.out.print(Personal.getSex());
System.out.print(Personal.getBirthday());
System.out.print(Personal.getAge());
System.out.print(Personal.getTopEducation());
System.out.print(Personal.getIncomeYear());
System.out.print(Personal.getCreateTime());
}
}