mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-06 10:43:48 +08:00
v3.18.0 【新增】新增消息管理;【新增】完善企业demo;【新增】完善相关数据权限;【新增】菜单管理下级功能
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
@@ -18,7 +18,7 @@
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-base</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
@@ -51,6 +51,8 @@ public class AdminSwaggerTagConst extends SwaggerTagConst {
|
||||
|
||||
public static final String SYSTEM_POSITION = "系统-职务管理";
|
||||
|
||||
public static final String SYSTEM_MESSAGE = "系统-消息";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package net.lab1024.sa.admin.module.system.message;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.domain.ValidateList;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageQueryForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageSendForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageVO;
|
||||
import net.lab1024.sa.base.module.support.message.service.MessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 后管 消息路由
|
||||
*
|
||||
* @author: 卓大
|
||||
* @date: 2025/04/09 20:55
|
||||
*/
|
||||
@Tag(name = AdminSwaggerTagConst.System.SYSTEM_MESSAGE)
|
||||
@RestController
|
||||
public class AdminMessageController {
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Operation(summary = "通知消息-新建 @author 卓大")
|
||||
@PostMapping("/message/sendMessages")
|
||||
@SaCheckPermission("system:message:send")
|
||||
public ResponseDTO<String> sendMessages(@RequestBody @Valid ValidateList<MessageSendForm> messageList) {
|
||||
messageService.sendMessage(messageList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-分页查询 @author 卓大")
|
||||
@PostMapping("/message/query")
|
||||
@SaCheckPermission("system:message:query")
|
||||
public ResponseDTO<PageResult<MessageVO>> query(@RequestBody @Valid MessageQueryForm queryForm) {
|
||||
return ResponseDTO.ok(messageService.query(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-删除 @author 卓大")
|
||||
@GetMapping("/message/delete/{messageId}")
|
||||
@SaCheckPermission("system:message:delete")
|
||||
public ResponseDTO<String> delete(@PathVariable Long messageId) {
|
||||
return messageService.delete(messageId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
|
||||
@@ -36,9 +36,9 @@ public class MessageQueryForm extends PageParam {
|
||||
@Schema(description = "查询结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人")
|
||||
private Long receiverUserId;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人类型")
|
||||
private Integer receiverUserType;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Lists;
|
||||
import jakarta.annotation.Resource;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartPageUtil;
|
||||
@@ -105,4 +106,13 @@ public class MessageService {
|
||||
}).collect(Collectors.toList());
|
||||
messageManager.saveBatch(messageEntityList);
|
||||
}
|
||||
|
||||
// 删除消息
|
||||
public ResponseDTO<String> delete(Long messageId) {
|
||||
if(messageId == null){
|
||||
return ResponseDTO.userErrorParam();
|
||||
}
|
||||
messageDao.deleteById(messageId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ spring:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: 1024lab
|
||||
password: LAB1024LAB
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
|
||||
Reference in New Issue
Block a user