2021
01-08
01-08
在mybatis中使用mapper进行if条件判断
目的:在使用mybatis框架中mapper文件有自动生成,但有时需要自己添加sql语句进行开发,当遇到需要使用if进行条件判断的时候该怎么写?查询sql语句如下:<selectid="queryData"parameterType="com.pojo.QueryDetailReq"resultType="com.pojo.MxDataInfo">select*fromdb_trd.tb_trd_secu_orderwhereorder_status=6<iftest="channelNo!=null">andchannel_no=#{channelNo,jdbcType=INTEGER}</if><iftest="r...
继续阅读 >