主播信息入库添加 userId 字段,添加国家信息接口
This commit is contained in:
42
src/main/resources/mapper/CountryInfoMapper.xml
Normal file
42
src/main/resources/mapper/CountryInfoMapper.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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.CountryInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.CountryInfo">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table country_info-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<id column="country_id" jdbcType="VARCHAR" property="countryId" />
|
||||
<result column="country_group" jdbcType="VARCHAR" property="countryGroup" />
|
||||
<result column="country_group_name" jdbcType="VARCHAR" property="countryGroupName" />
|
||||
<result column="country_name" jdbcType="VARCHAR" property="countryName" />
|
||||
<result column="language" jdbcType="VARCHAR" property="language" />
|
||||
<result column="language_name" jdbcType="VARCHAR" property="languageName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CountryInfoVOMap" type="com.yupi.springbootinit.model.vo.country.CountryInfoVO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table country_info-->
|
||||
<id column="country_id" jdbcType="VARCHAR" property="countryId" />
|
||||
<result column="country_group" jdbcType="VARCHAR" property="countryGroup" />
|
||||
<result column="country_group_name" jdbcType="VARCHAR" property="countryGroupName" />
|
||||
<result column="country_name" jdbcType="VARCHAR" property="countryName" />
|
||||
<result column="language" jdbcType="VARCHAR" property="language" />
|
||||
<result column="language_name" jdbcType="VARCHAR" property="languageName" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, country_id, country_group, country_group_name, country_name, `language`, language_name,
|
||||
create_time, creator, update_time, updater
|
||||
</sql>
|
||||
|
||||
<!--auto generated by MybatisCodeHelper on 2025-06-13-->
|
||||
<select id="selectByCountryGroupName" resultMap="CountryInfoVOMap">
|
||||
select *
|
||||
from country_info
|
||||
group by country_group_name;
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -20,6 +20,7 @@
|
||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
||||
<result column="online_fans" jdbcType="INTEGER" property="onlineFans"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="HostInfoVo" type="com.yupi.springbootinit.model.vo.hosts.NewHostsVO">
|
||||
@@ -42,7 +43,7 @@
|
||||
<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
|
||||
country, hosts_kind, tenant_id, creator, create_time, updater, update_time, user_id
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
@@ -61,12 +62,12 @@
|
||||
insert into new_hosts (hosts_id, hosts_level, hosts_coins,
|
||||
Invitation_type, fans, fllowernum,
|
||||
yesterday_coins, country, hosts_kind,
|
||||
tenant_id, creator
|
||||
tenant_id, creator, user_id
|
||||
)
|
||||
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=BIGINT})
|
||||
#{tenantId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
@@ -232,13 +233,13 @@
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
(hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
||||
country, hosts_kind, tenant_id, creator)
|
||||
country, hosts_kind, tenant_id, creator, user_id)
|
||||
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})
|
||||
#{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER},#{item.userId,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user