<?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.energy.manage.service.mappers.windenginemill.WindEngineMillMapper">


    <select id="selectWindEngineMillCount" resultType="java.lang.Integer">
        select count(1)
        from
        wind_engine_mill wem
        where 1=1 and
        wem.combination IN
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>

    <select id="selectCurvedMotionTypeByEngineCode" resultType="java.lang.Integer">
        select
            distinct(wem.curved_motion_type)
        from
            wind_engine_mill wem
        left join
            wind_engine_group weg
        on
            wem.mill_type_code = weg.mill_type_code
        where
            weg.engine_code in
            <foreach collection="engineCodes" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
    </select>

</mapper>
