1.添加主播 UID字段,修复筛选用户

This commit is contained in:
2025-07-02 14:20:28 +08:00
parent ae65dbdd07
commit c8fcdc83b1
6 changed files with 64 additions and 54 deletions

View File

@@ -69,4 +69,7 @@ public class EmployeeHostsRespVO {
@Schema(description = "备注", example = "1")
private String remake;
@Schema(description = "uid", example = "1")
private String uid;
}

View File

@@ -68,4 +68,8 @@ public class NewHostsRespVO {
@ExcelProperty("用户 Id")
private Long userId;
@Schema(description = "uid", example = "10967")
@ExcelProperty("UId")
private String uid;
}

View File

@@ -78,4 +78,6 @@ public class EmployeeHostsDO extends BaseDO {
private Integer operationStatus;
private String remake;
private String uid;
}

View File

@@ -77,5 +77,5 @@ public class NewHostsDO extends TenantBaseDO {
*/
private Long userId;
private String uid;
}

View File

@@ -180,10 +180,10 @@
<select id="selectPageWithXML" resultType="cn.iocoder.yudao.module.tkdata.dal.dataobject.employeehosts.EmployeeHostsDO">
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status,user_id from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status,user_id,uid from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
WHERE tenant_id = #{req.tenantId,jdbcType=BIGINT}
<!-- 筛选员工名下主播 -->
<if test="req.userId != null and req.userId != ''">
<if test="req.userId != null ">
and user_id = #{req.userId,jdbcType=BIGINT}
</if>
<!-- 主播国家筛选 -->
@@ -206,50 +206,50 @@
and ns.hosts_level =#{req.hostsLevel,jdbcType=VARCHAR}
</if>
<!-- 今日主播金币筛选 -->
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax == null and req.hostsCoinsMax != '' ">
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax == null ">
and ns.hosts_coins >=#{req.hostsCoinsMin,jdbcType=INTEGER}
</if>
<if test="req.hostsCoinsMax != null and req.hostsCoinsMin == null and req.hostsCoinsMin !='' ">
<if test="req.hostsCoinsMax != null and req.hostsCoinsMin == null ">
and ns.hosts_coins &lt;=#{req.hostsCoinsMax,jdbcType=INTEGER}
</if>
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax != null " >
and ns.hosts_coins between #{req.hostsCoinsMin,jdbcType=INTEGER} and #{req.hostsCoinsMax,jdbcType=INTEGER}
</if>
<!-- 昨日主播金币筛选 -->
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax == null and req.yesterdayCoinsMax != ''">
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax == null ">
and ns.yesterday_coins >=#{req.yesterdayCoinsMin,jdbcType=INTEGER}
</if>
<if test="req.yesterdayCoinsMax != null and req.yesterdayCoinsMin == null and req.yesterdayCoinsMin != '' ">
<if test="req.yesterdayCoinsMax != null and req.yesterdayCoinsMin == null ">
and ns.yesterday_coins &lt;=#{req.yesterdayCoinsMax,jdbcType=INTEGER}
</if>
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax != null " >
and ns.yesterday_coins between #{req.yesterdayCoinsMin,jdbcType=INTEGER} and #{req.yesterdayCoinsMax,jdbcType=INTEGER}
</if>
<!-- 主播粉丝数筛选-->
<if test="req.fansMin != null and req.fansMax == null and req.fansMax != ''">
<if test="req.fansMin != null and req.fansMax == null ">
and ns.fans >=#{req.fansMin,jdbcType=INTEGER}
</if>
<if test="req.fansMax != null and req.fansMin == null and req.fansMin != '' ">
<if test="req.fansMax != null and req.fansMin == null ">
and ns.fans &lt;=#{req.fansMax,jdbcType=INTEGER}
</if>
<if test="req.fansMin != null and req.fansMax != null " >
and ns.fans between #{req.fansMin,jdbcType=INTEGER} and #{req.fansMax,jdbcType=INTEGER}
</if>
<!-- 主播关注筛选-->
<if test="req.fllowernumMin != null and req.fllowernumMax == null and req.fllowernumMax != ''">
<if test="req.fllowernumMin != null and req.fllowernumMax == null ">
and ns.fllowernum >=#{req.fllowernumMin,jdbcType=INTEGER}
</if>
<if test="req.fllowernumMax != null and req.fllowernumMin == null and req.fllowernumMin != ''">
<if test="req.fllowernumMax != null and req.fllowernumMin == null ">
and ns.fllowernum &lt;=#{req.fllowernumMax,jdbcType=INTEGER}
</if>
<if test="req.fllowernumMin != null and req.fllowernumMax != null " >
and ns.fllowernum between #{req.fllowernumMin,jdbcType=INTEGER} and #{req.fllowernumMax,jdbcType=INTEGER}
</if>
<!-- 主播在线人数筛选-->
<if test="req.onlineFansMin != null and req.onlineFansMax == null and req.onlineFansMax != '' ">
<if test="req.onlineFansMin != null and req.onlineFansMax == null ">
and ns.online_fans >=#{req.onlineFansMin,jdbcType=INTEGER}
</if>
<if test="req.onlineFansMax != null and req.onlineFansMin == null and req.onlineFansMin != ''">
<if test="req.onlineFansMax != null and req.onlineFansMin == null ">
and ns.online_fans &lt;= #{req.onlineFansMax,jdbcType=INTEGER}
</if>
<if test="req.onlineFansMin != null and req.onlineFansMax != null " >

View File

@@ -12,13 +12,13 @@
<select id="selectPageWithXML" resultType="cn.iocoder.yudao.module.tkdata.dal.dataobject.newhosts.NewHostsDO">
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
yesterday_coins,ns.create_time, country, online_fans,hosts_kind ,is_assigned from server_new_hosts ns left join server_country_info ci ON ns.country = ci.country_name
yesterday_coins,ns.create_time, country, online_fans,hosts_kind ,is_assigned,uid from server_new_hosts ns left join server_country_info ci ON ns.country = ci.country_name
WHERE tenant_id =#{req.tenantId,jdbcType=BIGINT}
<!-- 主播国家筛选 -->
<if test="req.country!= '' and req.country != null">
and ci.country_group_name =#{req.country,jdbcType=VARCHAR}
</if>
<if test="req.userId != null and req.userId != ''" >
<if test="req.userId != null " >
and ns.user_id =#{req.userId,jdbcType=BIGINT}
</if>
<!-- 按照入库时间筛选主播 -->
@@ -30,7 +30,7 @@
and ns.hosts_id like concat(#{req.hostsId,jdbcType=VARCHAR},'%')
</if>
<!-- 是否分配筛选 -->
<if test="req.isAssigned != null and req.isAssigned != ''">
<if test="req.isAssigned != null ">
and ns.is_assigned =#{req.isAssigned,jdbcType=INTEGER}
</if>
<!-- 主播等级筛选 -->
@@ -38,50 +38,50 @@
and ns.hosts_level =#{req.hostsLevel,jdbcType=VARCHAR}
</if>
<!-- 今日主播金币筛选 -->
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax == null and req.hostsCoinsMax != '' ">
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax == null ">
and ns.hosts_coins >=#{req.hostsCoinsMin,jdbcType=INTEGER}
</if>
<if test="req.hostsCoinsMax != null and req.hostsCoinsMin == null and req.hostsCoinsMin !='' ">
<if test="req.hostsCoinsMax != null and req.hostsCoinsMin == null ">
and ns.hosts_coins &lt;=#{req.hostsCoinsMax,jdbcType=INTEGER}
</if>
<if test="req.hostsCoinsMin != null and req.hostsCoinsMax != null " >
and ns.hosts_coins between #{req.hostsCoinsMin,jdbcType=INTEGER} and #{req.hostsCoinsMax,jdbcType=INTEGER}
</if>
<!-- 昨日主播金币筛选 -->
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax == null and req.yesterdayCoinsMax != ''">
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax == null ">
and ns.yesterday_coins >=#{req.yesterdayCoinsMin,jdbcType=INTEGER}
</if>
<if test="req.yesterdayCoinsMax != null and req.yesterdayCoinsMin == null and req.yesterdayCoinsMin != '' ">
<if test="req.yesterdayCoinsMax != null and req.yesterdayCoinsMin == null ">
and ns.yesterday_coins &lt;=#{req.yesterdayCoinsMax,jdbcType=INTEGER}
</if>
<if test="req.yesterdayCoinsMin != null and req.yesterdayCoinsMax != null " >
and ns.yesterday_coins between #{req.yesterdayCoinsMin,jdbcType=INTEGER} and #{req.yesterdayCoinsMax,jdbcType=INTEGER}
</if>
<!-- 主播粉丝数筛选-->
<if test="req.fansMin != null and req.fansMax == null and req.fansMax != ''">
<if test="req.fansMin != null and req.fansMax == null ">
and ns.fans >=#{req.fansMin,jdbcType=INTEGER}
</if>
<if test="req.fansMax != null and req.fansMin == null and req.fansMin != '' ">
<if test="req.fansMax != null and req.fansMin == null ">
and ns.fans &lt;=#{req.fansMax,jdbcType=INTEGER}
</if>
<if test="req.fansMin != null and req.fansMax != null " >
and ns.fans between #{req.fansMin,jdbcType=INTEGER} and #{req.fansMax,jdbcType=INTEGER}
</if>
<!-- 主播关注筛选-->
<if test="req.fllowernumMin != null and req.fllowernumMax == null and req.fllowernumMax != ''">
<if test="req.fllowernumMin != null and req.fllowernumMax == null">
and ns.fllowernum >=#{req.fllowernumMin,jdbcType=INTEGER}
</if>
<if test="req.fllowernumMax != null and req.fllowernumMin == null and req.fllowernumMin != ''">
<if test="req.fllowernumMax != null and req.fllowernumMin == null ">
and ns.fllowernum &lt;=#{req.fllowernumMax,jdbcType=INTEGER}
</if>
<if test="req.fllowernumMin != null and req.fllowernumMax != null " >
and ns.fllowernum between #{req.fllowernumMin,jdbcType=INTEGER} and #{req.fllowernumMax,jdbcType=INTEGER}
</if>
<!-- 主播在线人数筛选-->
<if test="req.onlineFansMin != null and req.onlineFansMax == null and req.onlineFansMax != '' ">
<if test="req.onlineFansMin != null and req.onlineFansMax == null ">
and ns.online_fans >=#{req.onlineFansMin,jdbcType=INTEGER}
</if>
<if test="req.onlineFansMax != null and req.onlineFansMin == null and req.onlineFansMin != ''">
<if test="req.onlineFansMax != null and req.onlineFansMin == null ">
and ns.online_fans &lt;= #{req.onlineFansMax,jdbcType=INTEGER}
</if>
<if test="req.onlineFansMin != null and req.onlineFansMax != null " >
@@ -92,37 +92,38 @@
and ns.Invitation_type =#{req.invitationType,jdbcType=INTEGER}
</if>
<!-- 排序类型 -->
<!-- 排序类型 -->
order by
<choose>
<!-- 传空和默认的情况下按照时间降序排序 -->
<when test="req.sortName == '' and req.sortName == null">
ns.create_time desc
<!-- 传空和默认的情况下按照时间降序排序 -->
<when test="req.sortName == null or req.sortName == ''">
ns.create_time desc
</when>
<!-- sortNmae 有值的情况下排序 -->
<when test="req.sortName != null and req.sort != null ">
<if test="req.sortName == 'createTime' and req.sort != null">
ns.create_time ${req.sort}
</if>
<!-- 昨日主播金币条件排序 -->
<if test="req.sortName == 'yesterdayCoins' and req.sort != null">
ns.yesterday_coins ${req.sort}
</if>
<!-- 主播金币条件排序 -->
<if test="req.sortName == 'hostsCoins' and req.sort != null">
ns.hosts_coins ${req.sort}
</if>
<!-- 主播粉丝条件排序 -->
<if test="req.sortName == 'fans' and req.sort != null">
ns.fans ${req.sort}
</if>
<!-- 主播关注数量排序 -->
<if test="req.sortName == 'fllowernum' and req.sort != null">
ns.fllowernum ${req.sort}
</if>
<!-- 主播直播间在线数量排序 -->
<if test="req.sortName == 'onlineFans' and req.sort != null">
ns.online_fans ${req.sort}
</if>
<!-- sortName 有值的情况下排序 -->
<when test="req.sortName != null and req.sort != null">
<choose>
<when test="req.sortName == 'createTime'">
ns.create_time ${req.sort}
</when>
<when test="req.sortName == 'yesterdayCoins'">
ns.yesterday_coins ${req.sort}
</when>
<when test="req.sortName == 'hostsCoins'">
ns.hosts_coins ${req.sort}
</when>
<when test="req.sortName == 'fans'">
ns.fans ${req.sort}
</when>
<when test="req.sortName == 'fllowernum'">
ns.fllowernum ${req.sort}
</when>
<when test="req.sortName == 'onlineFans'">
ns.online_fans ${req.sort}
</when>
<otherwise>
ns.create_time desc
</otherwise>
</choose>
</when>
<otherwise>
ns.create_time desc