Package com.jeecms.cms.entity.assist

Examples of com.jeecms.cms.entity.assist.CmsVoteRecord


@Transactional
public class CmsVoteRecordMngImpl implements CmsVoteRecordMng {

  public CmsVoteRecord save(CmsVoteTopic topic, CmsUser user, String ip,
      String cookie) {
    CmsVoteRecord record = new CmsVoteRecord();
    record.setTopic(topic);
    record.setIp(ip);
    record.setCookie(cookie);
    record.setTime(new Timestamp(System.currentTimeMillis()));
    dao.save(record);
    return record;
  }
View Full Code Here


  public int deleteByTopic(Integer topicId) {
    return dao.deleteByTopic(topicId);
  }

  public Date lastVoteTimeByUserId(Integer userId, Integer topicId) {
    CmsVoteRecord record = dao.findByUserId(userId, topicId);
    return record != null ? record.getTime() : null;
  }
View Full Code Here

    CmsVoteRecord record = dao.findByUserId(userId, topicId);
    return record != null ? record.getTime() : null;
  }

  public Date lastVoteTimeByIp(String ip, Integer topicId) {
    CmsVoteRecord record = dao.findByIp(ip, topicId);
    return record != null ? record.getTime() : null;
  }
View Full Code Here

    CmsVoteRecord record = dao.findByIp(ip, topicId);
    return record != null ? record.getTime() : null;
  }

  public Date lastVoteTimeByCookie(String cookie, Integer topicId) {
    CmsVoteRecord record = dao.findByCookie(cookie, topicId);
    return record != null ? record.getTime() : null;
  }
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.assist.CmsVoteRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.