225 lines
8.5 KiB
XML
225 lines
8.5 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.yupi.springbootinit.mapper.NewHostsMapper">
|
|
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.NewHosts">
|
|
<!--@mbg.generated-->
|
|
<!--@Table new_hosts-->
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="hosts_id" jdbcType="VARCHAR" property="hostsId" />
|
|
<result column="hosts_level" jdbcType="VARCHAR" property="hostsLevel" />
|
|
<result column="hosts_coins" jdbcType="INTEGER" property="hostsCoins" />
|
|
<result column="Invitation_type" jdbcType="INTEGER" property="invitationType" />
|
|
<result column="fans" jdbcType="INTEGER" property="fans" />
|
|
<result column="fllowernum" jdbcType="INTEGER" property="fllowernum" />
|
|
<result column="yesterday_coins" jdbcType="INTEGER" property="yesterdayCoins" />
|
|
<result column="country" jdbcType="VARCHAR" property="country" />
|
|
<result column="hosts_kind" jdbcType="VARCHAR" property="hostsKind" />
|
|
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
|
<result column="creator" jdbcType="INTEGER" property="creator" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--@mbg.generated-->
|
|
id, hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
|
country, hosts_kind, tenant_id, creator, create_time, updater, update_time
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
<!--@mbg.generated-->
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from new_hosts
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<!--@mbg.generated-->
|
|
delete from new_hosts
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
|
<!--@mbg.generated-->
|
|
insert into new_hosts (hosts_id, hosts_level, hosts_coins,
|
|
Invitation_type, fans, fllowernum,
|
|
yesterday_coins, country, hosts_kind,
|
|
tenant_id, creator
|
|
)
|
|
values (#{hostsId,jdbcType=VARCHAR}, #{hostsLevel,jdbcType=VARCHAR}, #{hostsCoins,jdbcType=INTEGER},
|
|
#{invitationType,jdbcType=INTEGER}, #{fans,jdbcType=INTEGER}, #{fllowernum,jdbcType=INTEGER},
|
|
#{yesterdayCoins,jdbcType=INTEGER}, #{country,jdbcType=VARCHAR}, #{hostsKind,jdbcType=VARCHAR},
|
|
#{tenantId,jdbcType=BIGINT}, #{creator,jdbcType=INTEGER})
|
|
</insert>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
|
<!--@mbg.generated-->
|
|
insert into new_hosts
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="hostsId != null">
|
|
hosts_id,
|
|
</if>
|
|
<if test="hostsLevel != null">
|
|
hosts_level,
|
|
</if>
|
|
<if test="hostsCoins != null">
|
|
hosts_coins,
|
|
</if>
|
|
<if test="invitationType != null">
|
|
Invitation_type,
|
|
</if>
|
|
<if test="fans != null">
|
|
fans,
|
|
</if>
|
|
<if test="fllowernum != null">
|
|
fllowernum,
|
|
</if>
|
|
<if test="yesterdayCoins != null">
|
|
yesterday_coins,
|
|
</if>
|
|
<if test="country != null">
|
|
country,
|
|
</if>
|
|
<if test="hostsKind != null">
|
|
hosts_kind,
|
|
</if>
|
|
<if test="tenantId != null">
|
|
tenant_id,
|
|
</if>
|
|
<if test="creator != null">
|
|
creator,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updater != null">
|
|
updater,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="hostsId != null">
|
|
#{hostsId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsLevel != null">
|
|
#{hostsLevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsCoins != null">
|
|
#{hostsCoins,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="invitationType != null">
|
|
#{invitationType,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fans != null">
|
|
#{fans,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fllowernum != null">
|
|
#{fllowernum,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="yesterdayCoins != null">
|
|
#{yesterdayCoins,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="country != null">
|
|
#{country,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsKind != null">
|
|
#{hostsKind,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="tenantId != null">
|
|
#{tenantId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="creator != null">
|
|
#{creator,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updater != null">
|
|
#{updater,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
|
<!--@mbg.generated-->
|
|
update new_hosts
|
|
<set>
|
|
<if test="hostsId != null">
|
|
hosts_id = #{hostsId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsLevel != null">
|
|
hosts_level = #{hostsLevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsCoins != null">
|
|
hosts_coins = #{hostsCoins,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="invitationType != null">
|
|
Invitation_type = #{invitationType,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fans != null">
|
|
fans = #{fans,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fllowernum != null">
|
|
fllowernum = #{fllowernum,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="yesterdayCoins != null">
|
|
yesterday_coins = #{yesterdayCoins,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="country != null">
|
|
country = #{country,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hostsKind != null">
|
|
hosts_kind = #{hostsKind,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="tenantId != null">
|
|
tenant_id = #{tenantId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="creator != null">
|
|
creator = #{creator,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updater != null">
|
|
updater = #{updater,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
|
<!--@mbg.generated-->
|
|
update new_hosts
|
|
set hosts_id = #{hostsId,jdbcType=VARCHAR},
|
|
hosts_level = #{hostsLevel,jdbcType=VARCHAR},
|
|
hosts_coins = #{hostsCoins,jdbcType=INTEGER},
|
|
Invitation_type = #{invitationType,jdbcType=INTEGER},
|
|
fans = #{fans,jdbcType=INTEGER},
|
|
fllowernum = #{fllowernum,jdbcType=INTEGER},
|
|
yesterday_coins = #{yesterdayCoins,jdbcType=INTEGER},
|
|
country = #{country,jdbcType=VARCHAR},
|
|
hosts_kind = #{hostsKind,jdbcType=VARCHAR},
|
|
tenant_id = #{tenantId,jdbcType=BIGINT},
|
|
creator = #{creator,jdbcType=INTEGER},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
updater = #{updater,jdbcType=VARCHAR},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map">
|
|
<!--@mbg.generated-->
|
|
insert into new_hosts
|
|
(hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
|
country, hosts_kind, tenant_id, creator)
|
|
values
|
|
<foreach collection="list" item="item" separator=",">
|
|
(#{item.hostsId,jdbcType=VARCHAR}, #{item.hostsLevel,jdbcType=VARCHAR}, #{item.hostsCoins,jdbcType=INTEGER},
|
|
#{item.invitationType,jdbcType=INTEGER}, #{item.fans,jdbcType=INTEGER}, #{item.fllowernum,jdbcType=INTEGER},
|
|
#{item.yesterdayCoins,jdbcType=INTEGER}, #{item.country,jdbcType=VARCHAR}, #{item.hostsKind,jdbcType=VARCHAR},
|
|
#{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER})
|
|
</foreach>
|
|
</insert>
|
|
</mapper> |