Package com.jeecms.cms.entity.main

Examples of com.jeecms.cms.entity.main.ContentCheck


@Repository
public class ContentCheckDaoImpl extends HibernateBaseDao<ContentCheck, Long>
    implements ContentCheckDao {
  public ContentCheck findById(Long id) {
    ContentCheck entity = get(id);
    return entity;
  }
View Full Code Here


    // 执行监听器
    preSave(bean);
    dao.save(bean);
    contentExtMng.save(ext, bean);
    contentTxtMng.save(txt, bean);
    ContentCheck check = new ContentCheck();
    check.setCheckStep(userStep);
    contentCheckMng.save(check, bean);
    contentCountMng.save(new ContentCount(), bean);
    // 保存副栏目
    if (channelIds != null && channelIds.length > 0) {
      for (Integer cid : channelIds) {
View Full Code Here

  public Content check(Integer id, CmsUser user) {
    Content content = findById(id);
    // 执行监听器
    List<Map<String, Object>> mapList = preChange(content);
    ContentCheck check = content.getContentCheck();
    byte userStep = user.getCheckStep(content.getSite().getId());
    byte contentStep = check.getCheckStep();
    byte finalStep = content.getChannel().getFinalStepExtends();
    // 用户审核级别小于当前审核级别,则不能审核
    if (userStep < contentStep) {
      return content;
    }
    check.setRejected(false);
    // 上级审核,清除退回意见。自我审核不清除退回意见。
    if (userStep > contentStep) {
      check.setCheckOpinion(null);
    }
    check.setCheckStep(userStep);
    // 终审
    if (userStep >= finalStep) {
      content.setStatus(ContentCheck.CHECKED);
      // 终审,清除退回意见
      check.setCheckOpinion(null);
      //终审,设置审核者
      check.setReviewer(user);
      check.setCheckDate(Calendar.getInstance().getTime());
    }
    // 执行监听器
    afterChange(content, mapList);
    return content;
  }
View Full Code Here

    if (userStep < contentStep) {
      return content;
    }
    // 执行监听器
    List<Map<String, Object>> mapList = preChange(content);
    ContentCheck check = content.getContentCheck();
    if (!StringUtils.isBlank(opinion)) {
      check.setCheckOpinion(opinion);
    }
    check.setRejected(true);
    // 退回稿件一律为未终审
    content.setStatus(ContentCheck.CHECKING);

    if (step != null) {
      // 指定退回级别,不能大于自身级别
      if (step < userStep) {
        check.setCheckStep(step);
      } else {
        check.setCheckStep(userStep);
      }
    } else {
      // 未指定退回级别
      if (contentStep < userStep) {
        // 文档级别小于用户级别,为审核时退回,文档审核级别不修改。
      } else if (contentStep == userStep) {
        // 文档级别等于用户级别,为退回时退回,文档审核级别减一级。
        check.setCheckStep((byte) (check.getCheckStep() - 1));
      }
    }
    // 执行监听器
    afterChange(content, mapList);
    return content;
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.ContentCheck

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.