Пример #1
0
 public List<ArticleDO> pageByExample(ArticleDO articleDO, PageInfo page) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("id", articleDO.getId());
   params.put("gmtCreate", articleDO.getGmtCreate());
   params.put("gmtModify", articleDO.getGmtModify());
   params.put("creatorId", articleDO.getCreatorId());
   params.put("modifierId", articleDO.getModifierId());
   params.put("title", articleDO.getTitle());
   params.put("contentId", articleDO.getContentId());
   params.put("type", articleDO.getType());
   params.put("pageStart", page.getPageStart());
   params.put("pageSize", page.getPageSize());
   List<ArticleDO> list = getSqlMapClientTemplate().queryForList("Article.pageByExample", params);
   return list;
 }
Пример #2
0
 public List<ArticleDO> listByRelationAndExample(
     ArticleRelationDO articleRelationDO, ArticleDO articleDO) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("relation", articleRelationDO.getRelation());
   params.put("relatedType", articleRelationDO.getRelatedType());
   params.put("relatedId", articleRelationDO.getRelatedId());
   params.put("id", articleDO.getId());
   params.put("gmtCreate", articleDO.getGmtCreate());
   params.put("gmtModify", articleDO.getGmtModify());
   params.put("creatorId", articleDO.getCreatorId());
   params.put("modifierId", articleDO.getModifierId());
   params.put("title", articleDO.getTitle());
   params.put("contentId", articleDO.getContentId());
   params.put("type", articleDO.getType());
   List<ArticleDO> list =
       getSqlMapClientTemplate().queryForList("Article.listByRelationAndExample", params);
   return list;
 }