Browse Source

не ну я дурачек конечно, надо не забыть что транзакции методов должны и вклассе быть это ведь не репозитарий

master
gsd 2 years ago
parent
commit
54ba4ef73a
  1. 2
      src/main/java/app/entities/a2s/external/ExternalValveClient.java
  2. 1
      src/main/java/app/services/db/BanService.java
  3. 1
      src/main/java/app/services/db/DiscordAuthService.java
  4. 3
      src/main/java/app/services/db/FreeVIPService.java
  5. 1
      src/main/java/app/services/db/PermitionService.java
  6. 2
      src/main/java/app/services/db/UsertimeService.java

2
src/main/java/app/entities/a2s/external/ExternalValveClient.java

@ -62,7 +62,7 @@ public abstract class ExternalValveClient {
try {
return new ArrayList<>(Arrays.asList(restTemplate.postForEntity("%s/api/players".formatted(gateway), request, RCONPlayer[].class).getBody()));
} catch (Exception err) {
err.printStackTrace();
System.out.printf("Cannot get rcon players from %s", request.getServer());
return new ArrayList<>();
}
}

1
src/main/java/app/services/db/BanService.java

@ -15,6 +15,7 @@ import java.sql.Timestamp;
import java.util.List;
@Service
@Transactional
public class BanService {
@PersistenceContext
EntityManager entityManager;

1
src/main/java/app/services/db/DiscordAuthService.java

@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class DiscordAuthService {
@PersistenceContext
EntityManager entityManager;

3
src/main/java/app/services/db/FreeVIPService.java

@ -18,7 +18,8 @@ import java.util.List;
import java.util.Map;
@Service
public class FreeVIPService {
@Transactional
public class FreeVIPService{
@PersistenceContext
EntityManager entityManager;

1
src/main/java/app/services/db/PermitionService.java

@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class PermitionService {
@PersistenceContext
EntityManager entityManager;

2
src/main/java/app/services/db/UsertimeService.java

@ -8,12 +8,14 @@ import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
@Service
@Transactional
public class UsertimeService {
@PersistenceContext

Loading…
Cancel
Save