Package com.iqbon.jcms.domain

Examples of com.iqbon.jcms.domain.Topic


  private TopicDAO topicDAO;
  private Topic topic;
 
  protected void setUp() throws Exception {
    topicDAO = (TopicDAO) BeanFactory.getBean("topicDAO");
    topic = new Topic();
    String topicid = JCMSConstant.createTopicId();
    topic.setTopicId(topicid);
    topic.setTopicName("主栏目");
    topic.setTopicTree(topicid+";");
    topic.setModifyUser("testuser");
View Full Code Here


      logger.info(ToStringBuilder.reflectionToString(topic));
    }
  }
 
  public void testQueryTopicById() {
    Topic parentTopic = topicDAO.queryTopicById(topic.getTopicId());
    logger.info(ToStringBuilder.reflectionToString(parentTopic));
  }
View Full Code Here

 
  public void testUpdateTopic(){
    topic.setTopicName("修改测试栏目");
    int num = topicDAO.updateTopic(topic);
    logger.info(num);
    Topic modifyTopic = topicDAO.queryTopicById(topic.getTopicId());
    logger.info(ToStringBuilder.reflectionToString(modifyTopic));
    topic.setTopicName("测试栏目");
    topicDAO.updateTopic(topic);
  }
View Full Code Here

  Topic topic = new Topic();
 
  protected void setUp() throws Exception {
    super.setUp();
    topicService = (TopicService) BeanFactory.getBean("topicService");
    topic = new Topic();
    String topicid = "12022822300000248P";//JCMSConstant.createTopicId();
    topic.setTopicId(topicid);
    topic.setTopicName("测试栏目");
    topic.setTopicTree(topicid + ";");
    topic.setModifyUser("zlliang");
View Full Code Here

   */
  public String addTopic(String parentTopicid, String topicName, String topicNav, String user)
      throws Exception {
    String parentTree = "";
    if (!StringUtils.isEmpty(parentTopicid)) {
      Topic parentTopic = topicDAO.queryTopicById(parentTopicid);
      if (parentTopic == null) {
        logger.error(parentTopicid + "增加子栏目,父栏目" + parentTopicid + "不存在");
        throw new Exception(parentTopicid + "栏目不存在");
      }
      parentTree = parentTopic.getTopicTree();
    }
    String topicid = JCMSConstant.createTopicId();
    String topicTree = parentTree + topicid + ";";
    Topic topic = new Topic();
    topic.setTopicId(topicid);
    topic.setTopicTree(topicTree);
    topic.setModifyUser(user);
    topic.setTopicName(topicName);
    topic.setParentTopic(parentTopicid);
    topic.setTopicNav(topicNav);
    int num = topicDAO.insertTopic(topic);
    if (num == 0) {
      throw new Exception(parentTopicid + "增加子栏目失败");
    }
    return topicid;
View Full Code Here

   * @param topicName
   * @param topicid
   * @return
   */
  public int modifyTopic(String topicName, String topicid, String topicNav, String user) {
    Topic topic = new Topic();
    topic.setTopicId(topicid);
    topic.setTopicName(topicName);
    topic.setModifyUser(user);
    topic.setTopicNav(topicNav);
    return topicDAO.updateTopic(topic);
  }
View Full Code Here

  int type) {
    ModelAndView mav = new ModelAndView();
    if (pageNum <= 0) {
      pageNum = 1;
    }
    Topic topic = topicService.getTopicInfo(topicid);
    List<Topic> subTopicList = topicService.getSubTopicList(topicid);
    int totalNum = pushRecordService.getPushRecordNumByTopicAndType(topicid, type);
    Page page = new Page(totalNum, pageNum);
    if (pageSize != null) {
      page.setPageSize(pageSize);
View Full Code Here

    //插入对象
    context.put("doc", doc);
    context.put("pushRecord", pushRecord);
    context.put("tool", tool);
    if (pushRecord != null && StringUtils.isNotBlank(pushRecord.getTopicid())) {
      Topic topic = topicDao.queryTopicById(pushRecord.getTopicid());
      context.put("topic", topic);
    }

    try {
      Velocity.evaluate(context, writer, "VMMessage", content);
View Full Code Here

*/
public class TopicMapper implements RowMapper<Topic> {

  @Override
  public Topic mapRow(ResultSet rs, int rowNum) throws SQLException {
    Topic topic = new Topic();
    topic.setTopicId(rs.getString("topicid"));
    topic.setTopicName(rs.getString("topic_name"));
    topic.setTopicTree(rs.getString("topic_tree"));
    topic.setLastModify(rs.getString("last_modify"));
    topic.setModifyUser(rs.getString("modify_user"));
    topic.setParentTopic(rs.getString("parent_topic"));
    topic.setTopicNav(rs.getString("topic_nav"));
    return topic;
  }
View Full Code Here

TOP

Related Classes of com.iqbon.jcms.domain.Topic

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.