审批同意后,推送订阅消息

This commit is contained in:
chenglijuan
2026-04-24 09:31:22 +08:00
parent ec461fd1f4
commit c88b047d01
6 changed files with 132 additions and 89 deletions
@@ -76,14 +76,14 @@ public class AppointmentService {
visitApplicationMapper.insert(record);
log.info("创建预约成功, id={}", record.getId());
// 推送订阅消息
try {
wxSubscribeMessageService.sendSubscribeMessage(
record.getOpenid(), record.getName(), record.getReason(),
formatVisitTime(record), record.getArea(), "待审核");
} catch (Exception e) {
log.error("订阅消息推送失败", e);
}
// // 推送订阅消息
// try {
// wxSubscribeMessageService.sendSubscribeMessage(
// record.getOpenid(), record.getName(), record.getReason(),
// formatVisitTime(record), record.getArea(), "待审核");
// } catch (Exception e) {
// log.error("订阅消息推送失败", e);
// }
return record;
}
@@ -140,12 +140,4 @@ public class AppointmentService {
return true;
}
/** 拼接访问日期+时间 */
private String formatVisitTime(VisitApplication record) {
String time = record.getVisitDate();
if (record.getVisitTime() != null && !record.getVisitTime().isEmpty()) {
time = record.getVisitDate() + " " + record.getVisitTime();
}
return time;
}
}