注意参数是实体 <!--更新--> <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>
mybatis动态更新sql语句
最新推荐文章于 2024-08-10 15:28:25 发布