去掉类上的事务注解
This commit is contained in:
@@ -278,7 +278,7 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
.select2-container--default.select2-container--focus .select2-selection--single,
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#40a9ff!important;box-shadow:0 0 0 2px rgba(24,144,255,.2);}
|
||||
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color: #1f1f1f;color:#b3b3b3;}
|
||||
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {border-top-color:#3e3e3e;}
|
||||
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {border-color:#3e3e3e;}
|
||||
.table-striped>tbody>tr:nth-of-type(odd) {background-color:#262626;}
|
||||
.table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {background-color:#323232;}
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
* @version 2019-03-12
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
|
||||
@Autowired
|
||||
@@ -91,7 +90,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(MsgInner msgInner) {
|
||||
if (msgInner.getIsNewRecord()){
|
||||
User user = msgInner.getCurrentUser();
|
||||
@@ -216,7 +215,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
/**
|
||||
* 根据消息编号和接受者用户名读取内部消息
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void readMsgInnerRecord(MsgInner msgInner){
|
||||
MsgInnerRecord msgInnerRecord = new MsgInnerRecord();
|
||||
msgInnerRecord.setMsgInnerId(msgInner.getId());
|
||||
@@ -234,7 +233,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(MsgInner msgInner) {
|
||||
super.updateStatus(msgInner);
|
||||
}
|
||||
@@ -244,7 +243,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(MsgInner msgInner) {
|
||||
super.delete(msgInner);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.sys.utils.AreaUtils;
|
||||
* @author ThinkGem
|
||||
* @version 2014-8-19
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class AreaServiceSupport extends TreeService<AreaDao, Area>
|
||||
implements AreaService {
|
||||
|
||||
@@ -43,7 +42,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
|
||||
* 保存区划
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Area area) {
|
||||
super.save(area);
|
||||
AreaUtils.clearCache();
|
||||
@@ -53,7 +52,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
|
||||
* 删除区划
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Area area) {
|
||||
super.delete(area);
|
||||
AreaUtils.clearCache();
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.jeesite.modules.sys.utils.EmpUtils;
|
||||
* @author ThinkGem
|
||||
* @version 2016-4-23
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
implements CompanyService{
|
||||
|
||||
@@ -64,7 +63,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 保存公司
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Company company) {
|
||||
if (company.getIsNewRecord()){
|
||||
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
|
||||
@@ -95,7 +94,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 删除公司
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Company company) {
|
||||
super.delete(company);
|
||||
// 清理公司相关缓存
|
||||
@@ -106,7 +105,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 停用当前节点
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Company company) {
|
||||
dao.updateStatus(company);
|
||||
// 清理公司相关缓存
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.jeesite.modules.sys.utils.UserUtils;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
implements EmpUserService{
|
||||
|
||||
@@ -123,7 +122,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 保存用户员工
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(EmpUser user) {
|
||||
// 1、初始化用户信息
|
||||
if (user.getIsNewRecord()){
|
||||
@@ -170,7 +169,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* @param file 导入的用户数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||
if (file == null){
|
||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||
@@ -241,7 +240,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 更新状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(EmpUser empUser) {
|
||||
userService.updateStatus(empUser);
|
||||
employeeService.updateStatus(empUser.getEmployee());
|
||||
@@ -251,7 +250,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 删除用户
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(EmpUser empUser) {
|
||||
userService.delete(empUser);
|
||||
employeeService.delete(empUser.getEmployee());
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.jeesite.modules.sys.service.EmployeeService;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
implements EmployeeService{
|
||||
|
||||
@@ -64,7 +63,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
* 保存数据(插入或更新)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Employee employee) {
|
||||
if (employee.getIsNewRecord()){
|
||||
if (dao.get(employee) != null){
|
||||
@@ -88,7 +87,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
* 删除数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Employee employee) {
|
||||
super.delete(employee);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.jeesite.modules.sys.service.LogService;
|
||||
* @author ThinkGem
|
||||
* @version 2014-05-16
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class LogServiceSupport extends CrudService<LogDao, Log>
|
||||
implements LogService{
|
||||
|
||||
@@ -44,7 +43,7 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
|
||||
/**
|
||||
* 不使用数据库事务,执行插入日志
|
||||
*/
|
||||
@Transactional(readOnly=false)//, propagation=Propagation.NOT_SUPPORTED)
|
||||
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
||||
public void insertLog(Log entity) {
|
||||
DataSourceHolder.setJdbcTransaction(false);
|
||||
dao.insert(entity);
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.jeesite.modules.sys.utils.EmpUtils;
|
||||
* @author ThinkGem
|
||||
* @version 2016-4-23
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
implements OfficeService{
|
||||
|
||||
@@ -65,7 +64,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* 保存数据(插入或更新)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Office office) {
|
||||
if (office.getIsNewRecord()){
|
||||
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
|
||||
@@ -83,7 +82,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* @param file 导入的机构数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||
if (file == null){
|
||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||
@@ -145,7 +144,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* 更新部门状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Office office) {
|
||||
super.updateStatus(office);
|
||||
// 清理部门相关缓存
|
||||
@@ -156,7 +155,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* 删除数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Office office) {
|
||||
super.delete(office);
|
||||
// 清理部门相关缓存
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.jeesite.modules.sys.service.PostService;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@Transactional(readOnly=true)
|
||||
public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
implements PostService{
|
||||
|
||||
@@ -50,7 +49,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
* 保存岗位
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Post post) {
|
||||
super.save(post);
|
||||
}
|
||||
@@ -59,7 +58,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
* 更新岗位状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Post post) {
|
||||
super.updateStatus(post);
|
||||
}
|
||||
@@ -68,7 +67,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
* 删除岗位
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Post post) {
|
||||
super.delete(post);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ import ${packageName}.${moduleName}.dao${isNotEmpty(subModuleName)?'.'+subModule
|
||||
* @version ${functionVersion}
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Service<${ClassName}Dao, ${ClassName}> {
|
||||
<% for (child in table.childList){ %>
|
||||
|
||||
@@ -110,7 +109,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(${ClassName} ${className}) {
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
// 如果未设置状态,则指定状态为审核状态,以提交审核流程
|
||||
@@ -187,7 +186,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(${ClassName} ${className}) {
|
||||
super.updateStatus(${className});
|
||||
}
|
||||
@@ -197,7 +196,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(${ClassName} ${className}) {
|
||||
super.delete(${className});
|
||||
<% for (child in table.childList) { %>
|
||||
|
||||
@@ -45,7 +45,6 @@ import io.seata.spring.annotation.GlobalTransactional;
|
||||
*/
|
||||
@Service
|
||||
@RestController
|
||||
@Transactional(readOnly=true)
|
||||
public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Service<${ClassName}Dao, ${ClassName}>
|
||||
implements ${ClassName}ServiceApi {
|
||||
<% for (child in table.childList){ %>
|
||||
@@ -117,7 +116,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
*/
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(${ClassName} ${className}) {
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
// 如果未设置状态,则指定状态为审核状态,以提交审核流程
|
||||
@@ -195,7 +194,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
*/
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(${ClassName} ${className}) {
|
||||
super.updateStatus(${className});
|
||||
}
|
||||
@@ -206,7 +205,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
|
||||
*/
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(${ClassName} ${className}) {
|
||||
super.delete(${className});
|
||||
<% for (child in table.childList) { %>
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
<style>
|
||||
table.table td {width:30%;vertical-align:middle!important;}
|
||||
table.table th:first-child, table.table td:first-child {width:10%;}
|
||||
.skin-dark table.table {background-color:#101010!important;color:#8d8d8d!important;}
|
||||
</style>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
*/
|
||||
package com.jeesite.modules.test.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
@@ -20,6 +14,11 @@ import com.jeesite.modules.test.dao.TestDataChildDao;
|
||||
import com.jeesite.modules.test.dao.TestDataDao;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试数据Service
|
||||
@@ -27,7 +26,6 @@ import com.jeesite.modules.test.entity.TestDataChild;
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
|
||||
@Autowired
|
||||
@@ -85,7 +83,7 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(TestData testData) {
|
||||
super.save(testData);
|
||||
// 保存上传图片
|
||||
@@ -119,7 +117,7 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(TestData testData) {
|
||||
super.updateStatus(testData);
|
||||
}
|
||||
@@ -129,7 +127,7 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(TestData testData) {
|
||||
super.delete(testData);
|
||||
TestDataChild testDataChild = new TestDataChild();
|
||||
@@ -148,7 +146,7 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
/**
|
||||
* 事务测试,若 Child 报错,则回滚
|
||||
*/
|
||||
@Transactional(readOnly=false/*, propagation=Propagation.NOT_SUPPORTED*/)
|
||||
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
||||
public void transTest(TestData testData) {
|
||||
testData.setTestInput("transTest");
|
||||
testData.setTestTextarea(IdGen.randomBase62(5));
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.jeesite.modules.test.entity.TestTree;
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TestTreeService extends TreeService<TestTreeDao, TestTree> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class TestTreeService extends TreeService<TestTreeDao, TestTree> {
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(TestTree testTree) {
|
||||
super.save(testTree);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class TestTreeService extends TreeService<TestTreeDao, TestTree> {
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(TestTree testTree) {
|
||||
super.updateStatus(testTree);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class TestTreeService extends TreeService<TestTreeDao, TestTree> {
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(TestTree testTree) {
|
||||
super.delete(testTree);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user