UcBatchSyncMapper.xml 1.71 KB
<?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.hotent.uds.dao.UcBatchSyncDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.uds.model.UcBatchSync">
        <id column="ID_" property="id" />
    <result column="EXECUTE_TIME_" property="executeTime" />
    <result column="DATA_IDS_" property="dataIds" />
    <result column="STATUS_" property="status" />
    <result column="CREATE_TIME_" property="createTime" />
    <result column="UPDATE_TIME_" property="updateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ID_, EXECUTE_TIME_, DATA_IDS_, STATUS_, CREATE_TIME_, UPDATE_TIME_
    </sql>

	<select id="selectPage" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			uc_batch_sync_
		${ew.customSqlSegment}
	</select>
	
	<select id="selectList" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			uc_batch_sync_
		${ew.customSqlSegment}
	</select>
	
	<select id="selectById" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			uc_batch_sync_
		where 
		    ID_ = #{id}
	</select>
    <select id="selectLast" resultType="com.hotent.uds.model.UcBatchSync">
		SELECT
			<include refid="Base_Column_List"/>
		FROM uc_batch_sync
		ORDER BY EXECUTE_TIME_ DESC LIMIT 1
	</select>
	<select id="selectLast" databaseId="oracle" resultType="com.hotent.uds.model.UcBatchSync">
		select * from (
			SELECT
			<include refid="Base_Column_List"/>
			FROM uc_batch_sync
			ORDER BY EXECUTE_TIME_ DESC
		) where rownum = 1
	</select>
</mapper>