<?xml version="1.0" encoding="UTF-8"?>
<sqls>
	
	
	<!-- 统计数据系统 -->
	<select id="dataSystemReport">
		SELECT
			count(*) value,
			dbtype name
		FROM
			t_core_datasystem
			GROUP BY dbtype
	</select>
	
	<!-- 统计敏感数据 -->
	<select id="sensitiveDataReport">
		SELECT
			count(*) value,
			regextype name
		FROM
			(
				SELECT
					*
				FROM
					t_core_sensitivecolumn t
				GROUP BY
					t.datasourceid,
					t.tschema,
					t.tablename
			) tt
		GROUP BY
			regextype
	</select>
	
	<!-- 数据生成规则 -->
	<select id="maskingRuleReport">
		SELECT
			count(*) value,
			rulegroupname name
		FROM
			t_core_masking_rule
		GROUP BY
			rulegroupname
	</select>
	
	<!-- 总脱敏时间（秒） -->
	<select id="maskingTotalTime">
		SELECT
			SUM(
				TIMESTAMPDIFF(
					SECOND,
					t.starttime,
					t.endtime
				)
			) totaltime
		FROM
			t_core_masking_detailrecord t;
	</select>
	
	<!-- 总脱敏行数 -->
	<select id="maskingTotalRow">
		SELECT
			SUM(successrow) totalrow
		FROM
			t_core_masking_detailrecord t;
	</select>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
</sqls>





