updateByPrimaryKeySelective 根据pk 更新传递过来的不为null的 字段
<update id="updateByPrimaryKeySelective" parameterType="org.share.domain.tree.dao.Shop">
update shop
<set>
<if test="shopName != null">
shop_name = #{shopName,jdbcType=VARCHAR},
</if>
<if test="shopCode != null">
shop_code = #{shopCode,jdbcType=VARCHAR},
</if>
</set>
where shop_id = #{shopId,jdbcType=VARCHAR}
</update>
updateByPrimaryKey 根据pk 更新所有字段
<update id="updateByPrimaryKey" parameterType="org.share.domain.tree.dao.Shop">
update shop
set shop_name = #{shopName,jdbcType=VARCHAR},
shop_code = #{shopCode,jdbcType=VARCHAR},
shop_activity = #{shopActivity,jdbcType=VARCHAR},
where shop_id = #{shopId,jdbcType=VARCHAR}
</update>