<?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.liquidnet.service.kylin.mapper.KylinZhengzaiAppVersionsMapper">
    <select id="searchList" parameterType="java.util.Map" resultType="com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao">
        SELECT *
        FROM kylin_zhengzai_app_versions
        <where>
            is_deleted = 1
            <if test="type != ''">
                AND type = ${type}
            </if>
            <if test="appType != ''">
                AND app_type = ${appType}
            </if>
        </where>
        ORDER BY mid DESC
    </select>
    <select id="getLastInfo" resultType="com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao">
        SELECT *
        FROM kylin_zhengzai_app_versions
        <where>
            is_deleted = 1
            <if test="type != ''">
                AND type = ${type}
            </if>
            AND app_type = 1
        </where>
        ORDER BY mid DESC
        LIMIT 1
    </select>
    <select id="getLastInfoCheck" resultType="com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao">
        SELECT *
        FROM kylin_zhengzai_app_versions
        <where>
            is_deleted = 1
            <if test="type != ''">
                AND type = ${type}
            </if>
            AND app_type = 2
        </where>
        ORDER BY mid DESC
        LIMIT 1
    </select>

</mapper>