Commit 4a43ac5c by gonglei

加入框架代码

1 parent ac0adb52
...@@ -30,7 +30,7 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege ...@@ -30,7 +30,7 @@ public interface AuctionVehicleDao extends BaseRepository<AuctionVehicle, Intege
AuctionVehicle findTopByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId); AuctionVehicle findTopByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId);
@EntityGraph(attributePaths = {"auction"}) @EntityGraph(attributePaths = {"auction"})
List<AuctionVehicle> findByVehicle_VehicleIdOrderByAuctionStartTimeDesc(int vehicleId); List<AuctionVehicle> findByVehicle_VehicleIdOrderByAuctionStartTimeDescAuction_CreateTimeDesc(int vehicleId);
@EntityGraph(attributePaths = {"vehicle", "auction"}) @EntityGraph(attributePaths = {"vehicle", "auction"})
List<AuctionVehicle> findByAuction_AuctionIdOrderByAuctionStartTimeAsc(int auctionId); List<AuctionVehicle> findByAuction_AuctionIdOrderByAuctionStartTimeAsc(int auctionId);
......
...@@ -93,7 +93,7 @@ public class AuctionService extends AbstractAuctionService { ...@@ -93,7 +93,7 @@ public class AuctionService extends AbstractAuctionService {
} }
public List<AuctionVehicle> getAuctionVehiclesByVehicleId(int vehicleId) { public List<AuctionVehicle> getAuctionVehiclesByVehicleId(int vehicleId) {
return auctionVehicleDao.findByVehicle_VehicleIdOrderByAuctionStartTimeDesc(vehicleId); return auctionVehicleDao.findByVehicle_VehicleIdOrderByAuctionStartTimeDescAuction_CreateTimeDesc(vehicleId);
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!