no message
parent
afa8862849
commit
4e120390e2
|
|
@ -19,7 +19,7 @@ public class BatchCreateOrUpdate {
|
||||||
* @param entities 要插入的实体列表
|
* @param entities 要插入的实体列表
|
||||||
* @param <T> 实体类型
|
* @param <T> 实体类型
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public <T> void batchCreate(List<T> entities) {
|
public <T> void batchCreate(List<T> entities) {
|
||||||
int batchSize = 100;
|
int batchSize = 100;
|
||||||
if (entities == null || entities.isEmpty()) {
|
if (entities == null || entities.isEmpty()) {
|
||||||
|
|
@ -51,7 +51,7 @@ public class BatchCreateOrUpdate {
|
||||||
* @param entities 要更新的实体列表
|
* @param entities 要更新的实体列表
|
||||||
* @param <T> 实体类型
|
* @param <T> 实体类型
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public <T> void batchUpdate(List<T> entities) {
|
public <T> void batchUpdate(List<T> entities) {
|
||||||
int batchSize = 100;
|
int batchSize = 100;
|
||||||
if (entities == null || entities.isEmpty()) {
|
if (entities == null || entities.isEmpty()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue