|
@@ -0,0 +1,47 @@
|
|
|
|
+package com.fjhx.mail.controller.message;
|
|
|
|
+
|
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
|
+import com.fjhx.mail.config.MailServiceConfig;
|
|
|
|
+import com.ruoyi.common.annotation.NonInterception;
|
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+@Slf4j
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("/mailService")
|
|
|
|
+public class MailController {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取用户邮箱列表
|
|
|
|
+ */
|
|
|
|
+ @NonInterception
|
|
|
|
+ @GetMapping("/getUserEmailList")
|
|
|
|
+ public Object getUserEmailList() {
|
|
|
|
+ String get = HttpUtil.get(MailServiceConfig.urlPrefix + "getUserEmailList/" + SecurityUtils.getUserId());
|
|
|
|
+ return JSON.parseObject(get);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取用户邮箱列表
|
|
|
|
+ */
|
|
|
|
+ @NonInterception
|
|
|
|
+ @PostMapping("/getMessagePage")
|
|
|
|
+ public Object getMessagePage(@RequestBody JSONObject dto) {
|
|
|
|
+ String post = HttpUtil.post(MailServiceConfig.urlPrefix + "getMessagePage", dto.toJSONString());
|
|
|
|
+ return JSON.parseObject(post);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取用户邮箱列表
|
|
|
|
+ */
|
|
|
|
+ @NonInterception
|
|
|
|
+ @PostMapping("/getMessageDetail")
|
|
|
|
+ public Object getMessageDetail(@RequestBody JSONObject dto) {
|
|
|
|
+ String post = HttpUtil.post(MailServiceConfig.urlPrefix + "getMessageDetail", dto.toJSONString());
|
|
|
|
+ return JSON.parseObject(post);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|