|
@@ -2,11 +2,14 @@ package org.jeecg.modules.adweb.system.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import jakarta.annotation.PostConstruct;
|
|
import jakarta.annotation.PostConstruct;
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
|
+import org.jeecg.modules.adweb.common.Jedis.ObjectUtil;
|
|
|
|
+import org.jeecg.modules.adweb.common.util.JedisUtil;
|
|
import org.jeecg.modules.adweb.enquiry.constant.EnquiryConstants;
|
|
import org.jeecg.modules.adweb.enquiry.constant.EnquiryConstants;
|
|
import org.jeecg.modules.adweb.enquiry.service.EnquiryRedisService;
|
|
import org.jeecg.modules.adweb.enquiry.service.EnquiryRedisService;
|
|
import org.jeecg.modules.adweb.enquiry.service.IEnquiryEmailMessageService;
|
|
import org.jeecg.modules.adweb.enquiry.service.IEnquiryEmailMessageService;
|
|
@@ -21,16 +24,17 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @Description: 网站营销方案套餐表
|
|
|
|
|
|
+ * @Description: adweb 系统api
|
|
* @Author: jeecg-boot
|
|
* @Author: jeecg-boot
|
|
* @Date: 2024-09-27
|
|
* @Date: 2024-09-27
|
|
* @Version: V1.0
|
|
* @Version: V1.0
|
|
*/
|
|
*/
|
|
-@Tag(name = "网站营销方案套餐表")
|
|
|
|
|
|
+@Tag(name = "adweb 系统api")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/adweb/system")
|
|
@RequestMapping("/adweb/system")
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -95,12 +99,15 @@ public class SystemAdwebController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/testSendEmail")
|
|
@GetMapping("/testSendEmail")
|
|
- public Result<?> testSendEmail() throws JsonProcessingException {
|
|
|
|
-// ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
-// JedisUtil.lpush(redisKey, objectMapper.writeValueAsBytes(1311742895508602880L));
|
|
|
|
-// JedisUtil.publishMsg(EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, EnquiryConstants.ENQUIRY_EMAIL);
|
|
|
|
|
|
+ public Result<?> testSendEmail() {
|
|
|
|
+ try {
|
|
|
|
+ JedisUtil.lpush(redisKey, ObjectUtil.object2Bytes(1311742895508602880L));
|
|
|
|
+ JedisUtil.publishMsg(EnquiryConstants.ENQUIRY_EMAIL_CHANNEL, EnquiryConstants.ENQUIRY_EMAIL);
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ log.info("测试发送监听发送邮件的消息失败");
|
|
|
|
+ }
|
|
|
|
|
|
- enquiryEmailMessageService.sendEnquiryEmail(1311742895508602880L);
|
|
|
|
|
|
+// enquiryEmailMessageService.sendEnquiryEmail(1311742895508602880L);
|
|
|
|
|
|
return Result.OK("");
|
|
return Result.OK("");
|
|
}
|
|
}
|