|
|
|
|
<?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="com.cyl.ums.mapper.MemberAddressMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="MemberAddress" id="MemberAddressResult">
|
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
<result property="memberId" column="member_id"/>
|
|
|
|
|
<result property="name" column="name"/>
|
|
|
|
|
<result property="phone" column="phone"/>
|
|
|
|
|
<result property="defaultStatus" column="default_status"/>
|
|
|
|
|
<result property="postCode" column="post_code"/>
|
|
|
|
|
<result property="province" column="province"/>
|
|
|
|
|
<result property="city" column="city"/>
|
|
|
|
|
<result property="district" column="district"/>
|
|
|
|
|
<result property="detailAddress" column="detail_address"/>
|
|
|
|
|
<result property="isDefault" column="is_default"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectMemberAddressVo">
|
|
|
|
|
select id, member_id, name, phone, default_status, post_code, province, city, district, detail_address, is_default, create_by, create_time, update_by, update_time from ums_member_address
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectByEntity" parameterType="MemberAddress" resultMap="MemberAddressResult">
|
|
|
|
|
<include refid="selectMemberAddressVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
|
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
|
|
<if test="defaultStatus != null "> and default_status = #{defaultStatus}</if>
|
|
|
|
|
<if test="postCode != null and postCode != ''"> and post_code = #{postCode}</if>
|
|
|
|
|
<if test="province != null and province != ''"> and province = #{province}</if>
|
|
|
|
|
<if test="city != null and city != ''"> and city = #{city}</if>
|
|
|
|
|
<if test="district != null and district != ''"> and district = #{district}</if>
|
|
|
|
|
<if test="detailAddress != null and detailAddress != ''"> and detail_address = #{detailAddress}</if>
|
|
|
|
|
<if test="isDefault != null "> and is_default = #{isDefault}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|