|
@@ -2,15 +2,15 @@
|
|
|
<!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">
|
|
|
<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>
|
|
|
|
|
|
<!-- 表字段 -->
|
|
@@ -29,7 +29,7 @@
|
|
|
<!-- 查询全部 -->
|
|
|
<select id="listAll" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="baseColumns" />
|
|
|
+ <include refid="baseColumns"/>
|
|
|
FROM datasource_config t
|
|
|
WHERE is_deleted=0
|
|
|
</select>
|
|
@@ -37,7 +37,7 @@
|
|
|
<!-- 根据主键获取单条记录 -->
|
|
|
<select id="getById" resultMap="BaseResultMap" parameterType="Integer">
|
|
|
SELECT
|
|
|
- <include refid="baseColumns" />
|
|
|
+ <include refid="baseColumns"/>
|
|
|
FROM datasource_config t
|
|
|
WHERE id = #{id}
|
|
|
</select>
|
|
@@ -102,28 +102,28 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="dbType != null" >
|
|
|
+ <if test="dbType != null">
|
|
|
#{dbType},
|
|
|
</if>
|
|
|
- <if test="driverClass != null" >
|
|
|
+ <if test="driverClass != null">
|
|
|
#{driverClass},
|
|
|
</if>
|
|
|
- <if test="dbName != null" >
|
|
|
+ <if test="dbName != null">
|
|
|
#{dbName},
|
|
|
</if>
|
|
|
- <if test="host != null" >
|
|
|
+ <if test="host != null">
|
|
|
#{host},
|
|
|
</if>
|
|
|
- <if test="port != null" >
|
|
|
+ <if test="port != null">
|
|
|
#{port},
|
|
|
</if>
|
|
|
- <if test="username != null" >
|
|
|
+ <if test="username != null">
|
|
|
#{username},
|
|
|
</if>
|
|
|
- <if test="password != null" >
|
|
|
+ <if test="password != null">
|
|
|
#{password},
|
|
|
</if>
|
|
|
- <if test="isDeleted != null" >
|
|
|
+ <if test="isDeleted != null">
|
|
|
#{isDeleted},
|
|
|
</if>
|
|
|
</trim>
|
|
@@ -150,28 +150,28 @@
|
|
|
<update id="updateIgnoreNull" parameterType="com.gitee.gen.entity.DatasourceConfig">
|
|
|
UPDATE datasource_config
|
|
|
<set>
|
|
|
- <if test="dbType != null" >
|
|
|
+ <if test="dbType != null">
|
|
|
db_type=#{dbType},
|
|
|
</if>
|
|
|
- <if test="driverClass != null" >
|
|
|
+ <if test="driverClass != null">
|
|
|
driver_class=#{driverClass},
|
|
|
</if>
|
|
|
- <if test="dbName != null" >
|
|
|
+ <if test="dbName != null">
|
|
|
db_name=#{dbName},
|
|
|
</if>
|
|
|
- <if test="host != null" >
|
|
|
+ <if test="host != null">
|
|
|
host=#{host},
|
|
|
</if>
|
|
|
- <if test="port != null" >
|
|
|
+ <if test="port != null">
|
|
|
port=#{port},
|
|
|
</if>
|
|
|
- <if test="username != null" >
|
|
|
+ <if test="username != null">
|
|
|
username=#{username},
|
|
|
</if>
|
|
|
- <if test="password != null" >
|
|
|
+ <if test="password != null">
|
|
|
password=#{password},
|
|
|
</if>
|
|
|
- <if test="isDeleted != null" >
|
|
|
+ <if test="isDeleted != null">
|
|
|
is_deleted=#{isDeleted},
|
|
|
</if>
|
|
|
</set>
|