mybatis动态SQL之update 去掉最后一个逗号trim方法
来源:互联网 发布:js小写转化为大写 编辑:程序博客网 时间:2024/06/13 19:20
<update id="updateOne" parameterType="com.inspur.search.data.EntityRelation">
UPDATE ENTITY_RELATION
<trim prefix="set" suffixOverrides=",">
<if test="srcId!=null">SRC_ID=#{srcId},</if>
<if test="srcType!=null">SRC_TYPE=#{srcType},</if>
<if test="destId!=null">DEST_ID=#{destId},</if>
<if test="destType!=null">DEST_TYPE=#{destType},</if>
<if test="relType!=null">REL_TYPE=#{relType},</if>
<if test="status!=null">STATUS=#{status},</if>
<if test="snId!=null">SN_ID=#{snId},</if>
</trim>
WHERE id=#{id}
</update>
UPDATE ENTITY_RELATION
<trim prefix="set" suffixOverrides=",">
<if test="srcId!=null">SRC_ID=#{srcId},</if>
<if test="srcType!=null">SRC_TYPE=#{srcType},</if>
<if test="destId!=null">DEST_ID=#{destId},</if>
<if test="destType!=null">DEST_TYPE=#{destType},</if>
<if test="relType!=null">REL_TYPE=#{relType},</if>
<if test="status!=null">STATUS=#{status},</if>
<if test="snId!=null">SN_ID=#{snId},</if>
</trim>
WHERE id=#{id}
</update>
阅读全文
0 0
- mybatis动态SQL之update 去掉最后一个逗号trim方法
- js去掉最后一个逗号
- js去掉最后一个逗号
- MyBatis解决Update动态SQL逗号的问题
- MyBatis 动态SQL trim
- Mybatis动态SQL trim
- js 去掉字符串最后一个逗号
- for循环去掉最后一个逗号
- js 去掉字符串最后一个逗号 “,”
- js 去掉字符串最后一个逗号
- MyBatis动态SQL之 set 和 trim标记的使用
- mybatis中动态sql标签之if trim
- MyBatis动态SQL之 set 和 trim标记的使用
- Mybatis 动态SQL之<trim>,<where>,<set>源码解析
- C# .Text.Trim('d');//去掉最后一个字符串
- java 拼接字符串时,去掉最后一个多余的逗号
- 去掉拼接字符串后的最后一个逗号
- 拼接字符串时,去掉最后一个多余的逗号
- 机械臂(4)--正向求解
- 公共CBB实现方案思考
- PHP7.0的新特性
- Python abc模块的几个小知识点
- centos安装tomcat7
- mybatis动态SQL之update 去掉最后一个逗号trim方法
- 近来的一些感悟
- 学习笔记TF035:实现基于LSTM语言模型
- linux常用的快捷键
- 算法学习笔记--7.digit-counts
- java打印出当前时间小例子
- 字符设备驱动框架2:设备文件(设备节点)如何和驱动建立联系-Linux字符设备中的两个重要结构体(file、inode)
- 网易2017秋招编程题集合
- maven 菜鸟级问题--连接不到中央库