From b039abae18bbd3b94e9b995b4f274f6f0ec7fb91 Mon Sep 17 00:00:00 2001 From: manailin <261030956@qq.com> Date: 星期一, 13 九月 2021 14:58:28 +0800 Subject: [PATCH] [新增]将user 模块下dao层的sql 全部转化到xml 中执行。 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java index 64e93f9..33e1dee 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java @@ -1,7 +1,6 @@ package com.panzhihua.service_user.dao; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Select; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.common.model.vos.user.NoticeUnReadVO; @@ -16,10 +15,6 @@ @Mapper public interface SysUserNoticeDAO extends BaseMapper<SysUserNoticeDO> { - @Select("SELECT \n" + "COUNT(case WHEN type=1 then id else null end )activityUnread,\n" - + "COUNT(case WHEN type=2 then id else null end )serviceUnread,\n" - + "COUNT(case WHEN type=3 then id else null end )systemUnread,\n" - + "COUNT(case WHEN type=4 then id else null end )scoreUnread\n" + "FROM\n" + "sys_user_notice \n" + "WHERE\n" - + "user_id =#{userId} and `status`=0") + NoticeUnReadVO noticeUnreadNum(Long userId); } -- Gitblit v1.7.1