<?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 <> #{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>
|