Commit 1943e71e3fb418ef0c496151e837ecc69f263f46

Authored by YunaiV
1 parent ae3ee95c

站内信模块:完善注释

yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java
@@ -13,21 +13,17 @@ public interface NotifyMessageSendApi { @@ -13,21 +13,17 @@ public interface NotifyMessageSendApi {
13 13
14 /** 14 /**
15 * 发送单条站内信给 Admin 用户 15 * 发送单条站内信给 Admin 用户
16 - * <p>  
17 - * 在 mobile 为空时,使用 userId 加载对应 Admin 的手机号  
18 * 16 *
19 * @param reqDTO 发送请求 17 * @param reqDTO 发送请求
20 - * @return 发送消息ID 18 + * @return 发送消息 ID
21 */ 19 */
22 Long sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); 20 Long sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO);
23 21
24 /** 22 /**
25 * 发送单条站内信给 Member 用户 23 * 发送单条站内信给 Member 用户
26 - * <p>  
27 - * 在 mobile 为空时,使用 userId 加载对应 Member 的手机号  
28 * 24 *
29 * @param reqDTO 发送请求 25 * @param reqDTO 发送请求
30 - * @return 发送消息ID 26 + * @return 发送消息 ID
31 */ 27 */
32 Long sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); 28 Long sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO);
33 29
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApiImpl.java
1 package cn.iocoder.yudao.module.system.api.notify; 1 package cn.iocoder.yudao.module.system.api.notify;
2 2
3 import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; 3 import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO;
  4 +import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService;
  5 +import cn.iocoder.yudao.module.system.service.notify.NotifySendService;
4 import org.springframework.stereotype.Service; 6 import org.springframework.stereotype.Service;
5 7
  8 +import javax.annotation.Resource;
  9 +
6 /** 10 /**
7 - * 站内信发送 API 接口 11 + * 站内信发送 API 实现类
8 * 12 *
9 * @author xrcoder 13 * @author xrcoder
10 */ 14 */
11 @Service 15 @Service
12 public class NotifyMessageSendApiImpl implements NotifyMessageSendApi { 16 public class NotifyMessageSendApiImpl implements NotifyMessageSendApi {
13 17
14 - /**  
15 - * 发送单条站内信给 Admin 用户  
16 - * <p>  
17 - * 在 mobile 为空时,使用 userId 加载对应 Admin 的手机号  
18 - *  
19 - * @param reqDTO 发送请求  
20 - * @return 发送消息ID  
21 - */ 18 + @Resource
  19 + private NotifySendService notifySendService;
  20 +
22 @Override 21 @Override
23 public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) { 22 public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) {
24 - return null; 23 + return notifySendService.sendSingleNotifyToAdmin(reqDTO.getUserId(),
  24 + reqDTO.getTemplateCode(), reqDTO.getTemplateParams());
25 } 25 }
26 26
27 - /**  
28 - * 发送单条站内信给 Member 用户  
29 - * <p>  
30 - * 在 mobile 为空时,使用 userId 加载对应 Member 的手机号  
31 - *  
32 - * @param reqDTO 发送请求  
33 - * @return 发送消息ID  
34 - */  
35 @Override 27 @Override
36 public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) { 28 public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) {
37 - return null; 29 + return notifySendService.sendSingleNotifyToMember(reqDTO.getUserId(),
  30 + reqDTO.getTemplateCode(), reqDTO.getTemplateParams());
38 } 31 }
  32 +
39 } 33 }
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notify/NotifyMessageMapper.java
@@ -28,7 +28,7 @@ public interface NotifyMessageMapper extends BaseMapperX&lt;NotifyMessageDO&gt; { @@ -28,7 +28,7 @@ public interface NotifyMessageMapper extends BaseMapperX&lt;NotifyMessageDO&gt; {
28 28
29 default PageResult<NotifyMessageDO> selectPage(NotifyMessageMyPageReqVO reqVO, Long userId, Integer userType) { 29 default PageResult<NotifyMessageDO> selectPage(NotifyMessageMyPageReqVO reqVO, Long userId, Integer userType) {
30 return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>() 30 return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>()
31 - .eq(NotifyMessageDO::getReadStatus, reqVO.getReadStatus()) 31 + .eqIfPresent(NotifyMessageDO::getReadStatus, reqVO.getReadStatus())
32 .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime()) 32 .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime())
33 .eq(NotifyMessageDO::getUserId, userId) 33 .eq(NotifyMessageDO::getUserId, userId)
34 .eq(NotifyMessageDO::getUserType, userType) 34 .eq(NotifyMessageDO::getUserType, userType)
yudao-ui-admin/src/layout/components/Message/index.vue
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 <!-- 弹出列表 --> 9 <!-- 弹出列表 -->
10 <el-table v-loading="loading" :data="list"> 10 <el-table v-loading="loading" :data="list">
11 - <el-table-column width="120" property="templateNickname" label="日期" /> 11 + <el-table-column width="120" property="templateNickname" label="发送人" />
12 <el-table-column width="180" property="title" label="发送时间"> 12 <el-table-column width="180" property="title" label="发送时间">
13 <template slot-scope="scope"> 13 <template slot-scope="scope">
14 <span>{{ parseTime(scope.row.createTime) }}</span> 14 <span>{{ parseTime(scope.row.createTime) }}</span>
yudao-ui-admin/src/views/system/notify/message/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
3 - 3 + <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" />
4 <!-- 搜索工作栏 --> 4 <!-- 搜索工作栏 -->
5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> 5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
6 <el-form-item label="用户编号" prop="userId"> 6 <el-form-item label="用户编号" prop="userId">
yudao-ui-admin/src/views/system/notify/my/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
  3 + <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" />
  4 +
3 <!-- 搜索工作栏 --> 5 <!-- 搜索工作栏 -->
4 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> 6 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
5 <el-form-item label="是否已读" prop="readStatus"> 7 <el-form-item label="是否已读" prop="readStatus">
yudao-ui-admin/src/views/system/notify/template/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
  3 + <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" />
  4 +
3 <!-- 搜索工作栏 --> 5 <!-- 搜索工作栏 -->
4 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> 6 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
5 <el-form-item label="模板名称" prop="name"> 7 <el-form-item label="模板名称" prop="name">
@@ -58,7 +60,7 @@ @@ -58,7 +60,7 @@
58 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 60 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
59 <template slot-scope="scope"> 61 <template slot-scope="scope">
60 <el-button size="mini" type="text" icon="el-icon-share" @click="handleSendNotify(scope.row)" 62 <el-button size="mini" type="text" icon="el-icon-share" @click="handleSendNotify(scope.row)"
61 - v-hasPermi="['system:notify-template:send-notify']">发送</el-button> 63 + v-hasPermi="['system:notify-template:send-notify']">测试</el-button>
62 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" 64 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
63 v-hasPermi="['system:notify-template:update']">修改</el-button> 65 v-hasPermi="['system:notify-template:update']">修改</el-button>
64 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" 66 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -73,8 +75,8 @@ @@ -73,8 +75,8 @@
73 <!-- 对话框(添加 / 修改) --> 75 <!-- 对话框(添加 / 修改) -->
74 <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> 76 <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
75 <el-form ref="form" :model="form" :rules="rules" label-width="140px"> 77 <el-form ref="form" :model="form" :rules="rules" label-width="140px">
76 - <el-form-item label="模板编号" prop="code">  
77 - <el-input v-model="form.code" placeholder="请输入模板编号" /> 78 + <el-form-item label="模版编码" prop="code">
  79 + <el-input v-model="form.code" placeholder="请输入模版编码" />
78 </el-form-item> 80 </el-form-item>
79 <el-form-item label="模板名称" prop="name"> 81 <el-form-item label="模板名称" prop="name">
80 <el-input v-model="form.name" placeholder="请输入模版名称" /> 82 <el-input v-model="form.name" placeholder="请输入模版名称" />
@@ -182,7 +184,7 @@ export default { @@ -182,7 +184,7 @@ export default {
182 }, 184 },
183 sendNotifyRules: { 185 sendNotifyRules: {
184 userId: [{ required: true, message: "接收人不能为空", trigger: "blur" }], 186 userId: [{ required: true, message: "接收人不能为空", trigger: "blur" }],
185 - templateCode: [{ required: true, message: "模版编号不能为空", trigger: "blur" }], 187 + templateCode: [{ required: true, message: "模版编码不能为空", trigger: "blur" }],
186 templateParams: { } 188 templateParams: { }
187 } 189 }
188 }; 190 };
yudao-ui-admin/src/views/system/oauth2/client/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
  3 + <doc-alert title="OAuth 2.0(SSO 单点登录)" url="https://doc.iocoder.cn/oauth2/" />
3 4
4 <!-- 搜索工作栏 --> 5 <!-- 搜索工作栏 -->
5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> 6 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
yudao-ui-admin/src/views/system/oauth2/token/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
  3 + <doc-alert title="OAuth 2.0(SSO 单点登录)" url="https://doc.iocoder.cn/oauth2/" />
3 <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" /> 4 <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
  5 +
4 <!-- 搜索工作栏 --> 6 <!-- 搜索工作栏 -->
5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> 7 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
6 <el-form-item label="用户编号" prop="userId"> 8 <el-form-item label="用户编号" prop="userId">