feiyu02
2022-11-15 23bd719cebe5feeff4e48fde925b0b39755eea93
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt
@@ -1,19 +1,17 @@
package cn.flightfeather.supervision.lightshare.service.Impl
import cn.flightfeather.supervision.common.wx.TemplateManager
import cn.flightfeather.supervision.domain.entity.*
import cn.flightfeather.supervision.domain.enumeration.DistrictType
import cn.flightfeather.supervision.domain.enumeration.UserType
import cn.flightfeather.supervision.domain.mapper.NoticeMapper
import cn.flightfeather.supervision.domain.mapper.NoticeReadStateMapper
import cn.flightfeather.supervision.domain.mapper.NotificationMapper
import cn.flightfeather.supervision.domain.mapper.UserinfoMapper
import cn.flightfeather.supervision.lightshare.repository.MeetingParticipantRepository
import cn.flightfeather.supervision.lightshare.service.NotificationService
import cn.flightfeather.supervision.lightshare.vo.NoticeReadStateVo
import cn.flightfeather.supervision.lightshare.vo.NotificationVo
import cn.flightfeather.supervision.push.PushService
import cn.flightfeather.supervision.common.push.PushService
import cn.flightfeather.supervision.domain.enumeration.ParticipantType
import cn.flightfeather.supervision.domain.enumeration.SceneType
import cn.flightfeather.supervision.domain.mapper.*
import cn.flightfeather.supervision.infrastructure.utils.UUIDGenerator
import com.flightfeather.taizhang.model.enumeration.NotificationType
import com.flightfeather.taizhang.model.enumeration.WorkSubType
@@ -31,7 +29,8 @@
        val noticeMapper: NoticeMapper,
        val noticeReadStateMapper: NoticeReadStateMapper,
        val userinfoMapper: UserinfoMapper,
        val meetingParticipantRepository: MeetingParticipantRepository
        val meetingParticipantRepository: MeetingParticipantRepository,
        val templateManager: TemplateManager
) : NotificationService {
    override fun getNotificationUnRead(userId: String, page: Int, per_page: Int, response: HttpServletResponse): List<NotificationVo> {
@@ -288,4 +287,9 @@
        }
        return noticeMapper.insert(notice) == 1
    }
    override fun pushMsgWx(templateId: Int): String {
        val res = templateManager.sendMsg(templateId, "otZkc5VRlwauEMPqMluQYdVa4zuE", listOf("台账上传", "2022年10月10日", "3", "请重点关注现场自寻查部分"))
        return if (res) "success" else "fail"
    }
}