|
|
|
|
<?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.techsor.datacenter.business.dao.ex.BasicCompanyMapperExt">
|
|
|
|
|
|
|
|
|
|
<select id="getSubCompanyByParentId" resultType="com.techsor.datacenter.business.model.BasicCompany" >
|
|
|
|
|
SELECT
|
|
|
|
|
bcom.id
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE bcom.flag != 1 and bcom.parent_id IN (${companyIds})
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getSelectList" resultType="com.techsor.datacenter.business.model.BasicCompany" >
|
|
|
|
|
SELECT
|
|
|
|
|
bcom.id,
|
|
|
|
|
bcom.company_name companyName
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE bcom.flag != 1 AND bcom.id IN (${companyIds})
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAllCompany" resultType="com.techsor.datacenter.business.model.BasicCompany" >
|
|
|
|
|
SELECT
|
|
|
|
|
bcom.id,
|
|
|
|
|
bcom.company_name companyName,
|
|
|
|
|
bcom.parent_id parentId
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE bcom.flag != 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="customSelectByParams" resultType="com.techsor.datacenter.business.model.BasicCompany" >
|
|
|
|
|
SELECT
|
|
|
|
|
id, parent_id, company_name, mfa_switch, flag
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE bcom.flag != 1
|
|
|
|
|
<if test="companyIdList != null and companyIdList.size() > 0">
|
|
|
|
|
AND bcom.id in
|
|
|
|
|
<foreach collection="companyIdList" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getApikeyInfo" resultType="com.techsor.datacenter.business.vo.company.ApikeyInfo" >
|
|
|
|
|
SELECT
|
|
|
|
|
id companyId,
|
|
|
|
|
aurora_url aurora_url,
|
|
|
|
|
aurora_username auroraUsername,
|
|
|
|
|
aurora_password auroraPassword
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE flag != 1
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
AND id = #{companyId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="apikey != null and apikey !='' ">
|
|
|
|
|
AND apikey = #{apikey}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getAuroraInfoByApikey" resultType="com.techsor.datacenter.business.vo.company.ApikeyInfo2" >
|
|
|
|
|
SELECT
|
|
|
|
|
id,
|
|
|
|
|
parent_id parentId,
|
|
|
|
|
aurora_url auroraUrl,
|
|
|
|
|
aurora_read_url auroraReadUrl,
|
|
|
|
|
aurora_username auroraUsername,
|
|
|
|
|
aurora_password auroraPassword
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE flag != 1
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
AND id = #{companyId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="apikey != null and apikey !='' ">
|
|
|
|
|
AND apikey = #{apikey}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getApikeyByCompanyId" resultType="com.techsor.datacenter.business.vo.company.ApikeyOnlyInfo" >
|
|
|
|
|
SELECT
|
|
|
|
|
id companyId,
|
|
|
|
|
apikey
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company bcom
|
|
|
|
|
WHERE flag != 1
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
AND id = #{companyId}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getBearerTokenByCompanyId" resultType="com.techsor.datacenter.business.vo.company.BearerTokenOnlyInfo" >
|
|
|
|
|
SELECT
|
|
|
|
|
id,
|
|
|
|
|
bearer_token bearerToken
|
|
|
|
|
FROM
|
|
|
|
|
data_center_aeon_admin.basic_company
|
|
|
|
|
WHERE flag != 1
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
AND id = #{companyId}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|