1. 程式人生 > >mybatics中【】mybatis的if判斷

mybatics中【】mybatis的if判斷

<if test="accountAdjustType == '2' " >
AND NOT EXISTS (
select 1 from fj_check_bill cb,fj_check c
where
cb.paymentId = fav.paymentId
and  cb.premiumFlag='1' 
and  cb.premiumVATFlag='1'
and c.validFlag='0'
and cb.checkBillNo = c.checkBillNo
)
</if>

<if test="accountAdjustType == '3' " >
AND NOT EXISTS (
select 1 from fj_settle_bill fsb,fj_settle s
where
fsb.paymentId = fav.paymentId
and  fsb.premiumFlag='1' 
and  fsb.premiumVATFlag='1'
and s.validFlag='0'
and fsb.settleNo = s.settleNo
)
</if>