<if test="quoteFlag != null and quoteFlag !='' "> sql 语句 <if test="quoteFlag != null and quoteFlag =='2' "> sql 语句 <if test="quoteFlag != null and quoteFlag =='1' "> sql语句
执行过程中发现报错了,具体报错内容就不展示,总体原因是以上代码语法不正确导致的。下面展示错误代码
错误代码块
<when test="quoteFlag != null and quoteFlag == '1'"><include refid="Base_Column_List2"/>,rf.quoteCount
from (select <include refid="Base_Column_List1"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = r.LSRF_NO and r.COMPANY_CODE=#{companyCode}) as quoteCount
from lsp_rfx r where 1=1 AND r.COMPANY_CODE=#{companyCode}) rf where 1=1 and rf.quoteCount >'0'<include refid="findCondition2"/></when><when test="quoteFlag == ''"><include refid="Base_Column_List2"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = rf.LSRF_NO) as quoteCount
from lsp_rfx rf where 1=1<include refid="findCondition2"/></when><!--<when test="quoteFlag != null and quoteFlag == '0'">--><!--<include refid="Base_Column_List2"/>,rf.quoteCount--><!--from (select <include refid="Base_Column_List1"/>,--><!--(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = r.LSRF_NO and r.COMPANY_CODE = #{companyCode}) as quoteCount--><!--from lsp_rfx r where 1=1 and r.COMPANY_CODE = #{companyCode}) rf where 1=1 and rf.quoteCount='0'--><!--<include refid="findCondition2"/>--><!--</when>--></choose>
<when test='quoteFlag != null and quoteFlag == "1"'><include refid="Base_Column_List2"/>,rf.quoteCount
from (select <include refid="Base_Column_List1"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = r.LSRF_NO and r.COMPANY_CODE=#{companyCode}) as quoteCount
from lsp_rfx r where 1=1 AND r.COMPANY_CODE=#{companyCode}) rf where 1=1 and rf.quoteCount >'0'<include refid="findCondition2"/></when><when test='quoteFlag != null and quoteFlag == "2"'><include refid="Base_Column_List2"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = rf.LSRF_NO) as quoteCount
from lsp_rfx rf where 1=1<include refid="findCondition2"/></when></choose>
或者
<when test="quoteFlag != null and quoteFlag == '1'.toString() "><include refid="Base_Column_List2"/>,rf.quoteCount
from (select <include refid="Base_Column_List1"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = r.LSRF_NO and r.COMPANY_CODE=#{companyCode}) as quoteCount
from lsp_rfx r where 1=1 AND r.COMPANY_CODE=#{companyCode}) rf where 1=1 and rf.quoteCount >'0'<include refid="findCondition2"/></when><when test="quoteFlag != null and quoteFlag == '2'.toString() "><include refid="Base_Column_List2"/>,(select count(q.ID) from lsp_rfx_quote q where q.LSRQ_NO = rf.LSRF_NO) as quoteCount
from lsp_rfx rf where 1=1<include refid="findCondition2"/></when></choose>