This commit is contained in:
2023-07-14 15:13:02 +08:00
parent cda84d8600
commit c5eb3c09d6
13 changed files with 40 additions and 41 deletions

View File

@ -3,9 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qiaoba.module.tenant.mapper.SysTenantDatasourceMapper">
<select id="selectTenantIds" resultType="string">
SELECT tenant_id FROM sys_tenant_datasource GROUP BY tenant_id
</select>
<update id="setBackupDatasourceExcludeId">
update sys_tenant_datasource set is_primary = #{code} where tenant_id = #{tenantId} and datasource_id != #{excludeId}
@ -14,4 +11,5 @@
<select id="selectByIp" resultType="com.qiaoba.api.tenant.entity.SysTenantDatasource">
select * from sys_tenant_datasource where ip = #{ip} and tenant_id = #{tenantId}
</select>
</mapper>