package com.sifang.modules.customer.dao;

import com.sifang.modules.customer.entity.CustomerWarranty;
import com.sifang.modules.sys.common.persistence.BaseDao;
import com.sifang.modules.sys.common.persistence.Parameter;
import org.springframework.stereotype.Repository;

@Repository
public class CustomerWarrantyDao extends BaseDao<CustomerWarranty> {

    public CustomerWarranty getByCustomerId(String customerId) {
        CustomerWarranty warranty = getByHql("from CustomerWarranty where customerId =:p1", new Parameter(customerId));
        return warranty;
    }

    public CustomerWarranty getByOrderId(String orderId) {
        CustomerWarranty warranty = getByHql("from CustomerWarranty where orderId =:p1", new Parameter(orderId));
        return warranty;
    }


}
