fix CustomerOrder find by order
This commit is contained in:
		@ -2,12 +2,8 @@ package org.hso.ecommerce.repos.shop;
 | 
			
		||||
 | 
			
		||||
import org.hso.ecommerce.entities.shop.CustomerOrder;
 | 
			
		||||
import org.springframework.data.jpa.repository.JpaRepository;
 | 
			
		||||
import org.springframework.data.jpa.repository.Modifying;
 | 
			
		||||
import org.springframework.data.jpa.repository.Query;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@ -19,7 +15,7 @@ public interface CustomerOrderRepository extends JpaRepository<CustomerOrder, Lo
 | 
			
		||||
            long articleId, java.sql.Timestamp begin, java.sql.Timestamp end
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    @Query("SELECT co FROM CustomerOrder co ORDER BY co.created DESC")
 | 
			
		||||
    @Query("SELECT co FROM CustomerOrder co ORDER BY co.id DESC")
 | 
			
		||||
    List<CustomerOrder> getAllOrders();
 | 
			
		||||
 | 
			
		||||
    @Query("SELECT co FROM CustomerOrder co WHERE co.customer.id = :userId ORDER BY co.id DESC")
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user