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);
|
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||||
|
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
||||||
.filter(item -> {
|
.filter(item -> {
|
||||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||||
|
if (device == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Integer.valueOf(1).equals(device.getStatus());
|
return Integer.valueOf(1).equals(device.getStatus());
|
||||||
})
|
})
|
||||||
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
|
||||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||||
if (sourcesMap.isEmpty()) {
|
if (sourcesMap.isEmpty()) {
|
||||||
// 主动禁止没有视频源视频生成
|
// 主动禁止没有视频源视频生成
|
||||||
|
@@ -83,7 +83,17 @@ public class DownloadNotificationTasker {
|
|||||||
videoMap.put("value", title);
|
videoMap.put("value", title);
|
||||||
dataParam.put("thing1", videoMap);
|
dataParam.put("thing1", videoMap);
|
||||||
Map<String, String> remarkMap = new HashMap<>();
|
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);
|
dataParam.put("thing3", remarkMap);
|
||||||
params.put("data", dataParam);
|
params.put("data", dataParam);
|
||||||
params.put("page", page);
|
params.put("page", page);
|
||||||
@@ -97,7 +107,7 @@ public class DownloadNotificationTasker {
|
|||||||
@Scheduled(cron = "0 0 20 * * *")
|
@Scheduled(cron = "0 0 20 * * *")
|
||||||
public void sendExpireNotification() {
|
public void sendExpireNotification() {
|
||||||
log.info("开始执行定时任务");
|
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 -> {
|
.forEach(item -> {
|
||||||
if (item.getIsBuy() == 1) {
|
if (item.getIsBuy() == 1) {
|
||||||
return;
|
return;
|
||||||
|
@@ -65,8 +65,8 @@
|
|||||||
FROM `t_stats_record` r
|
FROM `t_stats_record` r
|
||||||
left join `t_stats` s on r.trace_id=s.trace_id
|
left join `t_stats` s on r.trace_id=s.trace_id
|
||||||
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
where r.trace_id in (select trace_id from `t_stats_record` where action = 'ENTER_SCENIC' and `identifier`=#{scenicId})
|
||||||
and action = 'CLICK'
|
and action = 'PAYMENT'
|
||||||
and identifier = 'BUY'
|
and (identifier = 'PAY_REQ' or identifier = 'PAY_BATCH_REQ' or identifier = 'PAY_SOURCE_REQ' or identifier = 'PAY_BATCH_REQ')
|
||||||
<if test="startTime!= null">
|
<if test="startTime!= null">
|
||||||
and s.create_time >= #{startTime}
|
and s.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
Reference in New Issue
Block a user