package com.ywt.domain.entity.center;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface OrderRepository extends JpaRepository<Order, Integer> {


    @Query(value = "select * from orders where business_id = ? and order_type = ? and deleted = 0 limit 1", nativeQuery = true)
    public Order findByBusinessId(int businessId, int type);


    @Query(value = "select * from orders where order_no = ? and deleted = 0 limit 1", nativeQuery = true)
    public Order findOrderByOrderNo(String orderNo);

}
