UcBatchSyncMapper.xml
1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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>