|
|
@@ -9,11 +9,13 @@
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
<result column="user_id" jdbcType="INTEGER" property="userId" />
|
|
|
- <result column="province_id" jdbcType="INTEGER" property="provinceId" />
|
|
|
- <result column="city_id" jdbcType="INTEGER" property="cityId" />
|
|
|
- <result column="area_id" jdbcType="INTEGER" property="areaId" />
|
|
|
- <result column="address" jdbcType="VARCHAR" property="address" />
|
|
|
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
+ <result column="province" jdbcType="VARCHAR" property="province" />
|
|
|
+ <result column="city" jdbcType="VARCHAR" property="city" />
|
|
|
+ <result column="county" jdbcType="VARCHAR" property="county" />
|
|
|
+ <result column="address_detail" jdbcType="VARCHAR" property="addressDetail" />
|
|
|
+ <result column="area_code" jdbcType="CHAR" property="areaCode" />
|
|
|
+ <result column="postal_code" jdbcType="CHAR" property="postalCode" />
|
|
|
+ <result column="tel" jdbcType="VARCHAR" property="tel" />
|
|
|
<result column="is_default" jdbcType="BIT" property="isDefault" />
|
|
|
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
@@ -90,8 +92,8 @@
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- id, `name`, user_id, province_id, city_id, area_id, address, mobile, is_default,
|
|
|
- add_time, update_time, deleted
|
|
|
+ id, `name`, user_id, province, city, county, address_detail, area_code, postal_code,
|
|
|
+ tel, is_default, add_time, update_time, deleted
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAddressExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
@@ -128,8 +130,8 @@
|
|
|
</foreach>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- id, `name`, user_id, province_id, city_id, area_id, address, mobile, is_default,
|
|
|
- add_time, update_time, deleted
|
|
|
+ id, `name`, user_id, province, city, county, address_detail, area_code, postal_code,
|
|
|
+ tel, is_default, add_time, update_time, deleted
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
from litemall_address
|
|
|
@@ -188,8 +190,8 @@
|
|
|
</foreach>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- id, `name`, user_id, province_id, city_id, area_id, address, mobile, is_default,
|
|
|
- add_time, update_time, deleted
|
|
|
+ id, `name`, user_id, province, city, county, address_detail, area_code, postal_code,
|
|
|
+ tel, is_default, add_time, update_time, deleted
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
from litemall_address
|
|
|
@@ -221,14 +223,16 @@
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
</selectKey>
|
|
|
- insert into litemall_address (`name`, user_id, province_id,
|
|
|
- city_id, area_id, address,
|
|
|
- mobile, is_default, add_time,
|
|
|
- update_time, deleted)
|
|
|
- values (#{name,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{provinceId,jdbcType=INTEGER},
|
|
|
- #{cityId,jdbcType=INTEGER}, #{areaId,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR},
|
|
|
- #{mobile,jdbcType=VARCHAR}, #{isDefault,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
|
|
|
+ insert into litemall_address (`name`, user_id, province,
|
|
|
+ city, county, address_detail,
|
|
|
+ area_code, postal_code, tel,
|
|
|
+ is_default, add_time, update_time,
|
|
|
+ deleted)
|
|
|
+ values (#{name,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR},
|
|
|
+ #{city,jdbcType=VARCHAR}, #{county,jdbcType=VARCHAR}, #{addressDetail,jdbcType=VARCHAR},
|
|
|
+ #{areaCode,jdbcType=CHAR}, #{postalCode,jdbcType=CHAR}, #{tel,jdbcType=VARCHAR},
|
|
|
+ #{isDefault,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{deleted,jdbcType=BIT})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallAddress">
|
|
|
<!--
|
|
|
@@ -246,20 +250,26 @@
|
|
|
<if test="userId != null">
|
|
|
user_id,
|
|
|
</if>
|
|
|
- <if test="provinceId != null">
|
|
|
- province_id,
|
|
|
+ <if test="province != null">
|
|
|
+ province,
|
|
|
</if>
|
|
|
- <if test="cityId != null">
|
|
|
- city_id,
|
|
|
+ <if test="city != null">
|
|
|
+ city,
|
|
|
</if>
|
|
|
- <if test="areaId != null">
|
|
|
- area_id,
|
|
|
+ <if test="county != null">
|
|
|
+ county,
|
|
|
</if>
|
|
|
- <if test="address != null">
|
|
|
- address,
|
|
|
+ <if test="addressDetail != null">
|
|
|
+ address_detail,
|
|
|
</if>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile,
|
|
|
+ <if test="areaCode != null">
|
|
|
+ area_code,
|
|
|
+ </if>
|
|
|
+ <if test="postalCode != null">
|
|
|
+ postal_code,
|
|
|
+ </if>
|
|
|
+ <if test="tel != null">
|
|
|
+ tel,
|
|
|
</if>
|
|
|
<if test="isDefault != null">
|
|
|
is_default,
|
|
|
@@ -281,20 +291,26 @@
|
|
|
<if test="userId != null">
|
|
|
#{userId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="provinceId != null">
|
|
|
- #{provinceId,jdbcType=INTEGER},
|
|
|
+ <if test="province != null">
|
|
|
+ #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null">
|
|
|
+ #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="county != null">
|
|
|
+ #{county,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="cityId != null">
|
|
|
- #{cityId,jdbcType=INTEGER},
|
|
|
+ <if test="addressDetail != null">
|
|
|
+ #{addressDetail,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="areaId != null">
|
|
|
- #{areaId,jdbcType=INTEGER},
|
|
|
+ <if test="areaCode != null">
|
|
|
+ #{areaCode,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="address != null">
|
|
|
- #{address,jdbcType=VARCHAR},
|
|
|
+ <if test="postalCode != null">
|
|
|
+ #{postalCode,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="mobile != null">
|
|
|
- #{mobile,jdbcType=VARCHAR},
|
|
|
+ <if test="tel != null">
|
|
|
+ #{tel,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="isDefault != null">
|
|
|
#{isDefault,jdbcType=BIT},
|
|
|
@@ -336,20 +352,26 @@
|
|
|
<if test="record.userId != null">
|
|
|
user_id = #{record.userId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="record.provinceId != null">
|
|
|
- province_id = #{record.provinceId,jdbcType=INTEGER},
|
|
|
+ <if test="record.province != null">
|
|
|
+ province = #{record.province,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.cityId != null">
|
|
|
- city_id = #{record.cityId,jdbcType=INTEGER},
|
|
|
+ <if test="record.city != null">
|
|
|
+ city = #{record.city,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.areaId != null">
|
|
|
- area_id = #{record.areaId,jdbcType=INTEGER},
|
|
|
+ <if test="record.county != null">
|
|
|
+ county = #{record.county,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.address != null">
|
|
|
- address = #{record.address,jdbcType=VARCHAR},
|
|
|
+ <if test="record.addressDetail != null">
|
|
|
+ address_detail = #{record.addressDetail,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.mobile != null">
|
|
|
- mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
+ <if test="record.areaCode != null">
|
|
|
+ area_code = #{record.areaCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.postalCode != null">
|
|
|
+ postal_code = #{record.postalCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.tel != null">
|
|
|
+ tel = #{record.tel,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="record.isDefault != null">
|
|
|
is_default = #{record.isDefault,jdbcType=BIT},
|
|
|
@@ -377,11 +399,13 @@
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
`name` = #{record.name,jdbcType=VARCHAR},
|
|
|
user_id = #{record.userId,jdbcType=INTEGER},
|
|
|
- province_id = #{record.provinceId,jdbcType=INTEGER},
|
|
|
- city_id = #{record.cityId,jdbcType=INTEGER},
|
|
|
- area_id = #{record.areaId,jdbcType=INTEGER},
|
|
|
- address = #{record.address,jdbcType=VARCHAR},
|
|
|
- mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
+ province = #{record.province,jdbcType=VARCHAR},
|
|
|
+ city = #{record.city,jdbcType=VARCHAR},
|
|
|
+ county = #{record.county,jdbcType=VARCHAR},
|
|
|
+ address_detail = #{record.addressDetail,jdbcType=VARCHAR},
|
|
|
+ area_code = #{record.areaCode,jdbcType=CHAR},
|
|
|
+ postal_code = #{record.postalCode,jdbcType=CHAR},
|
|
|
+ tel = #{record.tel,jdbcType=VARCHAR},
|
|
|
is_default = #{record.isDefault,jdbcType=BIT},
|
|
|
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
@@ -403,20 +427,26 @@
|
|
|
<if test="userId != null">
|
|
|
user_id = #{userId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="provinceId != null">
|
|
|
- province_id = #{provinceId,jdbcType=INTEGER},
|
|
|
+ <if test="province != null">
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null">
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="county != null">
|
|
|
+ county = #{county,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="cityId != null">
|
|
|
- city_id = #{cityId,jdbcType=INTEGER},
|
|
|
+ <if test="addressDetail != null">
|
|
|
+ address_detail = #{addressDetail,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="areaId != null">
|
|
|
- area_id = #{areaId,jdbcType=INTEGER},
|
|
|
+ <if test="areaCode != null">
|
|
|
+ area_code = #{areaCode,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="address != null">
|
|
|
- address = #{address,jdbcType=VARCHAR},
|
|
|
+ <if test="postalCode != null">
|
|
|
+ postal_code = #{postalCode,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ <if test="tel != null">
|
|
|
+ tel = #{tel,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="isDefault != null">
|
|
|
is_default = #{isDefault,jdbcType=BIT},
|
|
|
@@ -441,11 +471,13 @@
|
|
|
update litemall_address
|
|
|
set `name` = #{name,jdbcType=VARCHAR},
|
|
|
user_id = #{userId,jdbcType=INTEGER},
|
|
|
- province_id = #{provinceId,jdbcType=INTEGER},
|
|
|
- city_id = #{cityId,jdbcType=INTEGER},
|
|
|
- area_id = #{areaId,jdbcType=INTEGER},
|
|
|
- address = #{address,jdbcType=VARCHAR},
|
|
|
- mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
+ county = #{county,jdbcType=VARCHAR},
|
|
|
+ address_detail = #{addressDetail,jdbcType=VARCHAR},
|
|
|
+ area_code = #{areaCode,jdbcType=CHAR},
|
|
|
+ postal_code = #{postalCode,jdbcType=CHAR},
|
|
|
+ tel = #{tel,jdbcType=VARCHAR},
|
|
|
is_default = #{isDefault,jdbcType=BIT},
|
|
|
add_time = #{addTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
@@ -483,8 +515,8 @@
|
|
|
</foreach>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- id, `name`, user_id, province_id, city_id, area_id, address, mobile, is_default,
|
|
|
- add_time, update_time, deleted
|
|
|
+ id, `name`, user_id, province, city, county, address_detail, area_code, postal_code,
|
|
|
+ tel, is_default, add_time, update_time, deleted
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
from litemall_address
|