60 lines
3.2 KiB
XML
60 lines
3.2 KiB
XML
<?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.cool.store.mapper.EnterpriseConfigMapper">
|
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseConfigDO">
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
<result column="current_package" jdbcType="BIGINT" property="currentPackage"/>
|
|
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
|
|
<result column="staff_count" jdbcType="INTEGER" property="staffCount"/>
|
|
<result column="db_source_name" jdbcType="VARCHAR" property="dbSourceName"/>
|
|
<result column="db_server" jdbcType="VARCHAR" property="dbServer"/>
|
|
<result column="db_port" jdbcType="INTEGER" property="dbPort"/>
|
|
<result column="db_name" jdbcType="VARCHAR" property="dbName"/>
|
|
<result column="db_user" jdbcType="VARCHAR" property="dbUser"/>
|
|
<result column="db_pwd" jdbcType="VARCHAR" property="dbPwd"/>
|
|
<result column="license" jdbcType="VARCHAR" property="license"/>
|
|
<result column="license_expires" jdbcType="TIMESTAMP" property="licenseExpires"/>
|
|
<result column="license_type" jdbcType="INTEGER" property="licenseType"/>
|
|
<result column="ding_corp_id" jdbcType="VARCHAR" property="dingCorpId"/>
|
|
<result column="ding_corp_secret" jdbcType="VARCHAR" property="dingCorpSecret"/>
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="create_user" jdbcType="VARCHAR" property="createUser"/>
|
|
<result column="main_corp_id" jdbcType="VARCHAR" property="mainCorpId"/>
|
|
<result column="app_type" jdbcType="VARCHAR" property="appType"/>
|
|
<result column="permanent_code" jdbcType="VARCHAR" property="permanentCode"/>
|
|
<result column="agentid" jdbcType="VARCHAR" property="agentid"/>
|
|
<result column="cool_college_enterprise_id" jdbcType="VARCHAR" property="coolCollegeEnterpriseId"/>
|
|
<result column="cool_college_secret" jdbcType="VARCHAR" property="coolCollegeSecret"/>
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, current_package, enterprise_id, staff_count, db_source_name, db_server, db_port,
|
|
db_name, db_user, db_pwd, license, license_expires, license_type, ding_corp_id, ding_corp_secret,
|
|
create_time, create_user, main_corp_id, app_type, permanent_code, agentid, cool_college_enterprise_id,
|
|
cool_college_secret
|
|
</sql>
|
|
|
|
<select id="selectByEnterpriseId" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
from
|
|
enterprise_config
|
|
where
|
|
enterprise_id = #{enterpriseId}
|
|
</select>
|
|
|
|
<select id="getDistinctDbServer" resultMap="BaseResultMap">
|
|
select
|
|
distinct db_server, db_port, db_user, db_pwd
|
|
from
|
|
enterprise_config
|
|
</select>
|
|
|
|
<select id="getDbInfoByDbName" resultMap="BaseResultMap">
|
|
select
|
|
db_server, db_port, db_user, db_pwd
|
|
from
|
|
enterprise_config
|
|
where
|
|
db_name = #{dbName} limit 1
|
|
</select>
|
|
</mapper> |