完成基本service

This commit is contained in:
shuzheng 2016-11-14 21:41:17 +08:00
parent 73e50f58dc
commit c08fefe864
7 changed files with 122 additions and 2 deletions

View File

@ -0,0 +1,11 @@
package com.zheng.cms.service;
import com.zheng.cms.dao.mapper.CmsArticleMapper;
/**
* 文章service接口
* Created by shuzheng on 2016/11/14.
*/
public interface CmsArticleService extends BaseService<CmsArticleMapper> {
}

View File

@ -0,0 +1,11 @@
package com.zheng.cms.service;
import com.zheng.cms.dao.mapper.CmsCategoryMapper;
/**
* 类目service接口
* Created by shuzheng on 2016/11/14.
*/
public interface CmsCategoryService extends BaseService<CmsCategoryMapper> {
}

View File

@ -0,0 +1,13 @@
package com.zheng.cms.service;
import com.zheng.cms.dao.mapper.CmsTagMapper;
import com.zheng.cms.dao.mapper.UserMapper;
import com.zheng.cms.dao.model.UserVO;
/**
* 标签service接口
* Created by shuzheng on 2016/11/14.
*/
public interface CmsTagService extends BaseService<CmsTagMapper> {
}

View File

@ -0,0 +1,29 @@
package com.zheng.cms.service.impl;
import com.zheng.cms.dao.mapper.CmsArticleMapper;
import com.zheng.cms.service.CmsArticleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 文章service实现
* Created by shuzheng on 2016/11/14.
*/
@Service
@Transactional
public class CmsArticleServiceImpl implements CmsArticleService {
private static Logger _log = LoggerFactory.getLogger(CmsArticleServiceImpl.class);
@Autowired
private CmsArticleMapper cmsArticleMapper;
@Override
public CmsArticleMapper getMapper() {
return cmsArticleMapper;
}
}

View File

@ -0,0 +1,29 @@
package com.zheng.cms.service.impl;
import com.zheng.cms.dao.mapper.CmsCategoryMapper;
import com.zheng.cms.service.CmsCategoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 类目service实现
* Created by shuzheng on 2016/11/14.
*/
@Service
@Transactional
public class CmsCategoryServiceImpl implements CmsCategoryService {
private static Logger _log = LoggerFactory.getLogger(CmsCategoryServiceImpl.class);
@Autowired
private CmsCategoryMapper cmsCategoryMapper;
@Override
public CmsCategoryMapper getMapper() {
return cmsCategoryMapper;
}
}

View File

@ -0,0 +1,29 @@
package com.zheng.cms.service.impl;
import com.zheng.cms.dao.mapper.CmsTagMapper;
import com.zheng.cms.service.CmsTagService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 标签service实现
* Created by shuzheng on 2016/11/14.
*/
@Service
@Transactional
public class CmsTagServiceImpl implements CmsTagService {
private static Logger _log = LoggerFactory.getLogger(CmsTagServiceImpl.class);
@Autowired
private CmsTagMapper cmsTagMapper;
@Override
public CmsTagMapper getMapper() {
return cmsTagMapper;
}
}

View File

@ -11,8 +11,6 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
/**
* 用户service实现
* @author shuzheng