去掉类上的事务注解
This commit is contained in:
@@ -40,7 +40,6 @@ import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
|
||||
@Autowired
|
||||
@@ -120,7 +119,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
* @author ThinkGem
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateExpiredWeight(Article article) {
|
||||
// 更新过期的权重,间隔为“6”个小时
|
||||
Date updateExpiredWeightDate = CmsUtils.getCache("updateExpiredWeightDateByArticle");
|
||||
@@ -137,7 +136,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Article article) {
|
||||
Global.assertDemoMode();
|
||||
// 设置内容状态
|
||||
@@ -177,7 +176,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Article article) {
|
||||
super.updateStatus(article);
|
||||
}
|
||||
@@ -185,7 +184,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
/**
|
||||
* 获取文章获取文章并点击数加一
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateHitsAddOne(String id) {
|
||||
dao.updateHitsAddOne(id);
|
||||
}
|
||||
@@ -195,7 +194,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Article article) {
|
||||
super.delete(article);
|
||||
}
|
||||
|
||||
@@ -4,18 +4,17 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.service.TreeService;
|
||||
import com.jeesite.modules.cms.dao.CategoryDao;
|
||||
import com.jeesite.modules.cms.entity.Category;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 栏目表Service
|
||||
@@ -23,7 +22,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
|
||||
/**
|
||||
@@ -59,7 +57,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Category category) {
|
||||
if (StringUtils.isNotBlank(category.getViewConfig())){
|
||||
category.setViewConfig(StringEscapeUtils.unescapeHtml4(category.getViewConfig()));
|
||||
@@ -85,7 +83,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Category category) {
|
||||
super.updateStatus(category);
|
||||
}
|
||||
@@ -95,7 +93,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Category category) {
|
||||
super.delete(category);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Comment comment) {
|
||||
super.save(comment);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Comment comment) {
|
||||
super.updateStatus(comment);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Comment comment) {
|
||||
super.delete(comment);
|
||||
}
|
||||
|
||||
@@ -4,18 +4,16 @@
|
||||
*/
|
||||
package com.jeesite.modules.cms.service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.jeesite.modules.cms.entity.FileTemplete;
|
||||
import com.jeesite.modules.cms.entity.Site;
|
||||
import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
import com.jeesite.modules.cms.utils.FileTempleteUtils;
|
||||
import com.jeesite.modules.sys.entity.DictData;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模版文件Service
|
||||
@@ -23,7 +21,6 @@ import com.jeesite.modules.sys.entity.DictData;
|
||||
* @version 2020-7-7
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class FileTempleteService {
|
||||
|
||||
// public List<String> getTempleteContent(String prefix) throws IOException {
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class ReportService extends CrudService<ReportDao, Report> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Report report) {
|
||||
super.save(report);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Report report) {
|
||||
super.updateStatus(report);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Report report) {
|
||||
super.delete(report);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class SiteService extends CrudService<SiteDao, Site> {
|
||||
|
||||
/**
|
||||
@@ -49,7 +48,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Site site) {
|
||||
super.save(site);
|
||||
CmsUtils.removeCache("siteList");
|
||||
@@ -62,7 +61,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Site site) {
|
||||
super.updateStatus(site);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Site site) {
|
||||
super.delete(site);
|
||||
}
|
||||
@@ -82,7 +81,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
* @param isRe
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Site site, Boolean isRe) {
|
||||
site.setStatus(isRe != null && isRe ? Site.STATUS_NORMAL : Site.STATUS_DELETE);
|
||||
super.delete(site);
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.jeesite.modules.cms.entity.Tag;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TagService extends CrudService<TagDao, Tag> {
|
||||
|
||||
/**
|
||||
@@ -47,7 +46,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Tag tag) {
|
||||
super.save(tag);
|
||||
}
|
||||
@@ -57,7 +56,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Tag tag) {
|
||||
super.updateStatus(tag);
|
||||
}
|
||||
@@ -67,7 +66,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Tag tag) {
|
||||
super.delete(tag);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(VisitLog visitLog) {
|
||||
super.save(visitLog);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(VisitLog visitLog) {
|
||||
super.updateStatus(visitLog);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(VisitLog visitLog) {
|
||||
super.delete(visitLog);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user