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

 

posted @ 2022-03-02 10:26  IT6889  阅读(446)  评论(0编辑  收藏  举报