package com.usky.rule.mapper; import com.usky.common.mybatis.core.CrudMapper; import com.usky.rule.domain.RuleEngine; import com.usky.rule.vo.RuleEnginePageRequest; import org.apache.ibatis.annotations.Param; import java.util.List; public interface RuleEngineMapper extends CrudMapper { int deleteById(@Param("id") Long id); RuleEngine selectById(@Param("id") Long id, @Param("tenantId") Integer tenantId); int updateStatus(@Param("id") Long id, @Param("status") Integer status); /** 按项目启用规则,供 MQ 消费侧加载;tenantId 为空时不按租户过滤 */ List selectEnabledByProjectId(@Param("projectId") Long projectId, @Param("tenantId") Integer tenantId); /** 查询某空间下的直接子空间 id(用于在应用层递归求所有子孙 id,兼容 MySQL 5.7) */ List selectDirectChildrenSpaceIds(Long parentId); }