package com.gxwebsoft.gxmu.module.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.gxwebsoft.gxmu.module.entity.ModuleRegistry; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.Collection; import java.util.List; /** * 模块注册表 Mapper * * @author Codex * @since 2026-11-10 */ public interface ModuleRegistryMapper extends BaseMapper { /** * 查询当前库中真实存在的表名,用于启动期校验注册表引用的业务表。 * * @param names 待校验的表名集合 * @return 存在的表名 */ @Select("") List selectExistingTableNames(@Param("names") Collection names); /** * 审批链配置里出现过的模块名,用于反向校验「有审批链但注册表没登记」的模块。 * *

只用于启动期告警,不阻断启动:存量脏数据不该挡住上线。 * * @return 审批链配置里的模块名(去重) */ @Select("SELECT DISTINCT module FROM gxmu_review_flow_config " + "WHERE deleted = 0 AND module IS NOT NULL AND module <> ''") List selectConfiguredModules(); }