|
|
@@ -25,6 +25,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.transaction.Transactional;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
@@ -67,6 +68,7 @@ public class UserController extends BaseController {
|
|
|
|
|
|
@PreAuthorize("hasAnyRole('ADMIN,ORGANIZER')")
|
|
|
@PostMapping("/save")
|
|
|
+// @Transactional
|
|
|
public User save(@RequestBody User user) {
|
|
|
if (user.getId() != null) {
|
|
|
User orig = userRepo.findById(user.getId()).orElseThrow(new BusinessException("无记录"));
|