1.修改country_info 表名为server_country_info
2.修改new_hosts表名为 server_new_hosts
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.yupi.springbootinit.mapper.CountryInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.CountryInfo">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table country_info-->
|
||||
<!--@Table server_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" />
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<resultMap id="CountryInfoVOMap" type="com.yupi.springbootinit.model.vo.country.CountryInfoVO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table country_info-->
|
||||
<!--@Table server_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" />
|
||||
@@ -36,7 +36,7 @@
|
||||
<!--auto generated by MybatisCodeHelper on 2025-06-13-->
|
||||
<select id="selectByCountryGroupName" resultMap="CountryInfoVOMap">
|
||||
select *
|
||||
from country_info
|
||||
from server_country_info
|
||||
group by country_group_name;
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.yupi.springbootinit.mapper.NewHostsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table new_hosts-->
|
||||
<!--@Table server_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" />
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<resultMap id="HostInfoVo" type="com.yupi.springbootinit.model.vo.hosts.NewHostsVO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table new_hosts-->
|
||||
<!--@Table server_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" />
|
||||
@@ -49,17 +49,17 @@
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from new_hosts
|
||||
from server_new_hosts
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--@mbg.generated-->
|
||||
delete from new_hosts
|
||||
delete from server_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,
|
||||
insert into server_new_hosts (hosts_id, hosts_level, hosts_coins,
|
||||
Invitation_type, fans, fllowernum,
|
||||
yesterday_coins, country, hosts_kind,
|
||||
tenant_id, creator, user_id
|
||||
@@ -71,7 +71,7 @@
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
insert into server_new_hosts
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="hostsId != null">
|
||||
hosts_id,
|
||||
@@ -163,7 +163,7 @@
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
update new_hosts
|
||||
update server_new_hosts
|
||||
<set>
|
||||
<if test="hostsId != null">
|
||||
hosts_id = #{hostsId,jdbcType=VARCHAR},
|
||||
@@ -212,7 +212,7 @@
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
update new_hosts
|
||||
update server_new_hosts
|
||||
set hosts_id = #{hostsId,jdbcType=VARCHAR},
|
||||
hosts_level = #{hostsLevel,jdbcType=VARCHAR},
|
||||
hosts_coins = #{hostsCoins,jdbcType=INTEGER},
|
||||
@@ -231,7 +231,7 @@
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
insert into server_new_hosts
|
||||
(hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
||||
country, hosts_kind, tenant_id, creator, user_id)
|
||||
values
|
||||
@@ -244,104 +244,104 @@
|
||||
</insert>
|
||||
|
||||
<select id="selectPageByCondition" resultMap="HostInfoVo">
|
||||
select id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
|
||||
yesterday_coins,create_time, country, online_fans,hosts_kind from new_hosts where
|
||||
new_hosts.creator=#{hostInfoDTO.creator}
|
||||
and new_hosts.tenant_id=#{hostInfoDTO.tenantId}
|
||||
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind from server_new_hosts ns join server_country_info ci where
|
||||
ns.creator=#{hostInfoDTO.creator}
|
||||
and ns.tenant_id=#{hostInfoDTO.tenantId}
|
||||
<!-- 主播国家筛选 -->
|
||||
<if test="hostInfoDTO.country!= '' and hostInfoDTO.country != null">
|
||||
and new_hosts.country =#{hostInfoDTO.country,jdbcType=VARCHAR}
|
||||
and ci.country_group_name =#{hostInfoDTO.country,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<!-- 按照入库时间筛选主播 -->
|
||||
<if test="hostInfoDTO.createTime != null">
|
||||
and DATE(new_hosts.create_time) =#{hostInfoDTO.createTime}
|
||||
and DATE(ns.create_time) =#{hostInfoDTO.createTime}
|
||||
</if>
|
||||
<!-- 主播 Id 模糊搜索 -->
|
||||
<if test="hostInfoDTO.hostsId != '' and hostInfoDTO.hostsId != null ">
|
||||
and new_hosts.hosts_id like concat(#{hostInfoDTO.hostsId,jdbcType=VARCHAR},'%')
|
||||
and ns.hosts_id like concat(#{hostInfoDTO.hostsId,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<!-- 今日主播金币筛选 -->
|
||||
<if test="hostInfoDTO.hostsCoinsMin != null and hostInfoDTO.hostsCoinsMax == null ">
|
||||
and new_hosts.hosts_coins >=#{hostInfoDTO.hostsCoinsMin,jdbcType=INTEGER}
|
||||
and ns.hosts_coins >=#{hostInfoDTO.hostsCoinsMin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.hostsCoinsMax != null and hostInfoDTO.hostsCoinsMin == null ">
|
||||
and new_hosts.hosts_coins <=#{hostInfoDTO.hostsCoinsMax,jdbcType=INTEGER}
|
||||
and ns.hosts_coins <=#{hostInfoDTO.hostsCoinsMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.hostsCoinsMin != null and hostInfoDTO.hostsCoinsMax != null " >
|
||||
and new_hosts.hosts_coins between #{hostInfoDTO.hostsCoinsMin,jdbcType=INTEGER} and #{hostInfoDTO.hostsCoinsMax,jdbcType=INTEGER}
|
||||
and ns.hosts_coins between #{hostInfoDTO.hostsCoinsMin,jdbcType=INTEGER} and #{hostInfoDTO.hostsCoinsMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 昨日主播金币筛选 -->
|
||||
<if test="hostInfoDTO.yesterdayCoinsMin != null and hostInfoDTO.yesterdayCoinsMax == null ">
|
||||
and new_hosts.yesterday_coins >=#{hostInfoDTO.yesterdayCoinsMin,jdbcType=INTEGER}
|
||||
and ns.yesterday_coins >=#{hostInfoDTO.yesterdayCoinsMin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.yesterdayCoinsMax != null and hostInfoDTO.yesterdayCoinsMin == null ">
|
||||
and new_hosts.yesterday_coins <=#{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
and ns.yesterday_coins <=#{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.yesterdayCoinsMin != null and hostInfoDTO.yesterdayCoinsMax != null " >
|
||||
and new_hosts.yesterday_coins between #{hostInfoDTO.yesterdayCoinsMin,jdbcType=INTEGER} and #{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
and ns.yesterday_coins between #{hostInfoDTO.yesterdayCoinsMin,jdbcType=INTEGER} and #{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 主播粉丝数筛选-->
|
||||
<if test="hostInfoDTO.fansMin != null and hostInfoDTO.fansMax == null ">
|
||||
and new_hosts.fans >=#{hostInfoDTO.fansMin,jdbcType=INTEGER}
|
||||
and ns.fans >=#{hostInfoDTO.fansMin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.fansMax != null and hostInfoDTO.fansMin == null ">
|
||||
and new_hosts.fans <=#{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
and ns.fans <=#{hostInfoDTO.yesterdayCoinsMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.fansMin != null and hostInfoDTO.fansMax != null " >
|
||||
and new_hosts.fans between #{hostInfoDTO.fansMin,jdbcType=INTEGER} and #{hostInfoDTO.fansMax,jdbcType=INTEGER}
|
||||
and ns.fans between #{hostInfoDTO.fansMin,jdbcType=INTEGER} and #{hostInfoDTO.fansMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 主播关注筛选-->
|
||||
<if test="hostInfoDTO.fllowernumMin != null and hostInfoDTO.fllowernumMax == null ">
|
||||
and new_hosts.fllowernum >=#{hostInfoDTO.fllowernumMin,jdbcType=INTEGER}
|
||||
and ns.fllowernum >=#{hostInfoDTO.fllowernumMin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.fllowernumMax != null and hostInfoDTO.fllowernumMin == null ">
|
||||
and new_hosts.fllowernum <=#{hostInfoDTO.fllowernumMax,jdbcType=INTEGER}
|
||||
and ns.fllowernum <=#{hostInfoDTO.fllowernumMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.fllowernumMin != null and hostInfoDTO.fllowernumMax != null " >
|
||||
and new_hosts.fllowernum between #{hostInfoDTO.fllowernumMin,jdbcType=INTEGER} and #{hostInfoDTO.fllowernumMax,jdbcType=INTEGER}
|
||||
and ns.fllowernum between #{hostInfoDTO.fllowernumMin,jdbcType=INTEGER} and #{hostInfoDTO.fllowernumMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 主播在线人数筛选-->
|
||||
<if test="hostInfoDTO.onlineFansMin != null and hostInfoDTO.onlineFansMax == null ">
|
||||
and new_hosts.online_fans >=#{hostInfoDTO.onlineFansMin,jdbcType=INTEGER}
|
||||
and ns.online_fans >=#{hostInfoDTO.onlineFansMin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.onlineFansMax != null and hostInfoDTO.onlineFansMin == null ">
|
||||
and new_hosts.online_fans <=#{hostInfoDTO.onlineFansMax,jdbcType=INTEGER}
|
||||
and ns.online_fans <=#{hostInfoDTO.onlineFansMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="hostInfoDTO.onlineFansMin != null and hostInfoDTO.onlineFansMax != null " >
|
||||
and new_hosts.online_fans between #{hostInfoDTO.onlineFansMin,jdbcType=INTEGER} and #{hostInfoDTO.onlineFansMax,jdbcType=INTEGER}
|
||||
and ns.online_fans between #{hostInfoDTO.onlineFansMin,jdbcType=INTEGER} and #{hostInfoDTO.onlineFansMax,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 邀请类筛选 -->
|
||||
<if test="hostInfoDTO.invitationType != null">
|
||||
and new_hosts.Invitation_type =#{hostInfoDTO.invitationType,jdbcType=INTEGER}
|
||||
and ns.Invitation_type =#{hostInfoDTO.invitationType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 排序类型 -->
|
||||
order by
|
||||
<choose>
|
||||
<!-- 传空和默认的情况下按照时间降序排序 -->
|
||||
<when test="hostInfoDTO.sortName == '' and hostInfoDTO.sortName == null ">
|
||||
new_hosts.create_time desc
|
||||
ns.create_time desc
|
||||
</when>
|
||||
<!-- sortNmae 有值的情况下排序 -->
|
||||
<when test="hostInfoDTO.sortName != null and hostInfoDTO.sort != null ">
|
||||
<!-- 昨日主播金币条件排序 -->
|
||||
<if test="hostInfoDTO.sortName == 'yesterdayCoins' and hostInfoDTO.sort != null">
|
||||
new_hosts.yesterday_coins ${hostInfoDTO.sort}
|
||||
ns.yesterday_coins ${hostInfoDTO.sort}
|
||||
</if>
|
||||
<!-- 主播金币条件排序 -->
|
||||
<if test="hostInfoDTO.sortName == 'hostsCoins' and hostInfoDTO.sort != null">
|
||||
new_hosts.hosts_coins ${hostInfoDTO.sort}
|
||||
ns.hosts_coins ${hostInfoDTO.sort}
|
||||
</if>
|
||||
<!-- 主播粉丝条件排序 -->
|
||||
<if test="hostInfoDTO.sortName == 'fans' and hostInfoDTO.sort != null">
|
||||
new_hosts.fans ${hostInfoDTO.sort}
|
||||
ns.fans ${hostInfoDTO.sort}
|
||||
</if>
|
||||
<!-- 主播关注数量排序 -->
|
||||
<if test="hostInfoDTO.sortName == 'fllowernum' and hostInfoDTO.sort != null">
|
||||
new_hosts.fllowernum ${hostInfoDTO.sort}
|
||||
ns.fllowernum ${hostInfoDTO.sort}
|
||||
</if>
|
||||
<!-- 主播直播间在线数量排序 -->
|
||||
<if test="hostInfoDTO.sortName == 'onlineFans' and hostInfoDTO.sort != null">
|
||||
new_hosts.online_fnas ${hostInfoDTO.sort}
|
||||
ns.online_fnas ${hostInfoDTO.sort}
|
||||
</if>
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
Reference in New Issue
Block a user