Bootstrap

mybatis中xml配置文件if判断语句中等于的条件怎么写

经常会用到在mybatis中使用

那么等于怎么写呢?

注意 要想使用 == 仅仅需要将双引号和单引号的位置换一下即可!!!

SELECT
			n.content 
		FROM
			`sys_post` p
			LEFT JOIN sys_post_norm n ON 
			<if test='checkType == "1" '>
				  n.id=p.f_norm_id 
			</if>
			<if test='checkType == "2" '>
				  n.id=p.s_norm_id
			</if>
			<if test='checkType == "3" '>
				  n.id=p.t_norm_id 
			</if>
		<where>
			<if test="postId !=null">
				and p.id = ${postId} 
			</if>
			AND p.del_flag = 0 
			AND n.del_flag = 0
		</where>
;