You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
6.2 KiB

<?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="cc.hiver.mall.dao.mapper.ShopAreaMapper" >
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.ShopArea" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="del_flag" property="delFlag" jdbcType="INTEGER" />
<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="is_parent" property="isParent" jdbcType="BIT" />
<result column="parent_id" property="parentId" jdbcType="VARCHAR" />
<result column="sort_order" property="sortOrder" jdbcType="DECIMAL" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="is_canteen" property="isCanteen" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, create_by, create_time, del_flag, update_by, update_time, is_parent, parent_id,
sort_order, status, title, isCanteen
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_shop_area
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_shop_area
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.entity.ShopArea" >
insert into t_shop_area (id, create_by, create_time,
del_flag, update_by, update_time,
is_parent, parent_id, sort_order,
status, title,is_canteen)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{isParent,jdbcType=BIT}, #{parentId,jdbcType=VARCHAR}, #{sortOrder,jdbcType=DECIMAL},
#{status,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},#{isCanteen,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.ShopArea" >
insert into t_shop_area
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="createBy != null" >
create_by,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="delFlag != null" >
del_flag,
</if>
<if test="updateBy != null" >
update_by,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="isParent != null" >
is_parent,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="sortOrder != null" >
sort_order,
</if>
<if test="status != null" >
status,
</if>
<if test="title != null" >
title,
</if>
<if test="isCanteen != null" >
is_canteen,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="createBy != null" >
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null" >
#{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null" >
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isParent != null" >
#{isParent,jdbcType=BIT},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=VARCHAR},
</if>
<if test="sortOrder != null" >
#{sortOrder,jdbcType=DECIMAL},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="title != null" >
#{title,jdbcType=VARCHAR},
</if>
<if test="isCanteen != null" >
#{isCanteen,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.ShopArea" >
update t_shop_area
<set >
<if test="createBy != null" >
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null" >
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null" >
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isParent != null" >
is_parent = #{isParent,jdbcType=BIT},
</if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="sortOrder != null" >
sort_order = #{sortOrder,jdbcType=DECIMAL},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="title != null" >
title = #{title,jdbcType=VARCHAR},
</if>
<if test="isCanteen != null" >
is_canteen = #{isCanteen,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.ShopArea" >
update t_shop_area
set create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=INTEGER},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_parent = #{isParent,jdbcType=BIT},
parent_id = #{parentId,jdbcType=VARCHAR},
sort_order = #{sortOrder,jdbcType=DECIMAL},
status = #{status,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
is_canteen = #{isCanteen,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>