@Override
public Pagination findPagination(Map<String, Object> queryMap,
int currentPage, int pageSize) throws ParseException
{
JoinInformationCriteria joinInformationCriteria = new JoinInformationCriteria();
Criteria criteria = joinInformationCriteria.createCriteria();
// 设置搜索条件参数
if (queryMap != null)
{
if (queryMap != null)
{
if (queryMap.containsKey("shopName"))
{
criteria.andShopNameLike("%" + (String) queryMap.get("shopName") + "%");
}
if (queryMap.containsKey("linkMan"))
{
criteria.andLinkManLike("%" + (String) queryMap.get("linkMan") + "%");
}
if (queryMap.containsKey("startTime"))
{
if(queryMap.containsKey("endTime"))
{
criteria.andSubTimeBetween(
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("endTime")));
}
else
{
criteria.andSubTimeBetween(
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
new Date());
}
}
if(queryMap.containsKey("auditStatus"))
{
criteria.andAuditStatusEqualTo(Short.parseShort((String) queryMap.get("auditStatus")));
}
}
}
// 设置分页参数
joinInformationCriteria.setPageSize(pageSize);
joinInformationCriteria.setStartIndex((currentPage - 1) * pageSize);
List<JoinInformation> items = joinInformationMapper.selectByCriteria(joinInformationCriteria);
for(JoinInformation info : items)
{
// 申请时间