https://juejin.cn/post/7028364501397274661
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.xxx.dao.mapper.ChannelAgentMapper">
<select id="select2" resultType="cn.xxx.dataobject.data.ChannelAgentAuditListData">
SELECT
*
from
channel_agent agent
<trim prefix="where" prefixOverrides="and|or">
<if test="query.channelAgentAuditType != null ">
<if test=" query.channelAgentAuditType == @cn.xxx.framework.plugin.enums.ChannelAgentAuditTypeEnum@CHANNEL_AGENT_ADD ">
and agent.add_audit_status in ( 10 )
</if>
</if>
</trim>
</select>
</mapper>
<select id="select1" resultType="java.lang.Object">
select * from
xxxxx
<trim prefixOverrides="and|or" prefix="where"