<?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="org.dromara.system.mapper.SysVerisonMapper">

    <select id="getList" resultType="org.dromara.system.domain.vo.SysVersionVo">

        SELECT *
        FROM sys_version v
        <where>
            <if test="query.versionName != null and query.versionName != ''">
                v.version_name LIKE CONCAT('%', #{query.versionName}, '%')
            </if>
            <if test="query.versionCode != null and query.versionCode != ''">
                AND v.version_code LIKE CONCAT('%', #{query.versionCode}, '%')
            </if>
            <if test="query.platformType != null and query.platformType != ''">
                AND v.platform_type LIKE CONCAT('%', #{query.platformType}, '%')
            </if>
            <if test="query.status != null">
                AND v.status = #{query.status}
            </if>
        </where>
        ORDER BY v.version_code asc

    </select>

</mapper>
