已合并 PR 10141: 修复因为城市问题无法储存酒店订单

修复因为城市问题无法储存酒店订单
This commit is contained in:
卢麟哲 2024-03-21 09:34:21 +08:00
commit 8b03af182c
2 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import java.util.List;
import static com.chint.infrastructure.constant.CommonMessageConstant.NOT_FOUND;
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_AIRPLANE;
import static com.chint.infrastructure.constant.LocationConstant.LOCATION_TYPE_CITY;
@Repository
public class LocationRepositoryImpl implements LocationRepository {
@ -65,7 +66,7 @@ public class LocationRepositoryImpl implements LocationRepository {
@Override
public Location findByCityId(Long cityId) {
return jdbcLocationRepository.findByCityId(cityId);
return jdbcLocationRepository.findByCityIdAndLevel(cityId, LOCATION_TYPE_CITY);
}
@Override

View File

@ -16,7 +16,7 @@ public interface JdbcLocationRepository extends CrudRepository<Location, Long> {
Location findByLocationId(Long locationId);
Location findByCityId(Long cityId);
Location findByCityIdAndLevel(Long cityId, Integer level);
Location findByLocationShortName(String locationShortName);