比如我有一个参数变量,假如用户录入的是1就按如下执行,否则就按另一个条件
如下语句,写在select 的语句中不行,要怎么改一下?谢谢
${if(${qy_type}==1,"l.amount1","l.amount1" * (cc.ratio/100))} as tt3,
目前通过日志去看语句,出来的还是这样
改成这样
${if(qy_type==1,"l.amount1","l.amount1 * (cc.ratio/100)")} as tt3,
if(${qy_type}==1,l.amount1,l.amount1 * (cc.ratio/100)) as tt3,