注意参数是实体 <!--更新--> <update id="updateOne" parameterType="com.entity.GovernmentDetail"> UPDATE GOVERNMENT_DETAIL <trim prefix="set" suffixOverrides=","> <if test="UNIT_TYPE!=null">unitType=#{unitType},</if> <if test="PLAT_CODE!=null">plateCode=#{plateCode},</if> <if test="DESCRIP!=null">descrip=#{descrip},</if> <if test="BUSINESS_GUID!=null">businessGuid=#{businessGuid},</if> <if test="HOT_LINE!=null">hotLine=#{hotLine},</if> <if test="LINE_ADRESS!=null">lineAdress=#{lineAdress},</if> <if test="EXTEND1!=null">extend1=#{extend1},</if> <if test="EXTEND2!=null">extend2=#{extend2},</if> </trim> WHERE ID=#{id} </update>
来源:CSDN
作者:一只程序汪~~汪汪
链接:https://blog.csdn.net/hyddhy/article/details/103730601