【fix bug】service默认加上@Transactional注解
This commit is contained in:
+3
@@ -4,6 +4,8 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
|
|||||||
import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
|
import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
|
||||||
import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -15,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
|
public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+3
@@ -4,6 +4,8 @@ import ${bussiPackage}.${entityPackage}.entity.${entityName};
|
|||||||
import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
|
import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
|
||||||
import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
@@ -14,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
|
public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
|
|||||||
Reference in New Issue
Block a user