From 752e00503f672ddfe2066afb6c235721a3a912b5 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 19 十一月 2024 10:25:55 +0800 Subject: [PATCH] 2024.11.19 各项修正 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt index fde3160..baffd61 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt @@ -32,6 +32,7 @@ val noticeReadStateMapper: NoticeReadStateMapper, val noticeTemplateMapper: NoticeTemplateMapper, val userinfoMapper: UserinfoMapper, + val baseInfoMapper: BaseInfoMapper, val meetingParticipantRepository: MeetingParticipantRepository, val templateManager: TemplateManager, ) : NotificationService { @@ -65,9 +66,10 @@ response: HttpServletResponse, ): List<NotificationVo> { val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return emptyList() + val baseInfo = baseInfoMapper.selectByPrimaryKey(userId) val userTypeId = userInfo.usertypeid val district = userInfo.extension1 - var districtCode = DistrictType.getCode(district) + var districtCode = DistrictType.getCode(district) ?: baseInfo?.biDistrictCode var sceneTypeId = userInfo.extension2 when (userTypeId?.toInt()) { @@ -162,9 +164,10 @@ override fun getUnReadNoticeNum(userId: String): Int { val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return 0 + val baseInfo = baseInfoMapper.selectByPrimaryKey(userId) val userTypeId = userInfo.usertypeid val district = userInfo.extension1 - var districtCode = DistrictType.getCode(district) + var districtCode = DistrictType.getCode(district) ?: baseInfo?.biDistrictCode var sceneTypeId = userInfo.extension2 when (userTypeId?.toInt()) { -- Gitblit v1.9.3