@@ -16,4 +16,6 @@ public interface TenantInfoDao extends BaseMapper<TenantInfo> {
TenantProductSumm queryTenantInfoProductSumm(Integer tenantId);
TenantInfo getOpenTenant(Integer tenantId);
+
+ TenantInfo queryTenantInfoByOrgan(@Param("organId") Integer organId);
}
@@ -48,4 +48,6 @@ public interface TenantInfoService extends IService<TenantInfo> {
* @date 2022/1/7 14:42
*/
void saveTenantContextHolder(HttpServletRequest request);
+ TenantInfo queryTenantInfoByOrgan(Integer organId);
@@ -695,4 +695,9 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
+ @Override
+ public TenantInfo queryTenantInfoByOrgan(Integer organId) {
+ return baseMapper.queryTenantInfoByOrgan(organId);
+ }
@@ -108,5 +108,9 @@
<select id="getOpenTenant" resultType="com.ym.mec.biz.dal.entity.TenantInfo">
SELECT * FROM tenant_info WHERE id_ = #{tenantId} AND state_ = 1
</select>
+ <select id="queryTenantInfoByOrgan" resultType="com.ym.mec.biz.dal.entity.TenantInfo">
+ select * from tenant_info
+ where id_ = (select id_ from organization where tenant_id_ = #{tenantId})
+ </select>
</mapper>