| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?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.ufo.project.datasource.mapper.DataSourceConfigMapper">
-
- <resultMap type="DataSourceConfig" id="DataSourceConfigResult">
- <result property="id" column="id" />
- <result property="sourceName" column="source_name" />
- <result property="sourceAlias" column="source_alias" />
- <result property="sourceKey" column="source_key" />
- <result property="sourceType" column="source_type" />
- <result property="protocol" column="protocol" />
- <result property="supplierId" column="supplier_id" />
- <result property="protocolExtendedConfig" column="protocol_extended_config" />
- <result property="isSecure" column="is_secure" />
- <result property="secureConfig" column="secure_config" />
- <result property="maxConcurrency" column="max_concurrency" />
- <result property="receptionTime" column="reception_time" />
- <result property="dataActivePollInterval" column="data_active_poll_interval" />
- <result property="dataInactivityPollInterval" column="data_inactivity_poll_interval" />
- <result property="isDel" column="is_del" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="grabDays" column="grab_days" />
- <result property="topicName" column="topic_name" />
- </resultMap>
- <sql id="selectDataSourceConfigVo">
- select id, source_name, source_alias, source_key, source_type, protocol, supplier_id, protocol_extended_config, is_secure, secure_config, max_concurrency, reception_time, data_active_poll_interval, data_inactivity_poll_interval, is_del, create_by, create_time, update_by, update_time, grab_days, topic_name from data_source_config
- </sql>
- <select id="selectDataSourceConfigList" parameterType="DataSourceConfig" resultMap="DataSourceConfigResult">
- <include refid="selectDataSourceConfigVo"/>
- <where>
- <if test="sourceName != null and sourceName != ''"> and source_name like concat('%', #{sourceName}, '%')</if>
- <if test="sourceAlias != null and sourceAlias != ''"> and source_alias = #{sourceAlias}</if>
- <if test="sourceKey != null and sourceKey != ''"> and source_key = #{sourceKey}</if>
- <if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
- <if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
- <if test="supplierId != null "> and supplier_id = #{supplierId}</if>
- <if test="protocolExtendedConfig != null and protocolExtendedConfig != ''"> and protocol_extended_config = #{protocolExtendedConfig}</if>
- <if test="isSecure != null and isSecure != ''"> and is_secure = #{isSecure}</if>
- <if test="secureConfig != null and secureConfig != ''"> and secure_config = #{secureConfig}</if>
- <if test="maxConcurrency != null "> and max_concurrency = #{maxConcurrency}</if>
- <if test="receptionTime != null and receptionTime != ''"> and reception_time = #{receptionTime}</if>
- <if test="dataActivePollInterval != null "> and data_active_poll_interval = #{dataActivePollInterval}</if>
- <if test="dataInactivityPollInterval != null "> and data_inactivity_poll_interval = #{dataInactivityPollInterval}</if>
- <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
- <if test="grabDays != null "> and grab_days = #{grabDays}</if>
- <if test="topicName != null and topicName != ''"> and topic_name like concat('%', #{topicName}, '%')</if>
- </where>
- </select>
-
- <select id="selectDataSourceConfigById" parameterType="Long" resultMap="DataSourceConfigResult">
- <include refid="selectDataSourceConfigVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertDataSourceConfig" parameterType="DataSourceConfig" useGeneratedKeys="true" keyProperty="id">
- insert into data_source_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="sourceName != null and sourceName != ''">source_name,</if>
- <if test="sourceAlias != null and sourceAlias != ''">source_alias,</if>
- <if test="sourceKey != null and sourceKey != ''">source_key,</if>
- <if test="sourceType != null and sourceType != ''">source_type,</if>
- <if test="protocol != null and protocol != ''">protocol,</if>
- <if test="supplierId != null">supplier_id,</if>
- <if test="protocolExtendedConfig != null">protocol_extended_config,</if>
- <if test="isSecure != null and isSecure != ''">is_secure,</if>
- <if test="secureConfig != null">secure_config,</if>
- <if test="maxConcurrency != null">max_concurrency,</if>
- <if test="receptionTime != null">reception_time,</if>
- <if test="dataActivePollInterval != null">data_active_poll_interval,</if>
- <if test="dataInactivityPollInterval != null">data_inactivity_poll_interval,</if>
- <if test="isDel != null and isDel != ''">is_del,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null and updateBy != ''">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="grabDays != null">grab_days,</if>
- <if test="topicName != null">topic_name,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="sourceName != null and sourceName != ''">#{sourceName},</if>
- <if test="sourceAlias != null and sourceAlias != ''">#{sourceAlias},</if>
- <if test="sourceKey != null and sourceKey != ''">#{sourceKey},</if>
- <if test="sourceType != null and sourceType != ''">#{sourceType},</if>
- <if test="protocol != null and protocol != ''">#{protocol},</if>
- <if test="supplierId != null">#{supplierId},</if>
- <if test="protocolExtendedConfig != null">#{protocolExtendedConfig},</if>
- <if test="isSecure != null and isSecure != ''">#{isSecure},</if>
- <if test="secureConfig != null">#{secureConfig},</if>
- <if test="maxConcurrency != null">#{maxConcurrency},</if>
- <if test="receptionTime != null">#{receptionTime},</if>
- <if test="dataActivePollInterval != null">#{dataActivePollInterval},</if>
- <if test="dataInactivityPollInterval != null">#{dataInactivityPollInterval},</if>
- <if test="isDel != null and isDel != ''">#{isDel},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="grabDays != null">#{grabDays},</if>
- <if test="topicName != null">#{topicName},</if>
- </trim>
- </insert>
- <update id="updateDataSourceConfig" parameterType="DataSourceConfig">
- update data_source_config
- <trim prefix="SET" suffixOverrides=",">
- <if test="sourceName != null and sourceName != ''">source_name = #{sourceName},</if>
- <if test="sourceAlias != null and sourceAlias != ''">source_alias = #{sourceAlias},</if>
- <if test="sourceKey != null and sourceKey != ''">source_key = #{sourceKey},</if>
- <if test="sourceType != null and sourceType != ''">source_type = #{sourceType},</if>
- <if test="protocol != null and protocol != ''">protocol = #{protocol},</if>
- <if test="supplierId != null">supplier_id = #{supplierId},</if>
- <if test="protocolExtendedConfig != null">protocol_extended_config = #{protocolExtendedConfig},</if>
- <if test="isSecure != null and isSecure != ''">is_secure = #{isSecure},</if>
- <if test="secureConfig != null">secure_config = #{secureConfig},</if>
- <if test="maxConcurrency != null">max_concurrency = #{maxConcurrency},</if>
- <if test="receptionTime != null">reception_time = #{receptionTime},</if>
- <if test="dataActivePollInterval != null">data_active_poll_interval = #{dataActivePollInterval},</if>
- <if test="dataInactivityPollInterval != null">data_inactivity_poll_interval = #{dataInactivityPollInterval},</if>
- <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="grabDays != null">grab_days = #{grabDays},</if>
- <if test="topicName != null">topic_name = #{topicName},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteDataSourceConfigById" parameterType="Long">
- delete from data_source_config where id = #{id}
- </delete>
- <delete id="deleteDataSourceConfigByIds" parameterType="String">
- delete from data_source_config where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|