diff --git a/pom.xml b/pom.xml
index 8c93ac0..5d26086 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,6 +185,11 @@
gson
2.8.8
+
+
+ org.springframework.boot
+ spring-boot-starter-amqp
+
diff --git a/src/main/java/com/cultural/heritage/config/CorsConfig.java b/src/main/java/com/cultural/heritage/config/CorsConfig.java
index 1722a06..d457140 100644
--- a/src/main/java/com/cultural/heritage/config/CorsConfig.java
+++ b/src/main/java/com/cultural/heritage/config/CorsConfig.java
@@ -7,8 +7,6 @@ import org.springframework.core.Ordered;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* 跨域配置
diff --git a/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java b/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java
index 83df403..11a6254 100644
--- a/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java
+++ b/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java
@@ -3,7 +3,6 @@ package com.cultural.heritage.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
-import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/src/main/java/com/cultural/heritage/config/RabbitMQConfig.java b/src/main/java/com/cultural/heritage/config/RabbitMQConfig.java
new file mode 100644
index 0000000..58752a4
--- /dev/null
+++ b/src/main/java/com/cultural/heritage/config/RabbitMQConfig.java
@@ -0,0 +1,25 @@
+package com.cultural.heritage.config;
+
+import org.springframework.amqp.support.converter.DefaultClassMapper;
+import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
+import org.springframework.amqp.support.converter.MessageConverter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class RabbitMQConfig {
+
+ @Bean
+ public MessageConverter jsonToMapMessageConverter() {
+ DefaultClassMapper defaultClassMapper = new DefaultClassMapper();
+ defaultClassMapper.setTrustedPackages("com.cultural.heritage.utils.MultiDelayMessage"); // trusted packages
+ Jackson2JsonMessageConverter jackson2JsonMessageConverter = new Jackson2JsonMessageConverter();
+ jackson2JsonMessageConverter.setClassMapper(defaultClassMapper);
+ return jackson2JsonMessageConverter;
+ }
+
+ @Bean
+ public MessageConverter messageConverter(){
+ return new Jackson2JsonMessageConverter();
+ }
+}
diff --git a/src/main/java/com/cultural/heritage/constant/MqConstant.java b/src/main/java/com/cultural/heritage/constant/MqConstant.java
new file mode 100644
index 0000000..54371f2
--- /dev/null
+++ b/src/main/java/com/cultural/heritage/constant/MqConstant.java
@@ -0,0 +1,10 @@
+package com.cultural.heritage.constant;
+
+public interface MqConstant {
+
+ String DELAY_EXCHANGE = "delay.topic";
+
+ String DELAY_ORDER_QUEUE = "order.delay.queue";
+
+ String DELAY_ORDER_ROUTING_KEY = "order.key";
+}
diff --git a/src/main/java/com/cultural/heritage/controller/good/FestivalController.java b/src/main/java/com/cultural/heritage/controller/good/FestivalController.java
new file mode 100644
index 0000000..1cc9c9d
--- /dev/null
+++ b/src/main/java/com/cultural/heritage/controller/good/FestivalController.java
@@ -0,0 +1,97 @@
+package com.cultural.heritage.controller.good;
+
+
+import com.cultural.heritage.annotation.AuthCheck;
+import com.cultural.heritage.common.BaseResponse;
+import com.cultural.heritage.common.ErrorCode;
+import com.cultural.heritage.common.ResultUtils;
+import com.cultural.heritage.constant.UserConstant;
+import com.cultural.heritage.exception.BusinessException;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 节日管理接口
+ */
+@RestController
+@RequestMapping("/festival")
+@Slf4j
+@Tag(name = "节日管理模块")
+public class FestivalController {
+
+
+ @Resource
+ private RedisTemplate redisTemplate;
+
+ // 节日集合的键
+ private static final String FESTIVAL_KEY = "festivalList";
+
+
+ /**
+ * Web端管理员添加节日项
+ * @param value 添加的节日项
+ */
+ @GetMapping("/add")
+ @Operation(summary = "Web端管理员添加节日项", description = "参数:节日项名称,权限:管理员(admin, boss),方法名:addFestivalElement")
+ @AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
+ public BaseResponse addFestivalElement(@RequestParam String value) {
+ if (StringUtils.isBlank(value)) {
+ throw new BusinessException(ErrorCode.PARAMS_ERROR);
+ }
+ if (isElementExistInList(value)) {
+ throw new BusinessException(ErrorCode.OPERATION_ERROR, "该节日项已存在");
+ }
+ redisTemplate.opsForList().rightPush(FESTIVAL_KEY, value);
+ return ResultUtils.success(true);
+ }
+
+
+ /**
+ * Web端管理员查询节日集合
+ * @return 节日列表
+ */
+ @GetMapping("/get")
+ @Operation(summary = "Web端管理员查询节日集合", description = "参数:无,权限:管理员(admin, boss),方法名:getFestivalList")
+ @AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
+ public BaseResponse> getFestivalList() {
+ List