package cn.flightfeather.supervision.common.wx
|
|
import org.springframework.stereotype.Component
|
import java.time.LocalDateTime
|
import java.time.format.DateTimeFormatter
|
|
/**
|
* 微信消息推送
|
* @date 2024/9/10
|
* @author feiyu02
|
*/
|
@Component
|
class MessageManager(private val templateManager: TemplateManager) {
|
|
private val formatter = DateTimeFormatter.ofPattern("YYYY-MM-DD HH:mm:ss")
|
|
/********************环保日程提醒*****************************/
|
|
// 台账
|
fun sendLedger(openId: String, time: LocalDateTime, leftDay: Int) {
|
templateManager.sendMsg(0, openId, listOf(
|
"台账上传", time.format(formatter), leftDay.toString(),
|
"请重点关注现场自巡查部分"))
|
}
|
|
// 自评
|
fun sendAssessment(openId: String, time: LocalDateTime, leftDay: Int) {
|
templateManager.sendMsg(0, openId, listOf(
|
"自测智评", time.format(formatter), leftDay.toString(),
|
""))
|
}
|
|
// 承诺
|
fun sendCommitment(openId: String, time: LocalDateTime, leftDay: Int) {
|
templateManager.sendMsg(0, openId, listOf(
|
"守法承诺", time.format(formatter), leftDay.toString(),
|
""))
|
}
|
/********************用户关键操作提醒*****************************/
|
|
// 修改密码
|
// 认证
|
/********************发送通知同步推送*****************************/
|
}
|