|
|
|
@ -9,13 +9,14 @@ |
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
|
<result column="sex" jdbcType="VARCHAR" property="sex" /> |
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|
|
|
<result column="address" jdbcType="VARCHAR" property="address" /> |
|
|
|
<result column="password" jdbcType="VARCHAR" property="password" /> |
|
|
|
<result column="province" jdbcType="VARCHAR" property="province" /> |
|
|
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
|
|
|
<result column="area" jdbcType="VARCHAR" property="area" /> |
|
|
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
|
|
|
<result column="user_id" jdbcType="VARCHAR" property="userId" /> |
|
|
|
</resultMap> |
|
|
|
<sql id="Example_Where_Clause"> |
|
|
|
<where> |
|
|
|
@ -76,8 +77,8 @@ |
|
|
|
</where> |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, create_by, create_time, del_flag, update_by, update_time, name, phone, address, |
|
|
|
password, province, city, area, shop_id |
|
|
|
id, create_by, create_time, del_flag, update_by, update_time, name, sex, phone, address, |
|
|
|
province, city, area, shop_id, user_id |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="cc.hiver.mall.entity.CustomerExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
@ -112,14 +113,14 @@ |
|
|
|
<insert id="insert" parameterType="cc.hiver.mall.entity.Customer"> |
|
|
|
insert into t_customer (id, create_by, create_time, |
|
|
|
del_flag, update_by, update_time, |
|
|
|
name, phone, address, |
|
|
|
password, province, city, |
|
|
|
area, shop_id) |
|
|
|
name, sex, phone, address, |
|
|
|
province, city, area, |
|
|
|
shop_id, user_id) |
|
|
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|
|
|
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
#{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, |
|
|
|
#{password,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, |
|
|
|
#{area,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}) |
|
|
|
#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, |
|
|
|
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, |
|
|
|
#{shopId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.Customer"> |
|
|
|
insert into t_customer |
|
|
|
@ -145,15 +146,15 @@ |
|
|
|
<if test="name != null"> |
|
|
|
name, |
|
|
|
</if> |
|
|
|
<if test="sex != null"> |
|
|
|
sex, |
|
|
|
</if> |
|
|
|
<if test="phone != null"> |
|
|
|
phone, |
|
|
|
</if> |
|
|
|
<if test="address != null"> |
|
|
|
address, |
|
|
|
</if> |
|
|
|
<if test="password != null"> |
|
|
|
password, |
|
|
|
</if> |
|
|
|
<if test="province != null"> |
|
|
|
province, |
|
|
|
</if> |
|
|
|
@ -166,6 +167,9 @@ |
|
|
|
<if test="shopId != null"> |
|
|
|
shop_id, |
|
|
|
</if> |
|
|
|
<if test="userId != null"> |
|
|
|
user_id, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null"> |
|
|
|
@ -189,15 +193,15 @@ |
|
|
|
<if test="name != null"> |
|
|
|
#{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="sex != null"> |
|
|
|
#{sex,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="phone != null"> |
|
|
|
#{phone,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="address != null"> |
|
|
|
#{address,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="password != null"> |
|
|
|
#{password,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="province != null"> |
|
|
|
#{province,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
@ -210,6 +214,9 @@ |
|
|
|
<if test="shopId != null"> |
|
|
|
#{shopId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="userId != null"> |
|
|
|
#{userId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<select id="countByExample" parameterType="cc.hiver.mall.entity.CustomerExample" resultType="java.lang.Long"> |
|
|
|
@ -242,15 +249,15 @@ |
|
|
|
<if test="record.name != null"> |
|
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.sex != null"> |
|
|
|
sex = #{record.sex,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.phone != null"> |
|
|
|
phone = #{record.phone,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.address != null"> |
|
|
|
address = #{record.address,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.password != null"> |
|
|
|
password = #{record.password,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.province != null"> |
|
|
|
province = #{record.province,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
@ -263,6 +270,9 @@ |
|
|
|
<if test="record.shopId != null"> |
|
|
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.userId != null"> |
|
|
|
user_id = #{record.userId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
@ -277,13 +287,14 @@ |
|
|
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
|
sex = #{record.sex,jdbcType=VARCHAR}, |
|
|
|
phone = #{record.phone,jdbcType=VARCHAR}, |
|
|
|
address = #{record.address,jdbcType=VARCHAR}, |
|
|
|
password = #{record.password,jdbcType=VARCHAR}, |
|
|
|
province = #{record.province,jdbcType=VARCHAR}, |
|
|
|
city = #{record.city,jdbcType=VARCHAR}, |
|
|
|
area = #{record.area,jdbcType=VARCHAR}, |
|
|
|
shop_id = #{record.shopId,jdbcType=VARCHAR} |
|
|
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|
|
|
user_id = #{record.userId,jdbcType=VARCHAR} |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
</if> |
|
|
|
@ -309,15 +320,15 @@ |
|
|
|
<if test="name != null"> |
|
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="sex != null"> |
|
|
|
sex = #{sex,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="phone != null"> |
|
|
|
phone = #{phone,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="address != null"> |
|
|
|
address = #{address,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="password != null"> |
|
|
|
password = #{password,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="province != null"> |
|
|
|
province = #{province,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
@ -330,6 +341,9 @@ |
|
|
|
<if test="shopId != null"> |
|
|
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="userId != null"> |
|
|
|
user_id = #{userId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
@ -341,13 +355,14 @@ |
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
|
sex = #{sex,jdbcType=VARCHAR}, |
|
|
|
phone = #{phone,jdbcType=VARCHAR}, |
|
|
|
address = #{address,jdbcType=VARCHAR}, |
|
|
|
password = #{password,jdbcType=VARCHAR}, |
|
|
|
province = #{province,jdbcType=VARCHAR}, |
|
|
|
city = #{city,jdbcType=VARCHAR}, |
|
|
|
area = #{area,jdbcType=VARCHAR}, |
|
|
|
shop_id = #{shopId,jdbcType=VARCHAR} |
|
|
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
|
|
|
user_id = #{userId,jdbcType=VARCHAR} |
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
</mapper> |