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>
)

浙公网安备 33010602011771号