package com.sw.mes.yb.plan.dao;


import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.plan.entity.WaterLineManageMedium;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


/**
* @author JS111801
* @description 针对表【water_line_manage_medium(水位拉动配置中间表)】的数据库操作Mapper
* @createDate 2023-09-13 10:44:57
* @Entity generator.domain.WaterLineManageMedium
*/
public interface WaterLineManageMediumDao extends BaseDao<WaterLineManageMedium,Long> {

    @Query(value = "SELECT * FROM water_line_manage_medium wlmm \n" +
                   "WHERE (wlmm.product_type = ?1 or ?1 is null)  AND (wlmm.conductive_type =?2 or ?2 is null)  AND (wlmm.specification = ?3 or ?3 is null ) AND (wlmm.dopant = ?4 or ?4 is null) AND (wlmm.side_length_range = ?5 or ?5 is null) AND (wlmm.yb_product_grade = ?6 or ?6 is null) AND (wlmm.resistance_level = ?7 or ?7 is null)", nativeQuery = true)
    List<WaterLineManageMedium> findByParams(String productType,String conductiveType,String specification,String dopant,String sideLengthRange,String ybProductGrade, String resistanceLevel);
}
