fix:高德打车正式环境配置

This commit is contained in:
lulz1 2024-06-01 08:49:06 +08:00
parent a674b0e571
commit 833f0875c3
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import com.chint.domain.aggregates.user.UserName;
import com.chint.domain.repository.UserNameRepository; import com.chint.domain.repository.UserNameRepository;
import com.chint.infrastructure.repository.jdbc.JdbcUserNameRepository; import com.chint.infrastructure.repository.jdbc.JdbcUserNameRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Optional; import java.util.Optional;
@ -13,6 +14,8 @@ import java.util.Optional;
public class UserNameRepositoryImpl implements UserNameRepository { public class UserNameRepositoryImpl implements UserNameRepository {
@Autowired @Autowired
private JdbcUserNameRepository jdbcUserNameRepository; private JdbcUserNameRepository jdbcUserNameRepository;
@Cacheable(value = "user::name", key = "#employeeNo")
@Override @Override
public Optional<UserName> findByEmployeeNo(String employeeNo) { public Optional<UserName> findByEmployeeNo(String employeeNo) {
return jdbcUserNameRepository.findByEmployeeNo(employeeNo); return jdbcUserNameRepository.findByEmployeeNo(employeeNo);