feat:新增素材上传完成通知用户订阅消息
This commit is contained in:
+21
-2
@@ -194,6 +194,7 @@ public class OrderStatusChangeListener {
|
||||
*/
|
||||
private void handleOrderComplete(Order order) {
|
||||
try {
|
||||
|
||||
// 1. 检查是否开启一键成片
|
||||
QrCode qrCode = qrCodeService.getByCodeId(order.getCodeId());
|
||||
if (!isVideoEditEnabled(qrCode)) {
|
||||
@@ -218,16 +219,34 @@ public class OrderStatusChangeListener {
|
||||
task.setStatus(EditTaskStatus.PROCESSING);
|
||||
editTaskService.saveOrUpdateTask(task);
|
||||
|
||||
// 发送小程序订阅消息,用户素材上传完成
|
||||
SysUser sysUser = userCenterService.findUserById(order.getUserId());
|
||||
Tourism tourism = tourismService.getTourismById(order.getTourismId());
|
||||
if (sysUser.getOpenId() != null) {
|
||||
|
||||
String tip = "素材上传完成";
|
||||
String orderName = tourism.getTourismName();
|
||||
String pageUrl = "pages/task/task";
|
||||
wxMiniSubscribeService.sendServiceProcessMsg(
|
||||
sysUser.getOpenId(),
|
||||
orderName,
|
||||
tip,
|
||||
order.getOrderNo(),
|
||||
DateUtils.sdf.format(order.getPayTime()),
|
||||
"",
|
||||
pageUrl
|
||||
);
|
||||
}
|
||||
|
||||
// 新增:查找下一个排队用户
|
||||
Order nextOrder = orderService.getNextQueueOrder(order.getTourismId(), order.getId());
|
||||
if (nextOrder != null) {
|
||||
SysUser nextUser = userCenterService.findUserById(nextOrder.getUserId());
|
||||
Tourism tourism = tourismService.getTourismById(nextOrder.getTourismId());
|
||||
if (nextUser != null && nextUser.getOpenId() != null && tourism != null) {
|
||||
String activityName = tourism.getTourismName(); // 活动名称
|
||||
String remark = "即将为您进行拍摄服务";
|
||||
String activityNo = nextOrder.getOrderNo(); // 活动编号
|
||||
String pageUrl = "pages/task/task";
|
||||
String pageUrl = "pages/album/album";
|
||||
wxMiniSubscribeService.sendServiceProcessMsg(
|
||||
nextUser.getOpenId(),
|
||||
activityName,
|
||||
|
||||
Reference in New Issue
Block a user