ibatis 动态字段获取?挺奇怪的,,,,,
select sum(case conclusion when 'N' then 1 else 0 end) warning_count,warning_level,sum(case conclusion when 'Y' then 1 else 0 end) normal_count,(case warning_level when '1' then '提示' when '2' then '报警' when '3' then '严重' when '4' then '致命' else '' end) warn_name<isNotNull property="module_code"> ,module_name as module_name </isNotNull>from td_state_run t1,td_config_checkrule t2,td_module t3where t1.module_code = t2.module_codeand t1.checkrule_content = t2.checkrule_contentand t1.only_unit_code = t2.only_unit_code<isNotNull prepend="and" property="module_code">t1.module_code = t3.module_code and t1.module_code = #module_code#</isNotNull>group by warning_level<isNotNull property="module_code"> ,module_name </isNotNull>order by warning_level