| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?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.yonge.cooleshow.mbg.mapper.UmsMemberReceiveAddressMapper">
- <resultMap id="BaseResultMap" type="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddress">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="member_id" jdbcType="BIGINT" property="memberId" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
- <result column="default_status" jdbcType="INTEGER" property="defaultStatus" />
- <result column="post_code" jdbcType="VARCHAR" property="postCode" />
- <result column="province" jdbcType="VARCHAR" property="province" />
- <result column="city" jdbcType="VARCHAR" property="city" />
- <result column="region" jdbcType="VARCHAR" property="region" />
- <result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- id, member_id, name, phone_number, default_status, post_code, province, city, region,
- detail_address
- </sql>
- <select id="selectByExample" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddressExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from ums_member_receive_address
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from ums_member_receive_address
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from ums_member_receive_address
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <delete id="deleteByExample" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddressExample">
- delete from ums_member_receive_address
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddress">
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into ums_member_receive_address (member_id, name, phone_number,
- default_status, post_code, province,
- city, region, detail_address
- )
- values (#{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
- #{defaultStatus,jdbcType=INTEGER}, #{postCode,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
- #{city,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, #{detailAddress,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddress">
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into ums_member_receive_address
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="memberId != null">
- member_id,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="phoneNumber != null">
- phone_number,
- </if>
- <if test="defaultStatus != null">
- default_status,
- </if>
- <if test="postCode != null">
- post_code,
- </if>
- <if test="province != null">
- province,
- </if>
- <if test="city != null">
- city,
- </if>
- <if test="region != null">
- region,
- </if>
- <if test="detailAddress != null">
- detail_address,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="memberId != null">
- #{memberId,jdbcType=BIGINT},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="phoneNumber != null">
- #{phoneNumber,jdbcType=VARCHAR},
- </if>
- <if test="defaultStatus != null">
- #{defaultStatus,jdbcType=INTEGER},
- </if>
- <if test="postCode != null">
- #{postCode,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- #{province,jdbcType=VARCHAR},
- </if>
- <if test="city != null">
- #{city,jdbcType=VARCHAR},
- </if>
- <if test="region != null">
- #{region,jdbcType=VARCHAR},
- </if>
- <if test="detailAddress != null">
- #{detailAddress,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddressExample" resultType="java.lang.Long">
- select count(*) from ums_member_receive_address
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update ums_member_receive_address
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=BIGINT},
- </if>
- <if test="record.memberId != null">
- member_id = #{record.memberId,jdbcType=BIGINT},
- </if>
- <if test="record.name != null">
- name = #{record.name,jdbcType=VARCHAR},
- </if>
- <if test="record.phoneNumber != null">
- phone_number = #{record.phoneNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.defaultStatus != null">
- default_status = #{record.defaultStatus,jdbcType=INTEGER},
- </if>
- <if test="record.postCode != null">
- post_code = #{record.postCode,jdbcType=VARCHAR},
- </if>
- <if test="record.province != null">
- province = #{record.province,jdbcType=VARCHAR},
- </if>
- <if test="record.city != null">
- city = #{record.city,jdbcType=VARCHAR},
- </if>
- <if test="record.region != null">
- region = #{record.region,jdbcType=VARCHAR},
- </if>
- <if test="record.detailAddress != null">
- detail_address = #{record.detailAddress,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update ums_member_receive_address
- set id = #{record.id,jdbcType=BIGINT},
- member_id = #{record.memberId,jdbcType=BIGINT},
- name = #{record.name,jdbcType=VARCHAR},
- phone_number = #{record.phoneNumber,jdbcType=VARCHAR},
- default_status = #{record.defaultStatus,jdbcType=INTEGER},
- post_code = #{record.postCode,jdbcType=VARCHAR},
- province = #{record.province,jdbcType=VARCHAR},
- city = #{record.city,jdbcType=VARCHAR},
- region = #{record.region,jdbcType=VARCHAR},
- detail_address = #{record.detailAddress,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddress">
- update ums_member_receive_address
- <set>
- <if test="memberId != null">
- member_id = #{memberId,jdbcType=BIGINT},
- </if>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="phoneNumber != null">
- phone_number = #{phoneNumber,jdbcType=VARCHAR},
- </if>
- <if test="defaultStatus != null">
- default_status = #{defaultStatus,jdbcType=INTEGER},
- </if>
- <if test="postCode != null">
- post_code = #{postCode,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- province = #{province,jdbcType=VARCHAR},
- </if>
- <if test="city != null">
- city = #{city,jdbcType=VARCHAR},
- </if>
- <if test="region != null">
- region = #{region,jdbcType=VARCHAR},
- </if>
- <if test="detailAddress != null">
- detail_address = #{detailAddress,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.yonge.cooleshow.mbg.model.UmsMemberReceiveAddress">
- update ums_member_receive_address
- set member_id = #{memberId,jdbcType=BIGINT},
- name = #{name,jdbcType=VARCHAR},
- phone_number = #{phoneNumber,jdbcType=VARCHAR},
- default_status = #{defaultStatus,jdbcType=INTEGER},
- post_code = #{postCode,jdbcType=VARCHAR},
- province = #{province,jdbcType=VARCHAR},
- city = #{city,jdbcType=VARCHAR},
- region = #{region,jdbcType=VARCHAR},
- detail_address = #{detailAddress,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|