mybatis trim的使用方法

来源:互联网 发布:最优化理论就业 编辑:程序博客网 时间:2024/06/04 00:32
<insert id="insertSelective" parameterType="com.ahbr.wjcj.shipping.bean.DrawingApply" >
    insert into wjcj_drawing_apply
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="cjjmc != null" >
        cjjmc,
      </if>
      <if test="sqbh != null" >
        sqbh,
      </if>
      <if test="tzmc != null" >
        tzmc,
      </if>
      <if test="tzh != null" >
        tzh,
      </if>
      <if test="cbzl != null" >

        cbzl,

   </trim>

mybtis的trim可以用于去除一些多余的( 、)以及   ,


0 0
原创粉丝点击