|
@@ -34,9 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select address_id, user_id, telephone, name,sex, age, is_contagion, have_contagion, province_code, province_name, city_code, city_name, district_code, district_name, address, is_default, is_delete, label, create_time, create_by, update_time, update_by, remark from l_address
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectAddressList" parameterType="Address" resultMap="AddressResult">
|
|
|
+
|
|
|
+ <!--<select id="selectAddressList" parameterType="Address" resultMap="AddressResult">
|
|
|
<include refid="selectAddressVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
@@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
|
|
<if test="label != null and label != ''"> and label = #{label}</if>
|
|
|
</where>
|
|
|
- </select>
|
|
|
+ </select>-->
|
|
|
|
|
|
<select id="selectAddressByAddressId" parameterType="Long" resultMap="AddressResult">
|
|
|
<include refid="selectAddressVo"/>
|
|
@@ -63,6 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectAddressBySeconderId" resultType="com.leromro.core.domain.Address">
|
|
|
select * from l_address where address_id = (select address_id from l_second_order where second_order_id = #{orderId});
|
|
|
</select>
|
|
|
+ <select id="selectAddressList" resultType="com.leromro.core.domain.Address" parameterType="java.lang.Long">
|
|
|
+ <include refid="selectAddressVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
<insert id="insertAddress" parameterType="Address" useGeneratedKeys="true" keyProperty="addressId">
|
|
|
insert into l_address
|