<update id="updateByPrimaryKeySelective" parameterType="org.wcy.gen.model.College" >
update college
<set >
<if test="collegename != null" >
collegeName = #{collegename,jdbcType=VARCHAR},
</if>
</set>
where collegeID = #{collegeid,jdbcType=INTEGER}
</update>
update时set和if的用法 每个修改都加逗号 set能够智能的去掉最后一个逗号
参考:https://blog.csdn.net/qq_39940205/article/details/79517742