fixed jpa method

This commit is contained in:
dashevchenko 2024-11-27 13:51:28 +02:00
parent a72753e86f
commit 82324ff3c6
2 changed files with 3 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public class JpaOAuth2ClientDao extends JpaAbstractDao<OAuth2ClientEntity, OAuth
@Override
public String findAppSecret(UUID id, String pkgName, PlatformType platformType) {
return repository.findAppSecret(id, pkgName, platformType.name());
return repository.findAppSecret(id, pkgName, platformType);
}
@Override

View File

@ -22,6 +22,7 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import org.thingsboard.server.common.data.oauth2.PlatformType;
import org.thingsboard.server.dao.model.sql.OAuth2ClientEntity;
import java.util.List;
@ -75,7 +76,7 @@ public interface OAuth2ClientRepository extends JpaRepository<OAuth2ClientEntity
"AND a.pkgName = :pkgName and a.platformType = :platformType")
String findAppSecret(@Param("clientId") UUID id,
@Param("pkgName") String pkgName,
@Param("platformType") String platformType);
@Param("platformType") PlatformType platformType);
@Transactional
@Modifying