From c56b5be42b8ce8f3908847495a66eb628a629fc9 Mon Sep 17 00:00:00 2001 From: 王明元 <97082371@qq.com> Date: Sat, 24 Dec 2022 15:25:37 +0800 Subject: [PATCH] 2022年12月24日15:25:19 --- fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java | 9 +++------ fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java | 3 ++- fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java | 7 ++++--- fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java | 33 ++++++++++++++++++++++----------- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java index 316df93..35615a9 100644 --- a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java +++ b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java @@ -5,8 +5,6 @@ import cn.fw.common.web.auth.LoginAuthBean; import cn.fw.common.web.auth.annotation.CurrentUser; import cn.fw.dalaran.domain.param.LiveCheckParams; import cn.fw.dalaran.domain.vo.LiveCheckVo; -import cn.fw.dalaran.rpc.erp.UserRoleRpcService; -import cn.fw.dalaran.server.task.TodoTask; import cn.fw.dalaran.service.Common; import cn.fw.dalaran.service.biz.OtherBizService; import cn.fw.data.base.domain.common.Message; @@ -43,8 +41,7 @@ public class OtherController { private final OtherBizService otherBizService; private final Common common; - private final UserRoleRpcService userRoleRpcService; - private final TodoTask todoTask;// 定时任务 + //private final TodoTask todoTask;// 定时任务 /** * 获取直播审计页面 @@ -114,10 +111,10 @@ public class OtherController { * @param timestamp 时间戳 * @return */ - @GetMapping("/resendLiveCheckBacklog") + /*@GetMapping("/resendLiveCheckBacklog") public Message test(@NotNull(message = "请必须指定时间戳") Long timestamp) { todoTask.sendLiveCheckBacklog(timestamp); return Message.success(); - } + }*/ } diff --git a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java index c11de0e..098ae4b 100644 --- a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java +++ b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/task/TodoTask.java @@ -164,7 +164,8 @@ public class TodoTask { .eq(LivePool::getValidLive, 11) .list();// 找到主题对应的所有人的最佳直播 final List waitCheckThemeIds = bestLives.stream() - .map(LivePool::getThemeId).distinct() + .map(LivePool::getThemeId) + .distinct() .collect(Collectors.toList());// 根据最佳直播分布, 找到(真正)需要审核的主题id集合 if (CollectionUtils.isEmpty(waitCheckThemeIds)) return; diff --git a/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java b/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java index 7f417ac..d73570f 100644 --- a/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java +++ b/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java @@ -781,8 +781,9 @@ public class CommonBizService { } public static void main(String[] args) { - String workTitle = "#长安汽车618闪购 #长安univ #自有引力"; - String setTopic = "#618厂店联动团购会#长安汽车618闪购#嗨购618团购会"; + System.out.println(System.getProperty("java.io.tmpdir")); + String workTitle = "#SL03全电数字轿跑"; + String setTopic = "#深蓝SL03燃油轿车进阶之选,#SL03全电数字轿跑,#SL03长续航低能耗,#SL03感受深蓝爱上电动,#SL03增程版燃油车终结者,#深蓝SL03无惧battle赢翻了,#市区纯电长途混动SL03增程版里程无忧,#都2022年了你还在买燃油车,#回个老家充n次电不如换一台长安深蓝1200km续航真的很绝".replace(",", ""); Set strings1 = processTags(workTitle); Set strings2 = processTags(setTopic); System.out.println(CollectionUtils.containsAny(strings1, strings2)); @@ -841,7 +842,7 @@ public class CommonBizService { resultSet.retainAll(configTags);// 交集 //resultSet.removeAll(configTags);// 差集 //resultSet.addAll(configTags);// 并集 - containsTag = resultSet.size() > 0; + containsTag = !resultSet.isEmpty(); } else {// LCS计算话题匹配度 for (String configTag : configTags) { for (String tag : tags) { diff --git a/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java b/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java index 730d59d..11231fa 100644 --- a/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java +++ b/fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java @@ -379,18 +379,29 @@ public class ActivityThemeServiceImpl extends ServiceImpl { try { File downloadFile = ImageUtils.convertFileByUrl("https://gate.feewee.cn/file/show?fid=" + item, item); -- libgit2 0.22.2