mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +08:00
添加事务注解
This commit is contained in:
@@ -4,7 +4,6 @@ import java.time.LocalDateTime;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.xboe.data.service.impl;
|
||||
|
||||
import javax.persistence.Transient;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -31,7 +31,7 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService{
|
||||
TeacherDao teacherDao;
|
||||
|
||||
@Override
|
||||
@Transient
|
||||
@Transactional
|
||||
public void syncUserFull(Account a, User u, Organization org) {
|
||||
accountDao.saveOrUpdate(a);
|
||||
userDao.saveOrUpdate(u);
|
||||
|
||||
Reference in New Issue
Block a user