157 lines
5.3 KiB
XML
157 lines
5.3 KiB
XML
<?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.cool.store.mapper.HyPartnerUserInfoMapper">
|
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerUserInfoDO">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
|
<result column="live_area" jdbcType="VARCHAR" property="liveArea" />
|
|
<result column="want_shop_area" jdbcType="VARCHAR" property="wantShopArea" />
|
|
<result column="accept_adjust_type" jdbcType="TINYINT" property="acceptAdjustType" />
|
|
<result column="invite_code" jdbcType="VARCHAR" property="inviteCode" />
|
|
<result column="is_write_partner_know" jdbcType="TINYINT" property="isWritePartnerKnow" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
|
|
invite_code, is_write_partner_know, create_time, update_time
|
|
</sql>
|
|
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
|
select
|
|
<include refid="Base_Column_List"></include>
|
|
from hy_partner_user_info
|
|
where partner_id = #{partnerId}
|
|
</select>
|
|
|
|
<select id="selectByMobile" resultMap="BaseResultMap" >
|
|
select
|
|
<include refid="Base_Column_List"></include>
|
|
from hy_partner_user_info
|
|
where mobile = #{mobile}
|
|
</select>
|
|
|
|
|
|
<select id="selectByPartnerIds" resultMap="BaseResultMap" >
|
|
select
|
|
<include refid="Base_Column_List"></include>
|
|
from hy_partner_user_info
|
|
<if test="partnerIdList!=null and partnerIdList.size>0">
|
|
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
|
|
#{partnerId}
|
|
</foreach>
|
|
</if>
|
|
</select>
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
insert into hy_partner_user_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="record.partnerId != null">
|
|
partner_id,
|
|
</if>
|
|
<if test="record.mobile != null">
|
|
mobile,
|
|
</if>
|
|
<if test="record.username != null">
|
|
username,
|
|
</if>
|
|
<if test="record.liveArea != null">
|
|
live_area,
|
|
</if>
|
|
<if test="record.wantShopArea != null">
|
|
want_shop_area,
|
|
</if>
|
|
<if test="record.acceptAdjustType != null">
|
|
accept_adjust_type,
|
|
</if>
|
|
<if test="record.inviteCode != null">
|
|
invite_code,
|
|
</if>
|
|
<if test="record.isWritePartnerKnow != null">
|
|
is_write_partner_know,
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="record.partnerId != null">
|
|
#{record.partnerId},
|
|
</if>
|
|
<if test="record.mobile != null">
|
|
#{record.mobile},
|
|
</if>
|
|
<if test="record.username != null">
|
|
#{record.username},
|
|
</if>
|
|
<if test="record.liveArea != null">
|
|
#{record.liveArea},
|
|
</if>
|
|
<if test="record.wantShopArea != null">
|
|
#{record.wantShopArea},
|
|
</if>
|
|
<if test="record.acceptAdjustType != null">
|
|
#{record.acceptAdjustType},
|
|
</if>
|
|
<if test="record.inviteCode != null">
|
|
#{record.inviteCode},
|
|
</if>
|
|
<if test="record.isWritePartnerKnow != null">
|
|
#{record.isWritePartnerKnow},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
#{record.createTime},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
#{record.updateTime},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective">
|
|
update hy_partner_user_info
|
|
<set>
|
|
<if test="record.partnerId != null">
|
|
partner_id = #{record.partnerId},
|
|
</if>
|
|
<if test="record.mobile != null">
|
|
mobile = #{record.mobile},
|
|
</if>
|
|
<if test="record.username != null">
|
|
username = #{record.username},
|
|
</if>
|
|
<if test="record.liveArea != null">
|
|
live_area = #{record.liveArea},
|
|
</if>
|
|
<if test="record.wantShopArea != null">
|
|
want_shop_area = #{record.wantShopArea},
|
|
</if>
|
|
<if test="record.acceptAdjustType != null">
|
|
accept_adjust_type = #{record.acceptAdjustType},
|
|
</if>
|
|
<if test="record.inviteCode != null">
|
|
invite_code = #{record.inviteCode},
|
|
</if>
|
|
<if test="record.isWritePartnerKnow != null">
|
|
is_write_partner_know = #{record.isWritePartnerKnow},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time = #{record.createTime},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime},
|
|
</if>
|
|
</set>
|
|
where id = #{record.id}
|
|
</update>
|
|
|
|
<update id="updateJoinKnowById">
|
|
update hy_partner_user_info
|
|
set `is_write_partner_know`=#{isWritePartnerKnow,jdbcType=INTEGER}
|
|
where id=#{id,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
</mapper> |