You've already forked FrameTour-BE
2
This commit is contained in:
@@ -234,11 +234,14 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
||||
.filter(item -> {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
if (device == null) {
|
||||
return false;
|
||||
}
|
||||
return Integer.valueOf(1).equals(device.getStatus());
|
||||
})
|
||||
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||
if (sourcesMap.isEmpty()) {
|
||||
// 主动禁止没有视频源视频生成
|
||||
|
@@ -83,7 +83,17 @@ public class DownloadNotificationTasker {
|
||||
videoMap.put("value", title);
|
||||
dataParam.put("thing1", videoMap);
|
||||
Map<String, String> remarkMap = new HashMap<>();
|
||||
remarkMap.put("value", "系统删除前,请下载好您的旅行视频");
|
||||
// 查询是否有优惠券可用,如果有,则显示优惠券配置的内容
|
||||
CouponQueryReq query = new CouponQueryReq();
|
||||
query.setScenicId(item.getScenicId());
|
||||
query.setType(2);
|
||||
query.setStatus(1);
|
||||
List<CouponRespVO> coupons = couponMapper.selectByQuery(query);
|
||||
if (coupons.isEmpty() || StringUtils.isBlank(coupons.getFirst().getBroadcast())) {
|
||||
remarkMap.put("value", "系统删除前,请下载好您的旅行视频");
|
||||
} else {
|
||||
remarkMap.put("value", coupons.getFirst().getBroadcast());
|
||||
}
|
||||
dataParam.put("thing3", remarkMap);
|
||||
params.put("data", dataParam);
|
||||
params.put("page", page);
|
||||
@@ -97,7 +107,7 @@ public class DownloadNotificationTasker {
|
||||
@Scheduled(cron = "0 0 20 * * *")
|
||||
public void sendExpireNotification() {
|
||||
log.info("开始执行定时任务");
|
||||
videoMapper.listRelationByCreateTime(new Date(System.currentTimeMillis() - 3 * 24 * 60 * 60 * 1000), new Date(System.currentTimeMillis() - 2 * 24 * 60 * 60 * 1000))
|
||||
videoMapper.listRelationByCreateTime(new Date(System.currentTimeMillis() - 2 * 24 * 60 * 60 * 1000), new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000))
|
||||
.forEach(item -> {
|
||||
if (item.getIsBuy() == 1) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user