Преглед на файлове

Update-function-find-by-id-tb-code

new-feature
Viet.LeQ2 преди 2 години
родител
ревизия
39615c8e0e
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. +1
    -1
      src/main/java/vn/azteam/tpf/repository/TBCodeRepository.java
  2. +1
    -1
      src/main/java/vn/azteam/tpf/service/impl/TBCodeServiceImpl.java

+ 1
- 1
src/main/java/vn/azteam/tpf/repository/TBCodeRepository.java Целия файл

@@ -13,5 +13,5 @@ public interface TBCodeRepository extends JpaRepository<TBCode, Long>, JpaSpecif


//@Query("select tb_crop from TBCrop tb_crop left join fetch tb_crop.tbDetailUsers where tb_crop.id =:id")
Optional<TBCode> findOneWithEagerRelationships(@Param("id") Long id);
Optional<TBCode> findById(Long id);
}

+ 1
- 1
src/main/java/vn/azteam/tpf/service/impl/TBCodeServiceImpl.java Целия файл

@@ -75,7 +75,7 @@ public class TBCodeServiceImpl implements TBCodeService {
@Transactional(readOnly = true)
public Optional<TBCodeDTO> findOne(Long id) {
log.debug("Request to get TBCode : {}", id);
return tbCodeRepository.findOneWithEagerRelationships(id)
return tbCodeRepository.findById(id)
.map(tBCodeMapper::toDto);
}


Loading…
Отказ
Запис