mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 18:49:06 +08:00 
			
		
		
		
	站内信模块:完善注释
This commit is contained in:
		| @ -13,21 +13,17 @@ public interface NotifyMessageSendApi { | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 发送单条站内信给 Admin 用户 |      * 发送单条站内信给 Admin 用户 | ||||||
|      * <p> |  | ||||||
|      * 在 mobile 为空时,使用 userId 加载对应 Admin 的手机号 |  | ||||||
|      * |      * | ||||||
|      * @param reqDTO 发送请求 |      * @param reqDTO 发送请求 | ||||||
|      * @return 发送消息ID |      * @return 发送消息 ID | ||||||
|      */ |      */ | ||||||
|     Long sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); |     Long sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 发送单条站内信给 Member 用户 |      * 发送单条站内信给 Member 用户 | ||||||
|      * <p> |  | ||||||
|      * 在 mobile 为空时,使用 userId 加载对应 Member 的手机号 |  | ||||||
|      * |      * | ||||||
|      * @param reqDTO 发送请求 |      * @param reqDTO 发送请求 | ||||||
|      * @return 发送消息ID |      * @return 发送消息 ID | ||||||
|      */ |      */ | ||||||
|     Long sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); |     Long sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,39 +1,33 @@ | |||||||
| package cn.iocoder.yudao.module.system.api.notify; | package cn.iocoder.yudao.module.system.api.notify; | ||||||
|  |  | ||||||
| import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; | import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; | ||||||
|  | import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; | ||||||
|  | import cn.iocoder.yudao.module.system.service.notify.NotifySendService; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import javax.annotation.Resource; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 站内信发送 API 接口 |  * 站内信发送 API 实现类 | ||||||
|  * |  * | ||||||
|  * @author xrcoder |  * @author xrcoder | ||||||
|  */ |  */ | ||||||
| @Service | @Service | ||||||
| public class NotifyMessageSendApiImpl implements NotifyMessageSendApi { | public class NotifyMessageSendApiImpl implements NotifyMessageSendApi { | ||||||
|  |  | ||||||
|     /** |     @Resource | ||||||
|      * 发送单条站内信给 Admin 用户 |     private NotifySendService notifySendService; | ||||||
|      * <p> |  | ||||||
|      * 在 mobile 为空时,使用 userId 加载对应 Admin 的手机号 |  | ||||||
|      * |  | ||||||
|      * @param reqDTO 发送请求 |  | ||||||
|      * @return 发送消息ID |  | ||||||
|      */ |  | ||||||
|     @Override |     @Override | ||||||
|     public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) { |     public Long sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) { | ||||||
|         return null; |         return notifySendService.sendSingleNotifyToAdmin(reqDTO.getUserId(), | ||||||
|  |                 reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * 发送单条站内信给 Member 用户 |  | ||||||
|      * <p> |  | ||||||
|      * 在 mobile 为空时,使用 userId 加载对应 Member 的手机号 |  | ||||||
|      * |  | ||||||
|      * @param reqDTO 发送请求 |  | ||||||
|      * @return 发送消息ID |  | ||||||
|      */ |  | ||||||
|     @Override |     @Override | ||||||
|     public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) { |     public Long sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) { | ||||||
|         return null; |         return notifySendService.sendSingleNotifyToMember(reqDTO.getUserId(), | ||||||
|  |                 reqDTO.getTemplateCode(), reqDTO.getTemplateParams()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ public interface NotifyMessageMapper extends BaseMapperX<NotifyMessageDO> { | |||||||
|  |  | ||||||
|     default PageResult<NotifyMessageDO> selectPage(NotifyMessageMyPageReqVO reqVO, Long userId, Integer userType) { |     default PageResult<NotifyMessageDO> selectPage(NotifyMessageMyPageReqVO reqVO, Long userId, Integer userType) { | ||||||
|         return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>() |         return selectPage(reqVO, new LambdaQueryWrapperX<NotifyMessageDO>() | ||||||
|                 .eq(NotifyMessageDO::getReadStatus, reqVO.getReadStatus()) |                 .eqIfPresent(NotifyMessageDO::getReadStatus, reqVO.getReadStatus()) | ||||||
|                 .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime()) |                 .betweenIfPresent(NotifyMessageDO::getCreateTime, reqVO.getCreateTime()) | ||||||
|                 .eq(NotifyMessageDO::getUserId, userId) |                 .eq(NotifyMessageDO::getUserId, userId) | ||||||
|                 .eq(NotifyMessageDO::getUserType, userType) |                 .eq(NotifyMessageDO::getUserType, userType) | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ | |||||||
|  |  | ||||||
|       <!-- 弹出列表 --> |       <!-- 弹出列表 --> | ||||||
|       <el-table v-loading="loading" :data="list"> |       <el-table v-loading="loading" :data="list"> | ||||||
|         <el-table-column width="120" property="templateNickname" label="日期" /> |         <el-table-column width="120" property="templateNickname" label="发送人" /> | ||||||
|         <el-table-column width="180" property="title" label="发送时间"> |         <el-table-column width="180" property="title" label="发送时间"> | ||||||
|           <template slot-scope="scope"> |           <template slot-scope="scope"> | ||||||
|             <span>{{ parseTime(scope.row.createTime) }}</span> |             <span>{{ parseTime(scope.row.createTime) }}</span> | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|  |     <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" /> | ||||||
|     <!-- 搜索工作栏 --> |     <!-- 搜索工作栏 --> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="用户编号" prop="userId"> |       <el-form-item label="用户编号" prop="userId"> | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|  |     <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" /> | ||||||
|  |  | ||||||
|     <!-- 搜索工作栏 --> |     <!-- 搜索工作栏 --> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="是否已读" prop="readStatus"> |       <el-form-item label="是否已读" prop="readStatus"> | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|  |     <doc-alert title="站内信配置" url="https://doc.iocoder.cn/notify/" /> | ||||||
|  |  | ||||||
|     <!-- 搜索工作栏 --> |     <!-- 搜索工作栏 --> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="模板名称" prop="name"> |       <el-form-item label="模板名称" prop="name"> | ||||||
| @ -58,7 +60,7 @@ | |||||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-button size="mini" type="text" icon="el-icon-share" @click="handleSendNotify(scope.row)" |           <el-button size="mini" type="text" icon="el-icon-share" @click="handleSendNotify(scope.row)" | ||||||
|                      v-hasPermi="['system:notify-template:send-notify']">发送</el-button> |                      v-hasPermi="['system:notify-template:send-notify']">测试</el-button> | ||||||
|           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | ||||||
|                      v-hasPermi="['system:notify-template:update']">修改</el-button> |                      v-hasPermi="['system:notify-template:update']">修改</el-button> | ||||||
|           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | ||||||
| @ -73,8 +75,8 @@ | |||||||
|     <!-- 对话框(添加 / 修改) --> |     <!-- 对话框(添加 / 修改) --> | ||||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="140px"> |       <el-form ref="form" :model="form" :rules="rules" label-width="140px"> | ||||||
|         <el-form-item label="模板编号" prop="code"> |         <el-form-item label="模版编码" prop="code"> | ||||||
|           <el-input v-model="form.code" placeholder="请输入模板编号" /> |           <el-input v-model="form.code" placeholder="请输入模版编码" /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="模板名称" prop="name"> |         <el-form-item label="模板名称" prop="name"> | ||||||
|           <el-input v-model="form.name" placeholder="请输入模版名称" /> |           <el-input v-model="form.name" placeholder="请输入模版名称" /> | ||||||
| @ -182,7 +184,7 @@ export default { | |||||||
|       }, |       }, | ||||||
|       sendNotifyRules: { |       sendNotifyRules: { | ||||||
|         userId: [{ required: true, message: "接收人不能为空", trigger: "blur" }], |         userId: [{ required: true, message: "接收人不能为空", trigger: "blur" }], | ||||||
|         templateCode: [{ required: true, message: "模版编号不能为空", trigger: "blur" }], |         templateCode: [{ required: true, message: "模版编码不能为空", trigger: "blur" }], | ||||||
|         templateParams: { } |         templateParams: { } | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|  |     <doc-alert title="OAuth 2.0(SSO 单点登录)" url="https://doc.iocoder.cn/oauth2/" /> | ||||||
|  |  | ||||||
|     <!-- 搜索工作栏 --> |     <!-- 搜索工作栏 --> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|  | |||||||
| @ -1,6 +1,8 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|  |     <doc-alert title="OAuth 2.0(SSO 单点登录)" url="https://doc.iocoder.cn/oauth2/" /> | ||||||
|     <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" /> |     <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" /> | ||||||
|  |  | ||||||
|     <!-- 搜索工作栏 --> |     <!-- 搜索工作栏 --> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> | ||||||
|       <el-form-item label="用户编号" prop="userId"> |       <el-form-item label="用户编号" prop="userId"> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV