Blame view

backend/sys/src/main/resources/mapper/SysDataSourceMapper.xml 1.9 KB
8d73e917   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.hotent.sys.persistence.dao.SysDataSourceDao">
	<resultMap id="SysDataSource" type="com.hotent.sys.persistence.model.SysDataSource">
		<id property="id" column="id_" jdbcType="VARCHAR"/>
		<result property="name" column="name_" jdbcType="VARCHAR"/>
		<result property="alias" column="alias_" jdbcType="VARCHAR"/>
		<result property="classPath" column="class_path_" jdbcType="VARCHAR"/>
		<result property="dbType" column="db_type_" jdbcType="VARCHAR"/>
		<result property="settingJson" column="setting_json_" jdbcType="LONGVARCHAR"/>
		<result property="initOnStart" column="init_on_start_" jdbcType="NUMERIC"/>
		<result property="enabled" column="enabled_" jdbcType="NUMERIC"/>
		<result property="initMethod" column="init_method_" jdbcType="VARCHAR"/>
		<result property="closeMethod" column="close_method_" jdbcType="VARCHAR"/>
		<result property="type" column="type_" jdbcType="NUMERIC"/>
		<result property="createBy" column="create_by_" jdbcType="VARCHAR"/>
		<result property="createTime" column="create_time_" jdbcType="TIMESTAMP"/>
		<result property="createOrgId" column="create_org_id_" jdbcType="VARCHAR"/>
		<result property="updateBy" column="update_by_" jdbcType="VARCHAR"/>
		<result property="updateTime" column="update_time_" jdbcType="TIMESTAMP"/>
		
	</resultMap>
	
	<select id="getByAlias" parameterType="java.lang.String" resultMap="SysDataSource">
		SELECT * FROM portal_sys_datasource 
		WHERE alias_=#{alias,jdbcType=VARCHAR}
	</select>
	
	<select id="getAliasByIds" parameterType="java.lang.String" resultType="java.lang.String">
		SELECT
			ALIAS_ 
		FROM
			portal_sys_datasource 
		WHERE
			ID_ IN 
		<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
              #{item}
        </foreach>
	</select>
</mapper>