<?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.qmth.themis.business.dao.TBClientVersionMapper">

    <select id="clientVersionQuery" resultType="com.qmth.themis.business.entity.TBClientVersion">
        select * from t_b_client_version t
    </select>

    <select id="getMaxClientVersion" resultType="com.qmth.themis.business.entity.TBClientVersion">
        select
        t.*
        from
        t_b_client_version t
        <where>
            t.id =
            (select
            max(tbcv.id) as id
            from
            t_b_client_version tbcv
            <where>
             tbcv.enable = 1
            </where>
            )
        </where>
    </select>
</mapper>
