net.mingsoft.cms.biz.impl.ContentBizImpl Maven / Gradle / Ivy
/**
* Copyright (c) 2020 铭软科技(mingsoft.net)
* 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有
* 遵循铭软科技《保密协议》
*/
package net.mingsoft.cms.biz.impl;
import net.mingsoft.base.biz.impl.BaseBizImpl;
import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.cms.bean.CategoryBean;
import net.mingsoft.cms.bean.ContentBean;
import net.mingsoft.cms.biz.IContentBiz;
import net.mingsoft.cms.dao.ICategoryDao;
import net.mingsoft.cms.dao.IContentDao;
import net.mingsoft.cms.entity.ContentEntity;
import net.mingsoft.mdiy.entity.ModelEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 文章管理持久化层
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32
* 历史修订:
*/
@Service("cmscontentBizImpl")
public class ContentBizImpl extends BaseBizImpl implements IContentBiz {
/*
* log4j日志记录
*/
protected final Logger LOG = LoggerFactory.getLogger(this.getClass());
@Autowired
private IContentDao contentDao;
/**
* 栏目管理业务层
*/
@Autowired
private ICategoryDao categoryDao;
@Value("${ms.html-dir:html}")
private String htmlDir;
@Override
protected IBaseDao getDao() {
// TODO Auto-generated method stub
return contentDao;
}
@Override
public List queryIdsByCategoryIdForParser(ContentBean contentBean) {
return this.contentDao.queryIdsByCategoryIdForParser(contentBean);
}
@Override
public int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, int appId, String categoryIds) {
if (contentModel!=null) {
return contentDao.getSearchCount(contentModel.getModelTableName(),diyList,whereMap, appId,categoryIds);
}
return contentDao.getSearchCount(null,null,whereMap, appId,categoryIds);
}
}