|
@@ -2,15 +2,15 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
<mapper namespace="com.gitee.gen.mapper.DatasourceConfigMapper">
|
|
<mapper namespace="com.gitee.gen.mapper.DatasourceConfigMapper">
|
|
<resultMap id="BaseResultMap" type="com.gitee.gen.entity.DatasourceConfig">
|
|
<resultMap id="BaseResultMap" type="com.gitee.gen.entity.DatasourceConfig">
|
|
- <result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
- <result column="db_type" property="dbType" jdbcType="INTEGER" />
|
|
|
|
- <result column="driver_class" property="driverClass" jdbcType="VARCHAR" />
|
|
|
|
- <result column="db_name" property="dbName" jdbcType="VARCHAR" />
|
|
|
|
- <result column="host" property="host" jdbcType="VARCHAR" />
|
|
|
|
- <result column="port" property="port" jdbcType="INTEGER" />
|
|
|
|
- <result column="username" property="username" jdbcType="VARCHAR" />
|
|
|
|
- <result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
|
- <result column="is_deleted" property="isDeleted" jdbcType="INTEGER" />
|
|
|
|
|
|
+ <result column="id" property="id"/>
|
|
|
|
+ <result column="db_type" property="dbType"/>
|
|
|
|
+ <result column="driver_class" property="driverClass"/>
|
|
|
|
+ <result column="db_name" property="dbName"/>
|
|
|
|
+ <result column="host" property="host"/>
|
|
|
|
+ <result column="port" property="port"/>
|
|
|
|
+ <result column="username" property="username"/>
|
|
|
|
+ <result column="password" property="password"/>
|
|
|
|
+ <result column="is_deleted" property="isDeleted"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 表字段 -->
|
|
<!-- 表字段 -->
|
|
@@ -29,7 +29,7 @@
|
|
<!-- 查询全部 -->
|
|
<!-- 查询全部 -->
|
|
<select id="listAll" resultMap="BaseResultMap">
|
|
<select id="listAll" resultMap="BaseResultMap">
|
|
SELECT
|
|
SELECT
|
|
- <include refid="baseColumns" />
|
|
|
|
|
|
+ <include refid="baseColumns"/>
|
|
FROM datasource_config t
|
|
FROM datasource_config t
|
|
WHERE is_deleted=0
|
|
WHERE is_deleted=0
|
|
</select>
|
|
</select>
|
|
@@ -37,7 +37,7 @@
|
|
<!-- 根据主键获取单条记录 -->
|
|
<!-- 根据主键获取单条记录 -->
|
|
<select id="getById" resultMap="BaseResultMap" parameterType="Integer">
|
|
<select id="getById" resultMap="BaseResultMap" parameterType="Integer">
|
|
SELECT
|
|
SELECT
|
|
- <include refid="baseColumns" />
|
|
|
|
|
|
+ <include refid="baseColumns"/>
|
|
FROM datasource_config t
|
|
FROM datasource_config t
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</select>
|
|
</select>
|
|
@@ -102,28 +102,28 @@
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
- <if test="dbType != null" >
|
|
|
|
|
|
+ <if test="dbType != null">
|
|
#{dbType},
|
|
#{dbType},
|
|
</if>
|
|
</if>
|
|
- <if test="driverClass != null" >
|
|
|
|
|
|
+ <if test="driverClass != null">
|
|
#{driverClass},
|
|
#{driverClass},
|
|
</if>
|
|
</if>
|
|
- <if test="dbName != null" >
|
|
|
|
|
|
+ <if test="dbName != null">
|
|
#{dbName},
|
|
#{dbName},
|
|
</if>
|
|
</if>
|
|
- <if test="host != null" >
|
|
|
|
|
|
+ <if test="host != null">
|
|
#{host},
|
|
#{host},
|
|
</if>
|
|
</if>
|
|
- <if test="port != null" >
|
|
|
|
|
|
+ <if test="port != null">
|
|
#{port},
|
|
#{port},
|
|
</if>
|
|
</if>
|
|
- <if test="username != null" >
|
|
|
|
|
|
+ <if test="username != null">
|
|
#{username},
|
|
#{username},
|
|
</if>
|
|
</if>
|
|
- <if test="password != null" >
|
|
|
|
|
|
+ <if test="password != null">
|
|
#{password},
|
|
#{password},
|
|
</if>
|
|
</if>
|
|
- <if test="isDeleted != null" >
|
|
|
|
|
|
+ <if test="isDeleted != null">
|
|
#{isDeleted},
|
|
#{isDeleted},
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
@@ -150,28 +150,28 @@
|
|
<update id="updateIgnoreNull" parameterType="com.gitee.gen.entity.DatasourceConfig">
|
|
<update id="updateIgnoreNull" parameterType="com.gitee.gen.entity.DatasourceConfig">
|
|
UPDATE datasource_config
|
|
UPDATE datasource_config
|
|
<set>
|
|
<set>
|
|
- <if test="dbType != null" >
|
|
|
|
|
|
+ <if test="dbType != null">
|
|
db_type=#{dbType},
|
|
db_type=#{dbType},
|
|
</if>
|
|
</if>
|
|
- <if test="driverClass != null" >
|
|
|
|
|
|
+ <if test="driverClass != null">
|
|
driver_class=#{driverClass},
|
|
driver_class=#{driverClass},
|
|
</if>
|
|
</if>
|
|
- <if test="dbName != null" >
|
|
|
|
|
|
+ <if test="dbName != null">
|
|
db_name=#{dbName},
|
|
db_name=#{dbName},
|
|
</if>
|
|
</if>
|
|
- <if test="host != null" >
|
|
|
|
|
|
+ <if test="host != null">
|
|
host=#{host},
|
|
host=#{host},
|
|
</if>
|
|
</if>
|
|
- <if test="port != null" >
|
|
|
|
|
|
+ <if test="port != null">
|
|
port=#{port},
|
|
port=#{port},
|
|
</if>
|
|
</if>
|
|
- <if test="username != null" >
|
|
|
|
|
|
+ <if test="username != null">
|
|
username=#{username},
|
|
username=#{username},
|
|
</if>
|
|
</if>
|
|
- <if test="password != null" >
|
|
|
|
|
|
+ <if test="password != null">
|
|
password=#{password},
|
|
password=#{password},
|
|
</if>
|
|
</if>
|
|
- <if test="isDeleted != null" >
|
|
|
|
|
|
+ <if test="isDeleted != null">
|
|
is_deleted=#{isDeleted},
|
|
is_deleted=#{isDeleted},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|