67,550
社区成员




select id,name,account, case sex when 1 then '男' else '女' end as sex
from user a where 1=1
<if test="account!=null">
and a.account=#{account}
</if>
<if test="name!=null">
and a.name like '%#{name}%'
</if>
select id,name,account, case sex when 1 then '男' else '女' end as sex
from user a where 1=1
and a.account='zhangsan'
有解决方案了吗?我也有这样的需求