用传对象方式修改sql
sql
<update id="updateDate" resultType="com.entity.User"> update 表 set <if test ="id !=null and id !=' ' " > id =#{id} </if> <if test ="name!=null and name!=' ' " > , name =#{name} </if> <if test ="sex!=null and sex!=' ' " > , sex=#{sex} </if> where id = #{id} </update>
每天多努力一点,你将会变得更好。

浙公网安备 33010602011771号