@Select("select COALESCE(value,0) from project_measures where component_uuid = #{uuid} and metric_uuid = 'AYeNSwarTEppvP7II92z' limit 1")
@Select("select COALESCE(value,0) from project_measures where component_uuid = #{uuid} and metric_uuid = select uuid from metrics m where name='file_complexity' limit 1")
FloatgetComplexity(@Param("uuid")Stringuuid);
FloatgetComplexity(@Param("uuid")Stringuuid);
/**
/**
@ -30,17 +30,17 @@ public interface ProjectDao {
*@paramuuid
*@paramuuid
*@return
*@return
*/
*/
@Select("select COALESCE(value,0) from project_measures where component_uuid = #{uuid} and metric_uuid = 'AYeNSwakTEppvP7II92h' limit 1")
@Select("select COALESCE(value,0) from project_measures where component_uuid = #{uuid} and metric_uuid=(select uuid from metrics m where name='lines') limit 1")
IntegergetLines(@Param("uuid")Stringuuid);
IntegergetLines(@Param("uuid")Stringuuid);
/**
/**
*等级
*等级
*@paramuuid
*@paramuuid
*@parammetricUUid
*@parammetricName
*@return
*@return
*/
*/
@Select("select text_value from project_measures where component_uuid = #{uuid} and metric_uuid = #{metric_uuid} limit 1")
@Select("select text_value from project_measures where component_uuid = #{uuid} and metric_uuid=(select uuid from metrics m where name=#{metricName}}) limit 1")
@Select("SELECT count(*) FROM issues where project_uuid=#{uuid} and "+
@Select("SELECT count(*) FROM issues where project_uuid=#{uuid} and "+
"status='OPEN' and issue_type=#{issue_type} and severity=#{severity}")
"status='OPEN' and issue_type=#{issue_type} and severity=#{severity}")
@ -56,23 +56,23 @@ public interface ProjectDao {
*@return
*@return
*/
*/
@Select("select "+
@Select("select "+
"(select COALESCE(value,0) complexity from project_measures where component_uuid = #{projectUuid} and metric_uuid = 'AYeNSwarTEppvP7II92z' limit 1)," +
"(select COALESCE(value,0) complexity from project_measures where component_uuid = #{projectUuid} and metric_uuid = (select uuid from metrics m where name='file_complexity') limit 1)," +
"(select COALESCE(value,0) lines from project_measures where component_uuid = #{projectUuid} and metric_uuid = 'AYeNSwakTEppvP7II92h' limit 1)," +
"(select COALESCE(value,0) lines from project_measures where component_uuid = #{projectUuid} and metric_uuid = (select uuid from metrics m where name='lines') limit 1)," +
"(SELECT COALESCE(count(*),0) block_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) block_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) critical_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) critical_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) major_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) major_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) minor_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='MINOR'),"+
"(SELECT COALESCE(count(*),0) minor_code_smells FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=1 and severity='MINOR'),"+
"(select text_value code_smells from project_measures where component_uuid = #{projectUuid} and metric_uuid = 'AYeNSwaxTEppvP7II93y' limit 1)," +
"(select text_value code_smells from project_measures where component_uuid = #{projectUuid} and metric_uuid = (select uuid from metrics m where name='sqale_rating') limit 1)," +
"(SELECT COALESCE(count(*),0) block_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) block_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) critical_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) critical_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) major_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) major_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) minor_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='MINOR'),"+
"(SELECT COALESCE(count(*),0) minor_bugs FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=2 and severity='MINOR'),"+
"(select text_value bugs from project_measures where component_uuid = #{projectUuid} and metric_uuid = 'AYeNSwayTEppvP7II94B' limit 1)," +
"(select text_value bugs from project_measures where component_uuid = #{projectUuid} and metric_uuid = (select uuid from metrics m where name='security_review_rating') limit 1)," +
"(SELECT COALESCE(count(*),0) block_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) block_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='BLOCKER'), "+
"(SELECT COALESCE(count(*),0) critical_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) critical_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='CRITICAL'),"+
"(SELECT COALESCE(count(*),0) major_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) major_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='MAJOR'),"+
"(SELECT COALESCE(count(*),0) minor_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='MINOR'),"+
"(SELECT COALESCE(count(*),0) minor_violations FROM issues where project_uuid=#{projectUuid} and status='OPEN' and issue_type=3 and severity='MINOR'),"+
"(select text_value violations from project_measures where component_uuid = #{projectUuid} and metric_uuid = 'AYeNSwayTEppvP7II93_' limit 1)")
"(select text_value violations from project_measures where component_uuid = #{projectUuid} and metric_uuid = (select uuid from metrics m where name='security_rating') limit 1)")
@Select("select (select count(1) from issues where project_uuid=#{projectUuid} and issue_type=1) codeSmell,"+
@Select("select (select count(1) from issues where project_uuid=#{projectUuid} and issue_type=1) codeSmell,"+
"(select count(1) from issues where project_uuid=#{projectUuid} and issue_type=2) bugs,"+
"(select count(1) from issues where project_uuid=#{projectUuid} and issue_type=2) bugs,"+
"(select count(1) from issues where project_uuid=#{projectUuid} and issue_type=3) vulnerability,"+
"(select count(1) from issues where project_uuid=#{projectUuid} and issue_type=3) vulnerability,"+
"(select value from project_measures pm where component_uuid=#{projectUuid} and metric_id=3) codeLines")
"(select value from project_measures pm where component_uuid=#{projectUuid} and metric_uuid=(select uuid from metrics m where name='ncloc')) codeLines")
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'MINOR' and status='OPEN') minor,
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'MINOR' and status='OPEN') minor,
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'BLOCKER' and status='OPEN') blocker,
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'BLOCKER' and status='OPEN') blocker,
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'CRITICAL' and status='OPEN') critical,
(select count(1) from issues i where project_uuid =#{projectUuid} and issue_type=#{issueType} and severity = 'CRITICAL' and status='OPEN') critical,
(select text_value from project_measures i where component_uuid =#{projectUuid} and metric_uuid = #{metricUUid} limit 1) levelStr
(select text_value from project_measures i where component_uuid =#{projectUuid} and metric_uuid = (select uuid from metrics where name=#{metricName}) limit 1) levelStr