From 8084bda3c0a84cc47079944216341e2db06eec0b Mon Sep 17 00:00:00 2001 From: lulz1 Date: Sat, 6 Apr 2024 13:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E5=86=8D=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=83=A8=E9=97=A8=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infrastructure/repository/JTCompanyRepositoryImpl.java | 6 +----- .../repository/jdbc/JdbcJTCompanyRepositoryImpl.java | 4 ++++ .../com/chint/interfaces/rest/user/UserHttpRequestImpl.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/chint/infrastructure/repository/JTCompanyRepositoryImpl.java b/src/main/java/com/chint/infrastructure/repository/JTCompanyRepositoryImpl.java index 6dcaa0fe..53952109 100644 --- a/src/main/java/com/chint/infrastructure/repository/JTCompanyRepositoryImpl.java +++ b/src/main/java/com/chint/infrastructure/repository/JTCompanyRepositoryImpl.java @@ -17,11 +17,7 @@ public class JTCompanyRepositoryImpl implements JTCompanyRepository { @Override public List findAll() { - List all = new ArrayList<>(); - jdbcJTCompanyRepository.findAll().forEach( - all::add - ); - return all; + return jdbcJTCompanyRepository.findBySystemCodeId(1L); } @Cacheable(value = "JTCompanyByCompanyCode" , key = "#companyCode") diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcJTCompanyRepositoryImpl.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcJTCompanyRepositoryImpl.java index 9e796893..47f0ca96 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcJTCompanyRepositoryImpl.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcJTCompanyRepositoryImpl.java @@ -4,9 +4,13 @@ import com.chint.domain.aggregates.system.CompanyBlackList; import com.chint.domain.aggregates.system.JTCompany; import org.springframework.data.repository.CrudRepository; +import java.util.List; + public interface JdbcJTCompanyRepositoryImpl extends CrudRepository { CompanyBlackList findByCompanyName(String companyName); JTCompany findByCompanyCode(String companyCode); + + List findBySystemCodeId(Long systemCodeId); } diff --git a/src/main/java/com/chint/interfaces/rest/user/UserHttpRequestImpl.java b/src/main/java/com/chint/interfaces/rest/user/UserHttpRequestImpl.java index 1a61eaf9..241ed3fe 100644 --- a/src/main/java/com/chint/interfaces/rest/user/UserHttpRequestImpl.java +++ b/src/main/java/com/chint/interfaces/rest/user/UserHttpRequestImpl.java @@ -67,7 +67,7 @@ public class UserHttpRequestImpl implements UserHttpRequest { @Override public User loadUserInfo(User user) { - loadSFInfo(user); + user = loadSFInfo(user); if (user == null) { return null; }