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

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

@ -15,6 +15,7 @@ import java.sql.Timestamp;
import java.util.List; import java.util.List;
@Service @Service
@Transactional
public class BanService { public class BanService {
@PersistenceContext @PersistenceContext
EntityManager entityManager; 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; import org.springframework.transaction.annotation.Transactional;
@Service @Service
@Transactional
public class DiscordAuthService { public class DiscordAuthService {
@PersistenceContext @PersistenceContext
EntityManager entityManager; EntityManager entityManager;

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

@ -18,6 +18,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Service @Service
@Transactional
public class FreeVIPService{ public class FreeVIPService{
@PersistenceContext @PersistenceContext
EntityManager entityManager; 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; import java.util.List;
@Service @Service
@Transactional
public class PermitionService { public class PermitionService {
@PersistenceContext @PersistenceContext
EntityManager entityManager; EntityManager entityManager;

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

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

Loading…
Cancel
Save