package com.erp.audit.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.erp.audit.entity.SensitiveOperationRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 敏感操作规则Mapper
 */
@Mapper
public interface SensitiveOperationRuleRepository extends BaseMapper<SensitiveOperationRule> {

    /**
     * 查询启用的规则
     */
    List<SensitiveOperationRule> selectEnabledRules();

    /**
     * 根据URL模式查询匹配规则
     */
    List<SensitiveOperationRule> selectByUrlPattern(@Param("urlPattern") String urlPattern);

    /**
     * 查询某模块的规则
     */
    List<SensitiveOperationRule> selectByModule(@Param("module") String module);
}
