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