Package com.iqbon.jcms.domain

Examples of com.iqbon.jcms.domain.PushRecord


  private PushRecordDAO pushRecordDAO;
  private PushRecord pushRecord; 
 
  protected void setUp() throws Exception {
    pushRecordDAO = (PushRecordDAO) BeanFactory.getBean("pushRecordDAO");
    pushRecord = new PushRecord();
    pushRecord.setTitle("测试推送");
    pushRecord.setTopicid("12022822300000248P");
    pushRecord.setLspri(60);
    pushRecord.setModifyUser("test");
    pushRecord.setSubTitle("测试推送子栏目");
View Full Code Here


    int num = pushRecordDAO.updatePushRecord(pushRecord);
    logger.info(num);
  }

  public void testQueryPushRecordById() {
    PushRecord pushRecord = pushRecordDAO.queryPushRecordById("7");
    logger.info(ToStringBuilder.reflectionToString(pushRecord));
  }
View Full Code Here

  public void testIsEmptyList() {
    List<PushRecord> list = new ArrayList<PushRecord>();
    assertFalse(!tool.isEmptyList(list));
    assertFalse(!tool.isEmptyList(null));
    list.add(new PushRecord());
    assertFalse(tool.isEmptyList(list));
  }
View Full Code Here

    list.add(new PushRecord());
    assertFalse(tool.isEmptyList(list));
  }

  public void testNextPushRecord() {
    PushRecord pushRecord = tool.nextPushRecord("7", 60, 60, null);
    logger.info(ToStringBuilder.reflectionToString(pushRecord));
  }
View Full Code Here

  private PushRecordService pushRecordService;
  private PushRecord pushRecord;
 
  protected void setUp() throws Exception {
    pushRecordService = (PushRecordService) BeanFactory.getBean("pushRecordService");
    pushRecord = new PushRecord();
    pushRecord.setTitle("测试推送");
    pushRecord.setTopicid("12022822300000248P");
    pushRecord.setLspri(60);
    pushRecord.setModifyUser("test");
    pushRecord.setSubTitle("测试推送子栏目");
View Full Code Here

      logger.info(ToStringBuilder.reflectionToString(pushRecord));
    }
  }

  public void testGetLastPushRecord() {
    PushRecord pushRecord = pushRecordService.getLastPushRecord("7", 60, 60, null);
    logger.info(ToStringBuilder.reflectionToString(pushRecord));
  }
View Full Code Here

    PushRecord pushRecord = pushRecordService.getLastPushRecord("7", 60, 60, null);
    logger.info(ToStringBuilder.reflectionToString(pushRecord));
  }

  public void testGetNextRecord() {
    PushRecord pushRecord = pushRecordService.getNextPushRecord("7", 60, 60, null);
    logger.info(ToStringBuilder.reflectionToString(pushRecord));
  }
View Full Code Here

    if(doc==null){
      logger.error("文章" + docid + "不存在");
      return null;
    }

    PushRecord pushRecord = new PushRecord();
    if (StringUtils.isNotBlank(indexid)) {
      pushRecord = pushRecordDAO.queryPushRecordById(indexid);
    } else {//如果没有传indexid,获取文章的第一个推送记录
      List<PushRecord> pushList = pushRecordDAO.queryPushRecordByDocid(docid);
      if (CollectionUtils.isNotEmpty(pushList)) {
View Full Code Here

  @RequestMapping(value = "/republicPushRecord.do")
  @ResponseBody
  public Map<String, String> republicPushRecord(@RequestParam("indexid")
  String indexid) {
    Map<String, String> result = new HashMap<String, String>();
    PushRecord pushRecord = pushRecordService.getPushRecordById(indexid);
    try {
    if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.doc.ordinal()) {
        docService.publishDoc(pushRecord.getDocid(), String.valueOf(indexid));
        result.put(APIConstant.K_RESULT, APIConstant.V_SUCCESS);
      } else if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.model.ordinal()) {
        Model model = modelService.getModelInfoByModelName(pushRecord.getModelName());
        modelService.publishModelContent(model);
        result.put(APIConstant.K_RESULT, APIConstant.V_SUCCESS);
      } else {
        result.put(APIConstant.K_RESULT, APIConstant.V_FAIL);
        result.put(APIConstant.K_MESSAGE, "该类型推送记录无法刷新");
View Full Code Here

  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      return errorMav;
    }
    PushRecord pushRecord = new PushRecord();
    pushRecord.setIndexid(indexid);
    pushRecord.setTitle(title);
    pushRecord.setSubTitle(subTitle);
    pushRecord.setImg(img);
    pushRecord.setUrl(url);
    pushRecord.setLspri(lspri);
    pushRecord.setModifyUser(user.getUserName());
    pushRecord.setTopicid(topicid);
    int number = pushRecordService.updatePushRecord(pushRecord);
    if (number > 0) {
      return this.topicPage(topicid, pageNum, 0, type);
    }
    return errorMav;
View Full Code Here

TOP

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

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.