标签:test 自己 type col 内容 mode time null param
trim元素的主要功能是可以在自己包含的内容前加上某些前缀,也可以在其后加上某些后缀,与之对应的属性是prefix和suffix;可以把包含内容的首部某些内容覆盖,即忽略,也可以把尾部的某些内容覆盖,对应的属性是prefixOverrides和suffixOverrides;
<insert id="operatorLog" parameterType="com.oa.model.wxlog.WxLog"> INSERT INTO sdb_oa_operator_log <trim prefix="(" suffix=")" suffixOverrides="," > <if test="open_id!=‘‘ and open_id != null"> open_id, </if> <if test="operatortime!=‘‘ and operatortime != null"> operatortime, </if> <if test="operatortype!=‘‘ and operatortype != null"> operatortype, </if> <if test="operatorcont!=‘‘ and operatorcont != null"> operatorcont, </if> <if test="ip!=‘‘ and ip != null"> ip, </if> </trim> <trim prefix="values(" suffix=")" suffixOverrides="," > <if test="open_id!=‘‘ and open_id != null"> #{open_id}, </if> <if test="operatortime!=‘‘ and operatortime != null"> #{operatortime}, </if> <if test="operatortype!=‘‘ and operatortype != null"> #{operatortype}, </if> <if test="operatorcont!=‘‘ and operatorcont != null"> #{operatorcont}, </if> <if test="ip!=‘‘ and ip != null"> #{ip}, </if> </trim> </insert>
标签:test 自己 type col 内容 mode time null param
原文地址:https://www.cnblogs.com/iscys/p/9550222.html