mybatis sql中的标签
1. isEqual
select sum(cou) from ( select count(*) cou from TABLE_NAME_a T where 1=1 <isEqual property = "type" compareValue="xxx"> and T.aa_type = #{aaType} </isEqual>
union all
select count(*) cou from TABLE_NAME_b T where 1=1 <isEqual property = "type" compareValue="xxx"> and T.aa_type = #{aaType} </isEqual> )