Commit e2d74c357a9df83c25162940d37ecd04dd274c3b
1 parent
d3b2f7e0
2022年7月28日14:26:46 修复视频粉丝数指标判断写错
Showing
4 changed files
with
10 additions
and
8 deletions
fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java
... | ... | @@ -85,7 +85,7 @@ public class OtherController { |
85 | 85 | * @return |
86 | 86 | */ |
87 | 87 | @GetMapping("/processDir") |
88 | - public Message<Boolean> mkdir(@NotBlank(message = "请必须指定路径") String dir, @NotNull(message = "请必须指定操作类型") Integer type) { | |
88 | + public Message<Boolean> processDir(@NotBlank(message = "请必须指定路径") String dir, @NotNull(message = "请必须指定操作类型") Integer type) { | |
89 | 89 | File file = new File(dir); |
90 | 90 | Boolean result = null; |
91 | 91 | String handleType = ""; |
... | ... | @@ -100,7 +100,7 @@ public class OtherController { |
100 | 100 | else if(file.isFile()) |
101 | 101 | result = file.delete(); |
102 | 102 | } |
103 | - log.info(String.format("%s文件夹, 路径为: %s, 结果为: %s", handleType, dir, Objects.isNull(result) ? "未执行" : (result ? "成功" : "失败"))); | |
103 | + log.info(String.format("%s文件或文件夹, 路径为: %s, 结果为: %s", handleType, dir, Objects.isNull(result) ? "未执行" : (result ? "成功" : "失败"))); | |
104 | 104 | return success(result); |
105 | 105 | } |
106 | 106 | ... | ... |
fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/web/ActivityThemeController.java
... | ... | @@ -24,6 +24,7 @@ import javax.validation.Valid; |
24 | 24 | import javax.validation.constraints.NotNull; |
25 | 25 | import java.util.Date; |
26 | 26 | import java.util.List; |
27 | +import java.util.Objects; | |
27 | 28 | |
28 | 29 | import static cn.fw.common.web.util.ResultBuilder.success; |
29 | 30 | |
... | ... | @@ -113,7 +114,7 @@ public class ActivityThemeController { |
113 | 114 | @GetMapping("/listByMonth") |
114 | 115 | @ControllerMethod("查询指定月活动主题列表") |
115 | 116 | public Message<List<ActivityThemeVo>> listByMonth(@CurrentUser LoginAuthBean user, Long timeStamp) { |
116 | - return success(activityThemeService.listByMonth(user, timeStamp)); | |
117 | + return success(activityThemeService.listByMonth(user, Objects.isNull(timeStamp) ? System.currentTimeMillis() : timeStamp)); | |
117 | 118 | } |
118 | 119 | |
119 | 120 | /** | ... | ... |
fw-dalaran-service/src/main/java/cn/fw/dalaran/service/biz/CommonBizService.java
... | ... | @@ -433,7 +433,7 @@ public class CommonBizService { |
433 | 433 | if (!Objects.equals(PlatformEnum.BILIBILI.getValue(), platformEnum.getValue())) {// bilibili视频[不过滤]增粉指标 |
434 | 434 | final ValidConfigNew newFansCntConfig = configList.get(5);// 增粉数 |
435 | 435 | if (newFansCntConfig.getValid() > 0) { |
436 | - final Integer newFansCnt = video.getShareNum(); | |
436 | + final Integer newFansCnt = video.getNewFanNum(); | |
437 | 437 | if (Objects.isNull(newFansCnt)) { |
438 | 438 | log.error(String.format("%s[增粉数]数据为空", format)); |
439 | 439 | } else { | ... | ... |
fw-dalaran-service/src/main/java/cn/fw/dalaran/service/data/impl/ActivityThemeServiceImpl.java
... | ... | @@ -262,8 +262,9 @@ public class ActivityThemeServiceImpl extends ServiceImpl<ActivityThemeDao, Acti |
262 | 262 | */ |
263 | 263 | @Override |
264 | 264 | public List<ActivityThemeVo> listByMonth(LoginAuthBean user, Long timeStamp) { |
265 | - Date startTime = DateUtil.getMonthFirstDay(DateUtil.getBeginInTime(new Date(timeStamp))); | |
266 | - Date endTime = DateUtil.getMonthEndDay(DateUtil.getEndInTime(new Date(timeStamp))); | |
265 | + Date date = new Date(timeStamp);// 时间戳指定时间 | |
266 | + Date startTime = DateUtil.getMonthFirstDay(DateUtil.getBeginInTime(date)); | |
267 | + Date endTime = DateUtil.getMonthEndDay(DateUtil.getEndInTime(date)); | |
267 | 268 | Date yesterdayNow = new Date(System.currentTimeMillis() - 24 * 3600 * 1000L); |
268 | 269 | if (endTime.compareTo(yesterdayNow) >= 0) |
269 | 270 | endTime = yesterdayNow; |
... | ... | @@ -421,7 +422,7 @@ public class ActivityThemeServiceImpl extends ServiceImpl<ActivityThemeDao, Acti |
421 | 422 | * @param item 待处理的活动主题 |
422 | 423 | */ |
423 | 424 | private void peekActivityThemeVo(ActivityThemeVo item) { |
424 | - item.setCanAlter(!this.themeHaveStopCatchData(item.getEndTime(), 0)); | |
425 | + item.setCanAlter(!this.themeHaveStopCatchData(item.getEndTime(), 0));// 标识是否结束数据抓取 | |
425 | 426 | item.setAllFileDesc(Optional.ofNullable( |
426 | 427 | themeFileService.lambdaQuery() |
427 | 428 | .eq(ThemeFile::getThemeId, item.getId()) |
... | ... | @@ -431,7 +432,7 @@ public class ActivityThemeServiceImpl extends ServiceImpl<ActivityThemeDao, Acti |
431 | 432 | .stream() |
432 | 433 | .map(ThemeFile::toVO) |
433 | 434 | .collect(Collectors.toList()) |
434 | - ); | |
435 | + );// 设置文件信息 | |
435 | 436 | } |
436 | 437 | |
437 | 438 | } | ... | ... |