|
@@ -109,6 +109,67 @@
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
+ <insert id="replaceInsertSelective" useGeneratedKeys="true" keyProperty="community.id">
|
|
|
+ REPLACE INTO sc_community
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="community.id!=null"> id,</if>
|
|
|
+ <if test="community.siteId!=null"> site_id,</if>
|
|
|
+ <if test="community.name!=null"> `name`,</if>
|
|
|
+ <if test="community.code!=null"> code,</if>
|
|
|
+ <if test="community.tenantId!=null"> tenant_id,</if>
|
|
|
+ <if test="community.province!=null"> province,</if>
|
|
|
+ <if test="community.city!=null"> city,</if>
|
|
|
+ <if test="community.region!=null"> region,</if>
|
|
|
+ <if test="community.longitude!=null"> longitude,</if>
|
|
|
+ <if test="community.latitude!=null"> latitude,</if>
|
|
|
+ <if test="community.districtId!=null"> district_id,</if>
|
|
|
+ <if test="community.address!=null"> address,</if>
|
|
|
+ <if test="community.remark!=null"> remark,</if>
|
|
|
+ <if test="community.status!=null"> `status`,</if>
|
|
|
+ <if test="community.dateCreate!=null"> date_create,</if>
|
|
|
+ <if test="community.dateUpdate!=null"> date_update,</if>
|
|
|
+ <if test="community.createBy!=null"> create_by,</if>
|
|
|
+ <if test="community.updateBy!=null"> update_by,</if>
|
|
|
+ </trim>
|
|
|
+ VALUES
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="community.id!=null">#{community.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.siteId!=null">#{community.siteId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.name!=null">#{community.name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="community.code!=null">#{community.code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="community.tenantId!=null">#{community.tenantId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.province!=null">#{community.province,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.city!=null">#{community.city,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.region!=null">#{community.region,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.longitude!=null"> #{community.longitude,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="community.latitude!=null"> #{community.latitude,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="community.districtId!=null">#{community.districtId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.address!=null">#{community.address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="community.remark!=null">#{community.remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="community.status!=null">#{community.status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="community.dateCreate!=null">#{community.dateCreate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="community.dateUpdate!=null">#{community.dateUpdate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="community.createBy!=null">#{community.createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="community.updateBy!=null">#{community.updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
<!--auto generated Code-->
|
|
|
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="community.id">
|
|
|
INSERT INTO sc_community
|
|
@@ -376,5 +437,9 @@
|
|
|
<if test="siteId != null"> and site_id = #{siteId} </if>
|
|
|
</select>
|
|
|
|
|
|
+ <delete id="deleteById">
|
|
|
+ DELETE FROM sc_community where ID = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
</mapper>
|
|
|
|