mysql中replace into用法
<insert id="saveOrUpdatePayinfo" parameterType="com.bill.invoice.entity.BusBillPayinfo"> replace into bus_bill_payinfo <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id!=null"> ID, </if> <if test="sysOrgCode!=null"> SYS_ORG_CODE, </if> <if test="billinfoid!=null"> BILLINFOID, </if> <if test="bankcode!=null"> BANKCODE, </if> <if test="billcode!=null"> BILLCODE, </if> <if test="trandamt!=null"> TRANDAMT, </if> <if test="tranddate!=null"> TRANDDATE, </if> <if test="returnamt!=null"> RETURNAMT, </if> <if test="returndate!=null"> RETURNDATE, </if> <if test="whendate!=null"> WHENDATE, </if> <if test="createBy!=null"> CREATE_BY, </if> <if test="createTime!=null"> CREATE_TIME, </if> <if test="updateBy!=null"> UPDATE_BY, </if> <if test="updateTime!=null"> UPDATE_TIME, </if> </trim> VALUES <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id!=null"> #{id}, </if> <if test="sysOrgCode!=null"> #{sysOrgCode}, </if> <if test="billinfoid!=null"> #{billinfoid}, </if> <if test="bankcode!=null"> #{bankcode}, </if> <if test="billcode!=null"> #{billcode}, </if> <if test="trandamt!=null"> #{trandamt}, </if> <if test="tranddate!=null"> #{tranddate}, </if> <if test="returnamt!=null"> #{returnamt}, </if> <if test="returndate!=null"> #{returndate}, </if> <if test="whendate!=null"> #{whendate}, </if> <if test="createBy!=null"> #{createBy}, </if> <if test="createTime!=null"> #{createTime}, </if> <if test="updateBy!=null"> #{updateBy}, </if> <if test="updateTime!=null"> #{updateTime}, </if> </trim> </insert>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· .NET Core 中如何实现缓存的预热?
· 三行代码完成国际化适配,妙~啊~
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?