|
|
@@ -3,6 +3,8 @@ package cn.reghao.tnb.message.app.controller;
|
|
|
import cn.reghao.jutil.web.WebResult;
|
|
|
import cn.reghao.tnb.message.app.model.dto.EmailDto;
|
|
|
import cn.reghao.tnb.message.app.service.EmailAccountService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -12,6 +14,7 @@ import java.util.List;
|
|
|
* @author reghao
|
|
|
* @date 2023-10-30 21:32:37
|
|
|
*/
|
|
|
+@Tag(name = "message 管理接口")
|
|
|
@RestController
|
|
|
@RequestMapping("/api/message/admin")
|
|
|
public class AdminMessageController {
|
|
|
@@ -21,15 +24,22 @@ public class AdminMessageController {
|
|
|
this.emailAccountService = emailAccountService;
|
|
|
}
|
|
|
|
|
|
- //@Operation(summary = "第三方通知配置列表页面", description = "N")
|
|
|
- @GetMapping(value = "/notify", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public String notifyPage() {
|
|
|
- List<EmailDto> list = emailAccountService.getEmailAccounts();
|
|
|
- return WebResult.success(list);
|
|
|
+ @Operation(summary = "添加邮件帐号", description = "N")
|
|
|
+ @PostMapping(value = "/notify/email", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public String addEmailAccount() {
|
|
|
+ return WebResult.success();
|
|
|
}
|
|
|
|
|
|
- @PostMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public String getMessage() {
|
|
|
+ @Operation(summary = "删除邮件帐号", description = "N")
|
|
|
+ @DeleteMapping(value = "/notify/email", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public String deleteEmailAccount() {
|
|
|
return WebResult.success();
|
|
|
}
|
|
|
+
|
|
|
+ @Operation(summary = "邮件帐号列表", description = "N")
|
|
|
+ @GetMapping(value = "/notify/email", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public String emailAccountList() {
|
|
|
+ List<EmailDto> list = emailAccountService.getEmailAccounts();
|
|
|
+ return WebResult.success(list);
|
|
|
+ }
|
|
|
}
|