站内信模块:完善注释

pull/2/head
YunaiV 2023-01-28 22:59:01 +08:00
parent ae3ee95cdd
commit 1943e71e3f
9 changed files with 29 additions and 32 deletions

View File

@ -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);

View File

@ -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());
} }
} }

View File

@ -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)

View File

@ -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>

View File

@ -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">

View File

@ -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">

View File

@ -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: { }
} }
}; };

View File

@ -1,5 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<doc-alert title="OAuth 2.0SSO 单点登录)" 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">

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<doc-alert title="OAuth 2.0SSO 单点登录)" 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">