表初始化mapper
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyOpenAreaInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.HyOpenAreaInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="area_name" jdbcType="VARCHAR" property="areaName" />
|
||||
<result column="area_path" jdbcType="VARCHAR" property="areaPath" />
|
||||
<result column="background_banner" jdbcType="VARCHAR" property="backgroundBanner" />
|
||||
<result column="detail_banner" jdbcType="VARCHAR" property="detailBanner" />
|
||||
<result column="area_status" jdbcType="VARCHAR" property="areaStatus" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
|
||||
deleted, create_time, update_time, update_user_id
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_open_area_info_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
area_name,
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
area_path,
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
background_banner,
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
detail_banner,
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
area_status,
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.parentId != null">
|
||||
#{record.parentId},
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
#{record.areaName},
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
#{record.areaPath},
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
#{record.backgroundBanner},
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
#{record.detailBanner},
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
#{record.areaStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
#{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
#{record.updateUserId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update hy_open_area_info_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId},
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
area_name = #{record.areaName},
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
area_path = #{record.areaPath},
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
background_banner = #{record.backgroundBanner},
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
detail_banner = #{record.detailBanner},
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
area_status = #{record.areaStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user