<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.zdsz.mapper.ZEnginMaterialQualityMapper">

    <resultMap type="com.ruoyi.zdsz.domain.ZEnginMaterialQuality" id="ZEnginMaterialQualityResult">
        <result property="id" column="id"/>
        <result property="enginType" column="engin_type"/>
        <result property="name" column="name"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>


    <select id="getEnginMaterialQualityList" resultType="com.ruoyi.zdsz.domain.vo.ZEnginMaterialQualityVo">
        select * from z_engin_material_quality zc
        <where>
            zc.del_flag = '0'
            <if test="enginType != null and enginType != ''">
                and zc.engin_type LIKE CONCAT('%',#{enginType},'%')
            </if>
            <if test="enginSort != null and enginSort != ''">
                and zc.engin_sort = #{enginSort}
            </if>
            <if test="enginNode != null and enginNode != ''">
                and zc.engin_node = #{enginNode}
            </if>
            <if test="enginStep != null and enginStep != ''">
                and zc.engin_step = #{enginStep}
            </if>
            <if test="nameType != null and nameType != ''">
                and zc.name_type = #{nameType}
            </if>
        </where>
        order by zc.create_time desc
    </select>

</mapper>
