This commit is contained in:
2023-07-13 17:30:09 +08:00
parent 672f66b40e
commit 6ed1224410
373 changed files with 566 additions and 409 deletions

View File

@ -0,0 +1,17 @@
<?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.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}
</update>
<select id="selectByIp" resultType="com.qiaoba.api.tenant.entity.SysTenantDatasource">
select * from sys_tenant_datasource where ip = #{ip} and tenant_id = #{tenantId}
</select>
</mapper>