|
|
@@ -15,6 +15,7 @@
|
|
|
<result column="postcode" property="postcode" jdbcType="VARCHAR" />
|
|
|
<result column="address" property="address" jdbcType="VARCHAR" />
|
|
|
<result column="address_detail" property="addressDetail" jdbcType="VARCHAR" />
|
|
|
+ <result column="user_address_id" property="userAddressId" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
<trim suffixOverrides="," >
|
|
|
@@ -44,6 +45,8 @@
|
|
|
|
|
|
address_detail,
|
|
|
|
|
|
+ user_address_id,
|
|
|
+
|
|
|
</trim>
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
@@ -97,6 +100,9 @@
|
|
|
</if>
|
|
|
<if test="addressDetail!= null" >
|
|
|
address_detail,
|
|
|
+ </if>
|
|
|
+ <if test="userAddressId!= null" >
|
|
|
+ user_address_id,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
@@ -138,6 +144,9 @@
|
|
|
</if>
|
|
|
<if test="addressDetail != null" >
|
|
|
#{addressDetail,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userAddressId != null" >
|
|
|
+ #{userAddressId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -182,6 +191,9 @@
|
|
|
</if>
|
|
|
<if test="addressDetail != null" >
|
|
|
address_detail= #{addressDetail,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userAddressId != null" >
|
|
|
+ user_address_id= #{userAddressId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -228,6 +240,9 @@
|
|
|
</if>
|
|
|
<if test="record.addressDetail != null and !"".equals(record.addressDetail)">
|
|
|
and address_detail = #{record.addressDetail}
|
|
|
+ </if>
|
|
|
+ <if test="record.userAddressId != null and !"".equals(record.userAddressId)">
|
|
|
+ and user_address_id = #{record.userAddressId}
|
|
|
</if>
|
|
|
<if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
@@ -238,6 +253,7 @@
|
|
|
OR postcode LIKE concat('%',#{record.searchKey},'%')
|
|
|
OR address LIKE concat('%',#{record.searchKey},'%')
|
|
|
OR address_detail LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR user_address_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
</trim>
|
|
|
</if>
|
|
|
|
|
|
@@ -335,6 +351,9 @@
|
|
|
</if>
|
|
|
<if test="addressDetail != null and !"".equals(addressDetail)">
|
|
|
and address_detail = #{addressDetail}
|
|
|
+ </if>
|
|
|
+ <if test="userAddressId != null and !"".equals(userAddressId)">
|
|
|
+ and user_address_id = #{userAddressId}
|
|
|
</if>
|
|
|
<if test="searchKey != null and !"".equals(searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
@@ -345,6 +364,7 @@
|
|
|
OR postcode LIKE concat('%',#{searchKey},'%')
|
|
|
OR address LIKE concat('%',#{searchKey},'%')
|
|
|
OR address_detail LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR user_address_id LIKE concat('%',#{searchKey},'%')
|
|
|
</trim>
|
|
|
</if>
|
|
|
<if test="advancedQuery != null and !"".equals(advancedQuery)">
|
|
|
@@ -441,6 +461,9 @@
|
|
|
</if>
|
|
|
<if test="addressDetail != null and !"".equals(addressDetail)">
|
|
|
and address_detail = #{addressDetail}
|
|
|
+ </if>
|
|
|
+ <if test="userAddressId != null and !"".equals(userAddressId)">
|
|
|
+ and user_address_id = #{userAddressId}
|
|
|
</if>
|
|
|
|
|
|
</where>
|
|
|
@@ -456,7 +479,7 @@
|
|
|
select <include refid="Base_Column_List"/> from order_address
|
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
|
- </where>
|
|
|
+ </where>
|
|
|
order by id desc
|
|
|
</select>
|
|
|
</mapper>
|