表初始化mapper

This commit is contained in:
苏竹红
2023-05-29 16:15:47 +08:00
parent c95a79a114
commit 89c3e9d418
51 changed files with 3819 additions and 0 deletions

View File

@@ -0,0 +1,124 @@
<?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.model.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>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_user_info_${enterpriseId}
<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_${enterpriseId}
<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>
</mapper>