jinlin
2023-11-03 35435e8b1995e6775c82b86652381e07e3faff54
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
<?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.zt.life.sync.dao.SyncConfigTableDao">
 
    <select id="getList" resultType="com.zt.life.sync.model.SyncConfigTables">
        select a.*
        from SYS_SYNC_CONFIG_TABLES a
        <where>
            <if test="whereSql!=null">
                ${whereSql}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
    <select id="getDataList" resultType="com.zt.life.sync.model.SyncConfigTables">
        select a.*
        from SYS_SYNC_CONFIG_TABLES a
        <if test="id!=null and id!=0">
            <where>
                sync_config_id = #{id}
            </where>
        </if>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
 
    <select id="getNoList" resultType="string">
        SELECT a.table_name FROM SYS_SYNC_CONFIG_TABLES a
        WHERE 1=1
        <if test="id!=null and id!=0">
            and sync_config_id &lt;&gt; #{id}
        </if>
        and a.sync_config_id IN(
        SELECT id FROM SYS_SYNC_CONFIG
        WHERE src = #{src} AND dst = #{dst}
        )
    </select>
 
 
    <select id="getConfigIds" resultType="com.zt.life.sync.model.SyncConfigTables">
        select a.*
        from SYS_SYNC_CONFIG_TABLES a
        where is_delete = 0 and a.sync_config_id in
        <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
            #{id}
        </foreach>
 
    </select>
</mapper>