<?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.gyee.wisdom.alarm.sharding.mapper.TestingPointAIMapper">
    <select id="selectByStationAndModel" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.TestingPointAI"  >
        select * from testingpointai2 a
        <where>
            1=1
            <if test="station !=null and station !=''">
                and a.modelid  like  '%${station}%'
            </if>
            <if test="modelId !=null and modelId !=''">
                and a.model like '%${modelId}%'
            </if>
        </where>
    </select>
    <select id="selectByUniformCodeAndModel" parameterType="java.util.Map"
            resultType="com.gyee.wisdom.alarm.sharding.entity.TestingPointAI">
        select * from testingpointai2 a
        <where>
            1=1
            <if test="uniformcodeList  !=null and uniformcodeList.size > 0 ">
                and a.uniformcode in
                <foreach collection="uniformcodeList" item="uniformcode" index="index" open="(" close=")" separator=",">
                    #{uniformcode}
                </foreach>
            </if>
            <if test="modelId !=null and modelId !=''">
                and a.model=#{modelId}
            </if>
            <if test="stationSimpleName !=null and stationSimpleName !=''">
                and a.modelid  like  '%${stationSimpleName}'
            </if>
        </where>
    </select>
</mapper>
