<select id="selectSelective" resultMap="xxx" parameterType="xxx"> select <include refid="Base_Column_List"/> from xxx where del_flag=0 <choose> <when test="xxx !=null and xxx != ''"> and xxx like concat(concat('%', #{xxx}), '%') </when> <otherwise> and xxx like '**%' </otherwise> </choose> </select>
转载于:https://www.cnblogs.com/cai170221/p/9489279.html