<?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.diagbot.mapper.VersionInfoMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.diagbot.entity.VersionInfo">
        <id column="id" property="id" />
        <result column="is_deleted" property="isDeleted" />
        <result column="gmt_create" property="gmtCreate" />
        <result column="gmt_modified" property="gmtModified" />
        <result column="creator" property="creator" />
        <result column="modifier" property="modifier" />
        <result column="name" property="name" />
        <result column="refresh_time" property="refreshTime" />
        <result column="status" property="status" />
        <result column="remark" property="remark" />
    </resultMap>
    
 <select id="getVersionInfoAPage" resultType="com.diagbot.dto.VersionWrapperDTO">
	SELECT
	id as id,
	gmt_create as gmtCreate,
	modifier as modifierid,
	name as name,
	refresh_time as
	refreshTime,
	status as status,
	remark as remark
	FROM icss_version_info u
	WHERE u.is_deleted = 'N' AND u.status = 1
	<if test="versionWrapperNameVO.name != null">
		AND u.name LIKE CONCAT('%', #{versionWrapperNameVO.name}, '%')
	</if>
	ORDER BY gmt_create DESC
</select>
</mapper>
