@Transactional
public class CmsLogMngImpl implements CmsLogMng {
@Transactional(readOnly = true)
public Pagination getPage(Integer category, Integer siteId,
String username, String title, String ip, int pageNo, int pageSize) {
Pagination page;
if (StringUtils.isBlank(username)) {
page = dao.getPage(category, siteId, null, title, ip, pageNo,
pageSize);
} else {
CmsUser user = cmsUserMng.findByUsername(username);
if (user != null) {
page = dao.getPage(category, siteId, user.getId(), title, ip,
pageNo, pageSize);
} else {
page = new Pagination(1, pageSize, 0, new ArrayList<CmsLog>(0));
}
}
return page;
}