private RecordArticleStatAllTimeModel updateRecordArticleStatAllTime( RecordArticleStatAllTimeModel model) { String sql = "UPDATE recordarticlestatalltime SET uniquevisitor=?, uniquevisitorarticleid=?, uniquevisitorarticletitle=?, uniquevisitorarticleurl=?, pageview=?," + "pageviewarticleid=?, pageviewarticletitle=?, pageviewarticleurl=?, visit=?, visitarticleid=?, visitarticletitle=?, visitarticleurl=?, site_id=? WHERE id = ?"; jdbcTemplate.update( sql, model.getUniqueVisitor(), model.getUniqueVisitorArticleId(), model.getUniqueVisitorArticleTitle(), model.getUniqueVisitorArticleUrl(), model.getPageView(), model.getPageViewArticleId(), model.getPageViewArticleTitle(), model.getPageViewArticleUrl(), model.getVisit(), model.getVisitArticleId(), model.getVisitArticleTitle(), model.getVisitArticleUrl(), model.getSite().getId(), model.getId()); return model; }
public RecordArticleStatAllTimeModel save(RecordArticleStatAllTimeModel model) { if (model.getId() != null) { return updateRecordArticleStatAllTime(model); } else { return addRecordArticleStatAllTimeModel(model); } }