Compare commits
3 Commits
40c0f96518
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| fe48dfe3a1 | |||
| d5c51a80c6 | |||
| aa905d47ac |
@@ -148,4 +148,7 @@ public class NewHostsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "国家英文名", example = "United States")
|
||||
private String countryEng;
|
||||
|
||||
@Schema(description = "最近 7天 是否存在直播场次", example = "0")
|
||||
private Integer hasLiveRecoder;
|
||||
}
|
||||
@@ -107,6 +107,29 @@
|
||||
<if test="req.invitationType != null">
|
||||
and ns.Invitation_type =#{req.invitationType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 判断主播是否有直播场次 -->
|
||||
<if test="req.hasLiveRecoder != null">
|
||||
<choose>
|
||||
<when test="req.hasLiveRecoder == 0">
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM server_live_host_detail ld
|
||||
WHERE ld.deleted = 0
|
||||
AND ld.tenant_id = ns.tenant_id
|
||||
AND ld.hosts_id = ns.hosts_id
|
||||
)
|
||||
</when>
|
||||
<when test="req.hasLiveRecoder == 1">
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM server_live_host_detail ld
|
||||
WHERE ld.deleted = 0
|
||||
AND ld.tenant_id = ns.tenant_id
|
||||
AND ld.hosts_id = ns.hosts_id
|
||||
)
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<!-- 排序类型 -->
|
||||
group by
|
||||
ns.hosts_id
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;/*
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class disableWebAIExpiredAccount implements JobHandler{
|
||||
public class DisableWebAIExpiredAccount implements JobHandler{
|
||||
|
||||
/**
|
||||
* 租户数据访问对象
|
||||
@@ -44,7 +44,7 @@ public class disableWebAIExpiredAccount implements JobHandler{
|
||||
Long tenantId = TenantContextHolder.getTenantId();
|
||||
TenantDO tenant = tenantMapper.selectById(tenantId);
|
||||
if (tenant.getExpireTime()!=null) {
|
||||
Duration brotherDuration = LocalDateTimeUtil.between(tenant.getExpireTime(), LocalDateTime.now());
|
||||
Duration brotherDuration = LocalDateTimeUtil.between(tenant.getAiExpireTime(), LocalDateTime.now());
|
||||
long minutes = brotherDuration.toMinutes();
|
||||
LambdaQueryWrapper<AdminUserDO> aiUserQueryWrapper = new LambdaQueryWrapper<>();
|
||||
aiUserQueryWrapper.eq(AdminUserDO::getTenantId, tenantId);
|
||||
@@ -56,7 +56,7 @@ public class disableWebAIExpiredAccount implements JobHandler{
|
||||
adminUserDO.setWebAi((byte) 0);
|
||||
userMapper.updateById(adminUserDO);
|
||||
aiAccountNum++;
|
||||
log.info("禁用过期爬虫账号,账号ID:{}", adminUserDO.getId());
|
||||
log.info("禁用过期WebAI账号,账号ID:{}", adminUserDO.getId());
|
||||
}
|
||||
}
|
||||
// 返回操作结果:包含禁用的AI账号和大哥账号数量统计
|
||||
Reference in New Issue
Block a user