提交 | 用户 | 时间
|
1ac2bc
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
懒 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="cn.stylefeng.guns.db.mapper.DatabaseInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.base.db.entity.DatabaseInfo"> |
|
7 |
<id column="db_id" property="dbId" /> |
|
8 |
<result column="db_name" property="dbName" /> |
|
9 |
<result column="jdbc_driver" property="jdbcDriver" /> |
|
10 |
<result column="user_name" property="userName" /> |
|
11 |
<result column="password" property="password" /> |
|
12 |
<result column="jdbc_url" property="jdbcUrl" /> |
|
13 |
<result column="remarks" property="remarks" /> |
|
14 |
<result column="create_time" property="createTime" /> |
|
15 |
</resultMap> |
|
16 |
|
|
17 |
<!-- 通用查询结果列 --> |
|
18 |
<sql id="Base_Column_List"> |
|
19 |
db_id AS "dbId", db_name AS "dbName", jdbc_driver AS "jdbcDriver", user_name AS "userName", '***' AS "password", jdbc_url AS "jdbcUrl", remarks AS "remarks", create_time AS "createTime" |
|
20 |
</sql> |
|
21 |
|
|
22 |
<select id="customList" resultType="cn.stylefeng.guns.base.db.model.result.DatabaseInfoResult" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam"> |
|
23 |
select |
|
24 |
<include refid="Base_Column_List"/> |
|
25 |
from database_info where 1 = 1 |
|
26 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
27 |
and db_name like CONCAT('%',#{paramCondition.dbName},'%') |
|
28 |
</if> |
|
29 |
</select> |
|
30 |
|
|
31 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam"> |
|
32 |
select |
|
33 |
<include refid="Base_Column_List"/> |
|
34 |
from database_info where 1 = 1 |
|
35 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
36 |
and db_name like CONCAT('%',#{paramCondition.dbName},'%') |
|
37 |
</if> |
|
38 |
</select> |
|
39 |
|
|
40 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.db.model.result.DatabaseInfoResult" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam"> |
|
41 |
select |
|
42 |
<include refid="Base_Column_List"/> |
|
43 |
from database_info where 1 = 1 |
|
44 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
45 |
and db_name like CONCAT('%',#{paramCondition.dbName},'%') |
|
46 |
</if> |
|
47 |
</select> |
|
48 |
|
|
49 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.db.model.result.DatabaseInfoResult" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam" databaseId="pgsql"> |
|
50 |
select |
|
51 |
<include refid="Base_Column_List"/> |
|
52 |
from database_info where 1 = 1 |
|
53 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
54 |
and db_name like '%' || #{paramCondition.dbName} || '%' |
|
55 |
</if> |
|
56 |
</select> |
|
57 |
|
|
58 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.db.model.result.DatabaseInfoResult" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam" databaseId="oracle"> |
|
59 |
select |
|
60 |
<include refid="Base_Column_List"/> |
|
61 |
from database_info where 1 = 1 |
|
62 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
63 |
and db_name like '%' || #{paramCondition.dbName} || '%' |
|
64 |
</if> |
|
65 |
</select> |
|
66 |
|
|
67 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.db.model.params.DatabaseInfoParam"> |
|
68 |
select |
|
69 |
<include refid="Base_Column_List"/> |
|
70 |
from database_info where 1 = 1 |
|
71 |
<if test="paramCondition.dbName != null and paramCondition.dbName != ''"> |
|
72 |
and db_name like CONCAT('%',#{paramCondition.dbName},'%') |
|
73 |
</if> |
|
74 |
</select> |
|
75 |
|
|
76 |
</mapper> |