You've already forked FrameTour-BE
1
This commit is contained in:
@@ -7,6 +7,7 @@ import com.ycwl.basic.model.pc.member.resp.MemberRespVO;
|
||||
import com.ycwl.basic.model.pc.mp.MpConfigEntity;
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicConfigEntity;
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicEntity;
|
||||
import com.ycwl.basic.model.pc.template.resp.TemplateRespVO;
|
||||
import com.ycwl.basic.notify.NotifyFactory;
|
||||
import com.ycwl.basic.notify.adapters.INotifyAdapter;
|
||||
import com.ycwl.basic.notify.entity.NotifyContent;
|
||||
@@ -34,6 +35,8 @@ public class DownloadNotificationTasker {
|
||||
private VideoMapper videoMapper;
|
||||
@Autowired
|
||||
private MemberMapper memberMapper;
|
||||
@Autowired
|
||||
private TemplateRepository templateRepository;
|
||||
|
||||
@Scheduled(cron = "0 0 21 * * *")
|
||||
public void sendDownloadNotification() {
|
||||
@@ -45,6 +48,7 @@ public class DownloadNotificationTasker {
|
||||
}
|
||||
MemberRespVO member = memberMapper.getById(item.getMemberId());
|
||||
MpConfigEntity scenicMp = scenicRepository.getScenicMpConfig(member.getScenicId());
|
||||
TemplateRespVO template = templateRepository.getTemplate(item.getTemplateId());
|
||||
// 发送模板消息
|
||||
String templateId = scenicRepository.getVideoDownloadTemplateId(item.getScenicId());
|
||||
if (StringUtils.isBlank(templateId)) {
|
||||
@@ -53,7 +57,7 @@ public class DownloadNotificationTasker {
|
||||
}
|
||||
log.info("发送模板消息");
|
||||
ScenicEntity scenic = scenicRepository.getScenic(item.getScenicId());
|
||||
String title = "您在【" + scenic.getName() + "】的专属影像";
|
||||
String title = "您在【" + template.getName() + "】的专属影像";
|
||||
String page = "pages/videoSynthesis/buy?scenicId=" + item.getScenicId() + "&faceId=" + item.getFaceId() + "&id=" + item.getVideoId();
|
||||
/**
|
||||
* 景区 {{thing1.DATA}}
|
||||
@@ -90,13 +94,14 @@ public class DownloadNotificationTasker {
|
||||
Integer videoStoreDay = scenicConfig.getVideoStoreDay();
|
||||
// 发送模板消息
|
||||
String templateId = scenicRepository.getVideoPreExpireTemplateId(item.getScenicId());
|
||||
TemplateRespVO template = templateRepository.getTemplate(item.getTemplateId());
|
||||
if (StringUtils.isBlank(templateId)) {
|
||||
log.info("模板消息为空");
|
||||
return;
|
||||
}
|
||||
log.info("发送模板消息");
|
||||
ScenicEntity scenic = scenicRepository.getScenic(item.getScenicId());
|
||||
String title = "您在【" + scenic.getName() + "】的专属影像";
|
||||
String title = "您在【" + template.getName() + "】的专属影像";
|
||||
String page = "pages/videoSynthesis/buy?scenicId=" + item.getScenicId() + "&faceId=" + item.getFaceId() + "&id=" + item.getVideoId();
|
||||
/**
|
||||
* 影像名称 {{thing1.DATA}}
|
||||
|
Reference in New Issue
Block a user