mybastis我可以在select 的时候加上if 判断吗例如:select age,name, if xx=1 sex=男 if xx=2 sex=女 from dual ,xx是个参数,是根据前端选择的值来确定的
是在xml文件里面写
<if test="status != null and status != ''"> AND status = #{status} </if>
这种的