Mybatis 标签的使用问题
今天在使用Mybatis的时候发现前端传参’0’无效,无法更新字段,于是第一想到的就是百度解决,果然百度上已经有不少的案例了。
<update id="update">
update bl_type
<set>
<if test="typeName!=null and typeNmae!=''">
type_name = #{typeName},
</if>
<if test="typeBlogCount!=null and typeBlogCount!=''">
type_blog_count = #{typeBlogCount},
</if>
<if test="enable!=null">
enable = #{enable},
</if>