whites = ignoreWhiteConfig.getWhites();
+
+ ServerHttpRequest request = exchange.getRequest();
+
+ String path = request.getURI().getPath();
+
+ if(StringUtils.matches(path,whites)){
+
+ chain.filter(exchange);
+
+ }
+
+ String first = request.getHeaders().getFirst("token");
+
+
+ if(StringUtils.isBlank(first)){
+
+ return GatewayUtils.errorResponse(exchange,"Token不可以为空");
+
+ }
+
+
+ try{
+ JwtUtils.parseToken(first);
+ }catch (Exception E){
+
+ return GatewayUtils.errorResponse(exchange,"Token不合法");
+
+ }
+
+ String userKey = JwtUtils.getUserKey(first);
+
+ String s = stringRedisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY + userKey);
+
+ if(StringUtils.isNotBlank(s)){
+ return GatewayUtils.errorResponse(exchange,"Token过期");
+ }
+
+ stringRedisTemplate.expire(TokenConstants.LOGIN_TOKEN_KEY+userKey,15,TimeUnit.MINUTES);
+
+ return chain.filter(exchange);
+ }
+
+ /**
+ * Get the order value of this object.
+ * Higher values are interpreted as lower priority. As a consequence,
+ * the object with the lowest value has the highest priority (somewhat
+ * analogous to Servlet {@code load-on-startup} values).
+ *
Same order values will result in arbitrary sort positions for the
+ * affected objects.
+ *
+ * @return the order value
+ * @see #HIGHEST_PRECEDENCE
+ * @see #LOWEST_PRECEDENCE
+ */
+ @Override
+ public int getOrder() {
+ return 0;
+ }
+}
diff --git a/hamburg-gateway/src/main/java/com/hamburg/gateway/utils/GatewayUtils.java b/hamburg-gateway/src/main/java/com/hamburg/gateway/utils/GatewayUtils.java
new file mode 100644
index 0000000..71c8112
--- /dev/null
+++ b/hamburg-gateway/src/main/java/com/hamburg/gateway/utils/GatewayUtils.java
@@ -0,0 +1,98 @@
+package com.hamburg.gateway.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hamburg.common.result.Result;
+import com.hamburg.common.utils.StringUtils;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.core.io.buffer.DataBuffer;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.server.reactive.ServerHttpRequest;
+import org.springframework.http.server.reactive.ServerHttpResponse;
+import org.springframework.web.server.ServerWebExchange;
+import reactor.core.publisher.Mono;
+
+/**
+ * @author DongZl
+ * @description: 网关处理工具类
+ */
+@Log4j2
+public class GatewayUtils {
+ /**
+ * 添加请求头参数
+ * @param mutate 修改对象
+ * @param key 键
+ * @param value 值
+ */
+ public static void addHeader(ServerHttpRequest.Builder mutate, String key, Object value) {
+ if (StringUtils.isEmpty(key)){
+ log.warn("添加请求头参数键不可以为空");
+ return;
+ }
+ if (value == null) {
+ log.warn("添加请求头参数:[{}]值为空",key);
+ return;
+ }
+ String valueStr = value.toString();
+ mutate.header(key, valueStr);
+ log.info("添加请求头参数成功 - 键:[{}] , 值:[{}]", key , value);
+ }
+
+ /**
+ * 删除请求头参数
+ * @param mutate 修改对象
+ * @param key 键
+ */
+ public static void removeHeader(ServerHttpRequest.Builder mutate, String key) {
+ if (StringUtils.isEmpty(key)){
+ log.warn("删除请求头参数键不可以为空");
+ return;
+ }
+ mutate.headers(httpHeaders -> httpHeaders.remove(key)).build();
+ log.info("删除请求头参数 - 键:[{}]",key);
+ }
+
+ /**
+ * 错误结果响应
+ * @param exchange 响应上下文
+ * @param msg 响应消息
+ * @return
+ */
+ public static Mono errorResponse(ServerWebExchange exchange, String msg, HttpStatus httpStatus) {
+ ServerHttpResponse response = exchange.getResponse();
+ //设置HTTP响应头状态
+ response.setStatusCode(httpStatus);
+ //设置HTTP响应头文本格式
+ response.getHeaders().add(HttpHeaders.CONTENT_TYPE, "application/json");
+ //定义响应内容
+ Result> result = Result.error(msg);
+ String resultJson = JSONObject.toJSONString(result);
+ log.error("[鉴权异常处理]请求路径:[{}],异常信息:[{}],响应结果:[{}]", exchange.getRequest().getPath(), msg, resultJson);
+ DataBuffer dataBuffer = response.bufferFactory().wrap(resultJson.getBytes());
+ //进行响应
+ return response.writeWith(Mono.just(dataBuffer));
+ }
+
+ /**
+ * 错误结果响应
+ * @param exchange 响应上下文
+ * @param msg 响应消息
+ * @return
+ */
+ public static Mono errorResponse(ServerWebExchange exchange, String msg) {
+ ServerHttpResponse response = exchange.getResponse();
+ //设置HTTP响应头状态
+ response.setStatusCode(HttpStatus.OK);
+ //设置HTTP响应头文本格式
+ response.getHeaders().add(HttpHeaders.CONTENT_TYPE, "application/json");
+ //定义响应内容
+ Result> result = Result.error(msg);
+ String resultJson = JSONObject.toJSONString(result);
+ log.error("[鉴权异常处理]请求路径:[{}],异常信息:[{}],响应结果:[{}]", exchange.getRequest().getPath(), msg, resultJson);
+ DataBuffer dataBuffer = response.bufferFactory().wrap(resultJson.getBytes());
+ //进行响应
+ return response.writeWith(Mono.just(dataBuffer));
+ }
+
+
+}
diff --git a/hamburg-gateway/src/main/resources/bootstrap.yml b/hamburg-gateway/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..3c28634
--- /dev/null
+++ b/hamburg-gateway/src/main/resources/bootstrap.yml
@@ -0,0 +1,31 @@
+# Tomcat
+server:
+ port: 18080
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: hamburg-gateway
+ profiles:
+ # 环境配置
+ active: dev
+ main:
+ # 允许使用循环引用
+ allow-circular-references: true
+ # 允许定义相同的bean对象 去覆盖原有的
+ allow-bean-definition-overriding: true
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ config:
+ # 配置中心地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/hamburg-modules/hamburg-house/pom.xml b/hamburg-modules/hamburg-house/pom.xml
new file mode 100644
index 0000000..a0b0679
--- /dev/null
+++ b/hamburg-modules/hamburg-house/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+
+ org.example
+ hamburg-modules
+ 1.0-SNAPSHOT
+
+
+ hamburg-house
+
+
+ 8
+ 8
+ UTF-8
+
+
+
diff --git a/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/HouseApplication.java b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/HouseApplication.java
new file mode 100644
index 0000000..24a4069
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/HouseApplication.java
@@ -0,0 +1,22 @@
+package com.hamburg.house;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.house
+ * @Project:730ZK
+ * @name:HouseApplication
+ * @Date:2024/7/30 10:00
+ */
+@SpringBootApplication
+public class HouseApplication {
+
+ public static void main(String[] args) {
+
+ SpringApplication.run(HouseApplication.class, args);
+
+ }
+
+}
diff --git a/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/controller/HouseController.java b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/controller/HouseController.java
new file mode 100644
index 0000000..6fb048e
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/controller/HouseController.java
@@ -0,0 +1,50 @@
+package com.hamburg.house.controller;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hamburg.common.domain.House;
+import com.hamburg.common.domain.Type;
+import com.hamburg.common.domain.request.HouseReq;
+import com.hamburg.common.result.Result;
+import com.hamburg.house.service.HouseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.house.controller
+ * @Project:730ZK
+ * @name:HouseController
+ * @Date:2024/7/30 10:02
+ */
+@RestController
+@RequestMapping("/house")
+public class HouseController {
+
+ @Autowired
+ private HouseService houseService;
+
+
+ @PostMapping("/findHouseList")
+ public Result findHouseList(@RequestBody HouseReq houseReq) {
+
+ PageHelper.startPage(houseReq.getPageNum(), houseReq.getPageSize());
+ List list=houseService.findHouseList(houseReq);
+ PageInfo housePageInfo = new PageInfo<>(list);
+ return Result.success(housePageInfo);
+ }
+
+ @PostMapping("/findTypeList")
+ public Result findTypeList() {
+ List list=houseService.findTypeList();
+
+ return Result.success(list);
+ }
+
+
+
+}
diff --git a/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/mapper/HouseMapper.java b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/mapper/HouseMapper.java
new file mode 100644
index 0000000..21ea73c
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/mapper/HouseMapper.java
@@ -0,0 +1,30 @@
+package com.hamburg.house.mapper;
+
+import com.hamburg.common.domain.Contract;
+import com.hamburg.common.domain.House;
+import com.hamburg.common.domain.Record;
+import com.hamburg.common.domain.Type;
+import com.hamburg.common.domain.request.HouseReq;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.house.mapper
+ * @Project:730ZK
+ * @name:HouseMapper
+ * @Date:2024/7/30 10:02
+ */
+@Mapper
+public interface HouseMapper {
+ List findHouseList(HouseReq houseReq);
+
+ List findTypeList();
+
+ Record findRecordById(@Param("userId") Integer userId);
+
+ Contract findContract(@Param("contractId") Integer contractId);
+
+}
diff --git a/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/HouseService.java b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/HouseService.java
new file mode 100644
index 0000000..b48907d
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/HouseService.java
@@ -0,0 +1,25 @@
+package com.hamburg.house.service;
+
+import com.hamburg.common.domain.House;
+
+import com.hamburg.common.domain.Type;
+import com.hamburg.common.domain.request.HouseReq;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.house.service
+ * @Project:730ZK
+ * @name:HouseService
+ * @Date:2024/7/30 10:02
+ */
+public interface HouseService {
+ List findHouseList(HouseReq houseReq);
+
+ List findTypeList();
+
+
+
+}
diff --git a/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/impl/HouseServiceImpl.java b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/impl/HouseServiceImpl.java
new file mode 100644
index 0000000..d16cafb
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/java/com/hamburg/house/service/impl/HouseServiceImpl.java
@@ -0,0 +1,60 @@
+package com.hamburg.house.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hamburg.common.constants.TokenConstants;
+import com.hamburg.common.domain.*;
+import com.hamburg.common.domain.request.HouseReq;
+import com.hamburg.common.utils.JwtUtils;
+import com.hamburg.house.mapper.HouseMapper;
+import com.hamburg.house.service.HouseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.house.service.impl
+ * @Project:730ZK
+ * @name:HouseServiceImpl
+ * @Date:2024/7/30 10:02
+ */
+@Service
+public class HouseServiceImpl implements HouseService {
+
+ @Autowired
+ private HouseMapper houseMapper;
+
+ @Autowired
+ private HttpServletRequest request;
+
+ @Autowired
+ private StringRedisTemplate stringRedisTemplate;
+
+
+ @Override
+ public List findHouseList(HouseReq houseReq) {
+ return houseMapper.findHouseList(houseReq);
+ }
+
+ @Override
+ public List findTypeList() {
+ return houseMapper.findTypeList();
+ }
+
+
+ public User getUser(){
+
+ String header = request.getHeader(TokenConstants.TOKEN);
+ String userKey = JwtUtils.getUserKey(header);
+ String s = stringRedisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY + userKey);
+ User user = JSONObject.parseObject(s, User.class);
+
+ return user;
+
+ }
+}
diff --git a/hamburg-modules/hamburg-house/src/main/resources/bootstrap.yml b/hamburg-modules/hamburg-house/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..c917e8b
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/resources/bootstrap.yml
@@ -0,0 +1,43 @@
+# Tomcat
+server:
+ port: 9005
+# Spring
+spring:
+ main:
+ allow-circular-references: true
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
+ time-zone: GMT+8
+ application:
+ # 应用名称
+ name: hamburg-house
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ config:
+ # 配置中心地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+fdfs:
+ so-timeout: 1500 # socket 连接时长
+ connect-timeout: 600 # 连接 tracker 服务器超时时长
+ # 这两个是你服务器的 IP 地址,注意 23000 端口也要打开,阿里云服务器记得配置安全组。tracker 要和 stroage 服务进行交流
+ tracker-list: 124.70.191.180:22122
+ web-server-url: 124.70.191.180:8888
+ pool:
+ jmx-enabled: false
+ # 生成缩略图
+ thumb-image:
+ height: 500
+ width: 500
diff --git a/hamburg-modules/hamburg-house/src/main/resources/mapper/IHouseMapper.xml b/hamburg-modules/hamburg-house/src/main/resources/mapper/IHouseMapper.xml
new file mode 100644
index 0000000..eabbd7a
--- /dev/null
+++ b/hamburg-modules/hamburg-house/src/main/resources/mapper/IHouseMapper.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+ SELECT
+ t_house.*,
+ t_type.type_name
+ FROM
+ t_house
+ LEFT JOIN t_type ON t_type.type_id = t_house.house_id
+
+
+ and t_house.type_id=#{typeId}
+
+
+ and house_name like concat('%',#{houseName},'%')
+
+
+ and t_house.house_monthly > #{startPrice}
+
+
+ and t_house.house_monthly < #{endPrice}
+
+
+
+
+
+ and t_house.house_status=0
+
+
+ and t_house.house_status=0
+
+
+ and t_house.house_status=0
+
+
+
+
+
+ select * from t_type
+
+
+
+ select * from t_record where user_id=#{userId}
+
+
+
+ select * from t_contract where contract_id=#{contractId}
+
+
diff --git a/hamburg-modules/hamburg-rabbitmq/pom.xml b/hamburg-modules/hamburg-rabbitmq/pom.xml
new file mode 100644
index 0000000..6c3f97f
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/pom.xml
@@ -0,0 +1,26 @@
+
+
+ 4.0.0
+
+ org.example
+ hamburg-modules
+ 1.0-SNAPSHOT
+
+
+ hamburg-rabbitmq
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+ org.example
+ hamburg-common
+
+
+
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/RabbitMqApplication.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/RabbitMqApplication.java
new file mode 100644
index 0000000..f202632
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/RabbitMqApplication.java
@@ -0,0 +1,23 @@
+package com.hamburg.rabbitmq;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.rabbitmq
+ * @Project:730ZK
+ * @name:RabbitMqApplication
+ * @Date:2024/7/30 11:27
+ */
+@SpringBootApplication
+public class RabbitMqApplication {
+
+ public static void main(String[] args) {
+
+ SpringApplication.run(RabbitMqApplication.class, args);
+
+
+ }
+
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/DelayedQueueUtil.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/DelayedQueueUtil.java
new file mode 100644
index 0000000..8550600
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/DelayedQueueUtil.java
@@ -0,0 +1,89 @@
+package com.hamburg.rabbitmq.config;
+
+import org.springframework.amqp.core.Binding;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.CustomExchange;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * @Author:LiuYang
+ * @Package:com.bawei.rabbitmq.utils
+ * @Project:yueKaoTest-6-14
+ * @name:DelayedQueueUtil
+ * @Date:2024/6/14 10:49
+ * @Description 发送延迟队列工具类
+ */
+@Component
+public class DelayedQueueUtil {
+
+ /**
+ * 延迟队列和延迟交换机绑定规则
+ */
+ private static final String DELAYED_ROUTING_KEY = "delayed.routingkey";
+
+ /**
+ * 延迟交换机的名称
+ */
+ private static final String DELAYED_EXCHANGE = "delayed.exchange";
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Resource
+ private RabbitAdmin rabbitAdmin;
+
+ /**
+ * 发送延迟队列
+ *
+ * @param queueName 延迟队列名称
+ * @param params 消息内容
+ * @param delayedTime 延迟时间 毫秒
+ */
+ public void sendDelayedQueue(String queueName, Object params, Integer delayedTime) {
+ // 先创建一个队列
+ Queue queue = new Queue(queueName);
+ rabbitAdmin.declareQueue(queue);
+
+ // 创建延迟队列交换机
+ CustomExchange customExchange = createCustomExchange();
+ rabbitAdmin.declareExchange(customExchange);
+
+ // 将队列和交换机绑定
+ Binding binding = BindingBuilder.bind(queue).to(customExchange).with(DELAYED_ROUTING_KEY).noargs();
+ rabbitAdmin.declareBinding(binding);
+
+ // 发送延迟消息
+ rabbitTemplate.convertAndSend(DELAYED_EXCHANGE, DELAYED_ROUTING_KEY, params, msg -> {
+ // 发送消息的时候 延迟时长
+ msg.getMessageProperties().setDelay(delayedTime);
+ return msg;
+ });
+ }
+
+ /**
+ * 创建延迟交换机
+ */
+ private CustomExchange createCustomExchange() {
+ Map arguments = new HashMap<>();
+
+ /**
+ * 参数说明:
+ * 1.交换机的名称
+ * 2.交换机的类型
+ * 3.是否需要持久化
+ * 4.是否自动删除
+ * 5.其它参数
+ */
+ arguments.put("x-delayed-type", "direct");
+ return new CustomExchange(DELAYED_EXCHANGE, "x-delayed-message", true, false, arguments);
+ }
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitAdminConfig.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitAdminConfig.java
new file mode 100644
index 0000000..59ae20c
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitAdminConfig.java
@@ -0,0 +1,53 @@
+package com.hamburg.rabbitmq.config;
+
+import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * RabbitAdmin是RabbitMQ的一个Java客户端库,它提供了管理RabbitMQ资源的功能。它是通过与RabbitMQ服务器进行交互来执行管理操作的。
+ */
+@Configuration
+public class RabbitAdminConfig {
+
+ @Value("${spring.rabbitmq.host}")
+ private String host;
+ @Value("${spring.rabbitmq.username}")
+ private String username;
+ @Value("${spring.rabbitmq.password}")
+ private String password;
+ @Value("${spring.rabbitmq.virtualhost}")
+ private String virtualhost;
+
+ /**
+ * 构建 RabbitMQ的连接工厂
+ * @return
+ */
+ @Bean
+ public ConnectionFactory connectionFactory() {
+ CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
+ connectionFactory.setAddresses(host);
+ connectionFactory.setUsername(username);
+ connectionFactory.setPassword(password);
+ connectionFactory.setVirtualHost(virtualhost);
+ // 配置发送确认回调时,次配置必须配置,否则即使在RabbitTemplate配置了ConfirmCallback也不会生效
+ connectionFactory.setPublisherConfirmType(CachingConnectionFactory.ConfirmType.CORRELATED);
+ connectionFactory.setPublisherReturns(true);
+ return connectionFactory;
+ }
+
+ /**
+ * 自己初始化 RabbitAdmin
+ * @param connectionFactory
+ * @return
+ */
+ @Bean
+ public RabbitAdmin rabbitAdmin(ConnectionFactory connectionFactory) {
+ RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory);
+ rabbitAdmin.setAutoStartup(true);
+ return rabbitAdmin;
+ }
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitConverterConfig.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitConverterConfig.java
new file mode 100644
index 0000000..d24e41c
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/config/RabbitConverterConfig.java
@@ -0,0 +1,24 @@
+package com.hamburg.rabbitmq.config;
+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;
+/**
+ * @Author:LiuYang
+ * @Package:com.bawei.rabbitMQ.config
+ * @Project:work-4-48
+ * @name:RabbitConverterConfig
+ * @Date:2024/4/29 17:24
+ */
+@Configuration
+public class RabbitConverterConfig {
+
+
+ //RabbitMQ 消息的转换设置
+ @Bean
+ public MessageConverter jsonMessageConverter() {
+ //SimpleMessageConverter 默认的消息转换器 String byte[] serializer
+ return new Jackson2JsonMessageConverter();
+ }
+
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerFail.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerFail.java
new file mode 100644
index 0000000..4f0ff55
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerFail.java
@@ -0,0 +1,66 @@
+package com.hamburg.rabbitmq.customer;
+
+
+import com.hamburg.common.utils.TelSmsUtils;
+import com.rabbitmq.client.Channel;
+import lombok.extern.java.Log;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.rabbitmq.customer
+ * @Project:730ZK
+ * @name:CustomerFail
+ * @Date:2024/7/30 14:04
+ */
+@Component
+@Log4j2
+public class CustomerFail {
+
+ @Autowired
+ private StringRedisTemplate redisTemplate;
+
+ @Autowired
+ private TelSmsUtils telSmsUtils;
+
+ @RabbitListener(queuesToDeclare = @Queue("Fail"))
+ public void sendCode(String userName, Message message, Channel channel){
+
+ try{
+
+
+// HashMap map = new HashMap<>();
+// telSmsUtils.sendSms(userName,"申请驳回",map);
+ log.info("用户:"+userName);
+ //消息消费确认
+ channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
+
+ }catch (IOException e){
+
+ try{
+
+ channel.basicReject(message.getMessageProperties().getDeliveryTag(),true);
+ }catch (Exception exception){
+
+
+ }
+
+
+ }
+
+
+
+ }
+
+
+
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerSuccess.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerSuccess.java
new file mode 100644
index 0000000..092f954
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/customer/CustomerSuccess.java
@@ -0,0 +1,67 @@
+package com.hamburg.rabbitmq.customer;
+
+
+import com.hamburg.common.utils.TelSmsUtils;
+import com.rabbitmq.client.Channel;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.rabbitmq.customer
+ * @Project:730ZK
+ * @name:CustomerMessage
+ * @Date:2024/7/30 11:28
+ */
+@Log4j2
+@Component
+public class CustomerSuccess {
+
+ @Autowired
+ private StringRedisTemplate redisTemplate;
+
+ @Autowired
+ private TelSmsUtils telSmsUtils;
+
+ @RabbitListener(queuesToDeclare = @Queue("Success"))
+ public void sendCode(String userName, Message message, Channel channel){
+
+
+ try{
+
+
+// HashMap map = new HashMap<>();
+// telSmsUtils.sendSms(userName,"申请通过",map);
+ log.info("用户:"+userName);
+ //消息消费确认
+ channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
+
+
+ }catch (IOException e){
+
+ try{
+
+ channel.basicReject(message.getMessageProperties().getDeliveryTag(),true);
+ }catch (Exception exception){
+
+
+ }
+
+
+ }
+
+
+
+ }
+
+
+
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DLXQueue.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DLXQueue.java
new file mode 100644
index 0000000..00c4235
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DLXQueue.java
@@ -0,0 +1,98 @@
+package com.hamburg.rabbitmq.utils;
+
+import org.springframework.amqp.core.Binding;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.DirectExchange;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 发送TTL消息 , 消息到达指定的时间没有被消费,消息成为死信,这条死信消息 回到发送到死信交换机,死信队列跟死信交换交换机绑定
+ */
+@Component
+public class DLXQueue {
+ /**
+ * 发送死信消息 绑定规则 routingKey
+ */
+ private static final String DEAD_ROUTING_KEY = "dead.routing.key";
+
+ /**
+ * 发送ttl 消息的 绑定规则 routingKey
+ */
+ private static final String ROUTING_KEY = "routing.key";
+
+ /**
+ * 死信交换机的名称
+ */
+ private static final String DEAD_EXCHANGE = "dead.exchange";
+
+ /**
+ * ttl 交换机的名称
+ */
+ private static final String EXCHANGE = "common.exchange";
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Resource
+ private RabbitAdmin rabbitAdmin;
+
+ /**
+ * 发送TTL消息,消息过期后进入死信交换机,进入死信队列
+ *
+ * @param queueName 队列名称
+ * @param deadQueueName 死信队列名称
+ * @param params 消息内容
+ * @param expiration 过期时间 毫秒
+ */
+ public void sendDLXQueue(String queueName, String deadQueueName, Object params, Integer expiration) {
+ /**
+ * ----------------------------------先创建一个ttl队列和死信队列--------------------------------------------
+ */
+ Map map = new HashMap<>();
+ // 队列设置存活时间,单位ms, 必须是整形数据。
+ map.put("x-message-ttl", expiration);
+ // 设置死信交换机
+ map.put("x-dead-letter-exchange", DEAD_EXCHANGE);
+ // 设置死信交换器路由
+ map.put("x-dead-letter-routing-key", DEAD_ROUTING_KEY);
+ /*参数1:队列名称 参数2:持久化 参数3:是否排他 参数4:自动删除队列 参数5:队列参数*/
+ Queue queue = new Queue(queueName, true, false, false, map);
+ rabbitAdmin.declareQueue(queue);
+ /**
+ * ---------------------------------创建交换机---------------------------------------------
+ */
+ DirectExchange directExchange = new DirectExchange(EXCHANGE, true, false);
+ rabbitAdmin.declareExchange(directExchange);
+ /**
+ * ---------------------------------队列绑定交换机---------------------------------------------
+ */
+ Binding binding = BindingBuilder.bind(queue).to(directExchange).with(ROUTING_KEY);
+ rabbitAdmin.declareBinding(binding);
+
+ /**
+ * ---------------------------------在创建一个死信交换机和队列,接收死信队列---------------------------------------------
+ */
+ DirectExchange deadExchange = new DirectExchange(DEAD_EXCHANGE, true, false);
+ rabbitAdmin.declareExchange(deadExchange);
+
+ Queue deadQueue = new Queue(deadQueueName, true, false, false);
+ rabbitAdmin.declareQueue(deadQueue);
+ /**
+ * ---------------------------------队列绑定死信交换机---------------------------------------------
+ */
+ // 将队列和交换机绑定
+ Binding deadbinding = BindingBuilder.bind(deadQueue).to(deadExchange).with(DEAD_ROUTING_KEY);
+ rabbitAdmin.declareBinding(deadbinding);
+
+ // 发送消息
+ rabbitTemplate.convertAndSend(EXCHANGE, ROUTING_KEY, params);
+ }
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DelayedQueue.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DelayedQueue.java
new file mode 100644
index 0000000..8f45234
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/DelayedQueue.java
@@ -0,0 +1,98 @@
+package com.hamburg.rabbitmq.utils;
+
+import org.springframework.amqp.core.Binding;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.CustomExchange;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 发送延迟消息
+ *
+ * @author Administrator
+ */
+@Component
+public class DelayedQueue {
+
+ /**
+ * routingKey 绑定规则
+ */
+ private static final String DELAYED_ROUTING_KEY = "delayed.routing.key";
+
+ /**
+ * 延迟队列交换机 名称
+ */
+ private static final String DELAYED_EXCHANGE = "delayed.exchange";
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Autowired
+ private RabbitAdmin rabbitAdmin;
+
+ /**
+ * 发送延迟队列
+ *
+ * @param queueName 队列名称
+ * @param params 消息内容
+ * @param delayedTime 延迟时间 毫秒
+ */
+ public void sendDelayedQueue(String queueName, Object params, Integer delayedTime) {
+ // 先创建一个队列
+ Queue queue = new Queue(queueName);
+ rabbitAdmin.declareQueue(queue);
+
+ // 创建延迟队列交换机
+ CustomExchange customExchange = createCustomExchange();
+ rabbitAdmin.declareExchange(customExchange);
+
+ // 将队列和交换机绑定
+ Binding binding = BindingBuilder.bind(queue).to(customExchange).with(DELAYED_ROUTING_KEY).noargs();
+ rabbitAdmin.declareBinding(binding);
+
+ // 发送延迟消息
+ // 第四个参数: MessagePostProcessor 消息发送处理器 如果希望对发送的消息做包装 或者处理 需要用到 例如现在需要给发送的消息设置延迟时间
+ // 参数是一个接口: 那么需要给 当前接口的实现类 匿名内部类
+// MyMessagePostProcessor postProcessor = new MyMessagePostProcessor();
+// rabbitTemplate.convertAndSend(DELAYED_EXCHANGE, DELAYED_ROUTING_KEY, params, new MessagePostProcessor() {
+// @Override
+// public Message postProcessMessage(Message message) throws AmqpException {
+// // 设置消息的延迟时间
+// message.getMessageProperties().setDelay(2000);
+// return message;
+// }
+// });
+ rabbitTemplate.convertAndSend(DELAYED_EXCHANGE, DELAYED_ROUTING_KEY, params, message -> {
+ // 设置消息的延迟时间
+ message.getMessageProperties().setDelay(2000);
+ return message;
+ });
+ }
+
+ /**
+ * 构建延迟交换机
+ *
+ * @return
+ */
+ private CustomExchange createCustomExchange() {
+ Map arguments = new HashMap<>();
+ /**
+ * 参数说明:
+ * 1.交换机的名称
+ * 2.交换机的类型
+ * 3.是否需要持久化
+ * 4.是否自动删除
+ * 5.其它参数
+ */
+ arguments.put("x-delayed-type", "direct");
+ return new CustomExchange(DELAYED_EXCHANGE, "x-delayed-message", true, false, arguments);
+ }
+
+}
+
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/MyMessagePostProcessor.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/MyMessagePostProcessor.java
new file mode 100644
index 0000000..929307b
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/MyMessagePostProcessor.java
@@ -0,0 +1,20 @@
+package com.hamburg.rabbitmq.utils;
+
+import org.springframework.amqp.AmqpException;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.core.MessagePostProcessor;
+
+/**
+ * @ClassName:
+ * @Description:
+ * @Author: zhuwenqiang
+ * @Date: 2024/4/28
+ */
+public class MyMessagePostProcessor implements MessagePostProcessor {
+ @Override
+ public Message postProcessMessage(Message message) throws AmqpException {
+ // 设置消息的延迟时间
+ message.getMessageProperties().setDelay(2000);
+ return message;
+ }
+}
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/TtlQueue.java b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/TtlQueue.java
new file mode 100644
index 0000000..13d839f
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/java/com/hamburg/rabbitmq/utils/TtlQueue.java
@@ -0,0 +1,67 @@
+package com.hamburg.rabbitmq.utils;
+
+import org.springframework.amqp.core.Binding;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.DirectExchange;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 发送TTL消息 设置消息的过期时间
+ */
+@Component
+public class TtlQueue {
+
+ // routingKey
+ private static final String TTL_KEY = "ttl.routing.key";
+
+ private static final String TTL_EXCHANGE = "ttl.exchange";
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Resource
+ RabbitAdmin rabbitAdmin;
+
+ /**
+ * 发送TTL队列
+ *
+ * @param queueName 队列名称
+ * @param params 消息内容
+ * @param expiration 过期时间 毫秒
+ */
+ public void sendTTLQueue(String queueName, Object params, Integer expiration) {
+ /**
+ * ----------------------------------先创建一个ttl队列--------------------------------------------
+ */
+ Map map = new HashMap<>();
+ // 队列设置存活时间,单位ms,必须是整形数据。
+ map.put("x-message-ttl", expiration);
+ /*参数1:队列名称 参数2:持久化 参数 3:是否排他 参数 4:自动删除队列 参数 5:队列参数*/
+ Queue queue = new Queue(queueName, true, false, false, map);
+ rabbitAdmin.declareQueue(queue);
+
+ /**
+ * ---------------------------------创建交换机---------------------------------------------
+ */
+ DirectExchange directExchange = new DirectExchange(TTL_EXCHANGE, true, false);
+ rabbitAdmin.declareExchange(directExchange);
+ /**
+ * ---------------------------------队列绑定交换机---------------------------------------------
+ */
+ // 将队列和交换机绑定
+ Binding binding = BindingBuilder.bind(queue).to(directExchange).with(TTL_KEY);
+ rabbitAdmin.declareBinding(binding);
+
+ // 发送消息
+ rabbitTemplate.convertAndSend(TTL_EXCHANGE, TTL_KEY, params);
+ }
+}
+
diff --git a/hamburg-modules/hamburg-rabbitmq/src/main/resources/bootstrap.yml b/hamburg-modules/hamburg-rabbitmq/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..dee6c75
--- /dev/null
+++ b/hamburg-modules/hamburg-rabbitmq/src/main/resources/bootstrap.yml
@@ -0,0 +1,47 @@
+# Tomcat
+server:
+ port: 9090
+# Spring
+spring:
+ rabbitmq:
+ host: 124.70.191.180
+ port: 5672
+ username: guest
+ password: guest
+ virtual-host: /
+ listener:
+ simple:
+ prefetch: 1 # 每次取出一条消息消费消费完毕进行下一条
+ retry:
+ enabled: true
+ max-attempts: 3 # 重试次数
+ max-interval: 2000 # 重试间隔
+ acknowledge-mode: manual # 手动确认消息
+ publisher-confirm-type: correlated #确认消息已发送到交换机(Exchange)
+ publisher-returns: true #确认消息已发送到队列(Queue)
+ main:
+ allow-circular-references: true
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
+ time-zone: GMT+8
+ application:
+ # 应用名称
+ name: hamburg-mq
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ config:
+ # 配置中心地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/hamburg-modules/hamburg-record/pom.xml b/hamburg-modules/hamburg-record/pom.xml
new file mode 100644
index 0000000..bd68cd1
--- /dev/null
+++ b/hamburg-modules/hamburg-record/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+
+ org.example
+ hamburg-modules
+ 1.0-SNAPSHOT
+
+
+ hamburg-record
+
+
+ 8
+ 8
+ UTF-8
+
+
+
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/RecordApplication.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/RecordApplication.java
new file mode 100644
index 0000000..5d4b329
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/RecordApplication.java
@@ -0,0 +1,25 @@
+package com.hamburg.record;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record
+ * @Project:730ZK
+ * @name:RecordApplication
+ * @Date:2024/7/30 10:28
+ */
+@EnableScheduling
+@SpringBootApplication
+public class RecordApplication {
+
+ public static void main(String[] args) {
+
+ SpringApplication.run(RecordApplication.class, args);
+
+
+ }
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/controller/RecordController.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/controller/RecordController.java
new file mode 100644
index 0000000..4098503
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/controller/RecordController.java
@@ -0,0 +1,84 @@
+package com.hamburg.record.controller;
+
+import com.hamburg.common.domain.Contract;
+import com.hamburg.common.domain.Record;
+import com.hamburg.common.result.Result;
+import com.hamburg.record.service.RecordService;
+import com.hamburg.record.util.OssUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record.controller
+ * @Project:730ZK
+ * @name:RecordController
+ * @Date:2024/7/30 10:28
+ */
+@RestController
+@RequestMapping("/record")
+public class RecordController {
+
+ @Autowired
+ private RecordService recordService;
+
+
+ /**
+ * 判断此用户是否已经租房
+ * @return
+ */
+ @GetMapping("/rentHouse")
+ public Result rentHouse() {
+
+ Record record=recordService.findRecordById();
+
+ if(record!=null){
+
+ return Result.error();
+
+ }
+
+ return Result.success();
+
+ }
+
+ /**
+ * 合同期下拉框数据
+ */
+ @PostMapping("/findContractList")
+ public Result findContractList() {
+
+ List list=recordService.findContractList();
+ return Result.success(list);
+ }
+
+ /**
+ * 图片上传
+ * @param file
+ * @return
+ */
+ @PostMapping("/upload")
+ public Result upload(@RequestParam MultipartFile file) {
+
+ String s = OssUtil.uploadMultipartFile(file);
+
+ return Result.success(s);
+
+ }
+
+ /**
+ * 增加租房信息
+ */
+ @PostMapping("/addRecord")
+ public Result addRecord(@RequestBody Record record) {
+
+ int add=recordService.addRecord(record);
+
+ return add>0?Result.success():Result.error();
+ }
+
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/mapper/RecordMapper.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/mapper/RecordMapper.java
new file mode 100644
index 0000000..cab4532
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/mapper/RecordMapper.java
@@ -0,0 +1,32 @@
+package com.hamburg.record.mapper;
+
+import com.hamburg.common.domain.Contract;
+import com.hamburg.common.domain.Record;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record.mapper
+ * @Project:730ZK
+ * @name:RecordMapper
+ * @Date:2024/7/30 10:30
+ */
+@Mapper
+public interface RecordMapper {
+ Record recordMapper(@Param("userId") Integer userId);
+
+ List findContractList();
+
+
+ List findRecordList();
+
+ void updStatus(@Param("userId") Integer userId, @Param("recordId") Integer recordId);
+
+ void updBhStatus(@Param("userId") Integer userId, @Param("recordId") Integer recordId);
+
+ int addRecord( Record record);
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/scheduled/ScheduledTask.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/scheduled/ScheduledTask.java
new file mode 100644
index 0000000..495e7bf
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/scheduled/ScheduledTask.java
@@ -0,0 +1,71 @@
+package com.hamburg.record.scheduled;
+
+import com.hamburg.common.domain.Record;
+import com.hamburg.record.mapper.RecordMapper;
+import com.hamburg.record.service.RecordService;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record.scheduled
+ * @Project:730ZK
+ * @name:ScheduledTask
+ * @Date:2024/7/30 10:52
+ */
+@Component
+public class ScheduledTask {
+
+ @Autowired
+ private RecordMapper recordMapper;
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Scheduled(cron = "*/30 * * * * ?")
+ public void task(){
+
+ //获取所有租房记录
+ List list=recordMapper.findRecordList();
+
+ for (Record record : list) {
+
+ //获取用户的信用积分
+ Integer userCreditscore = record.getUserCreditscore();
+
+ //先获取折扣的价钱
+ BigDecimal decimal = record.getRecordDiscountedprice();
+
+
+ int residualCredit = userCreditscore / 100;
+
+ //用户总共可以抵的价钱
+ BigDecimal bigDecimal = BigDecimal.valueOf(residualCredit * 1000);
+
+
+ if(decimal.compareTo(bigDecimal)>0){
+
+ //如果钱够 审核通过
+
+ recordMapper.updStatus(record.getUserId(),record.getRecordId());
+
+ //通过给用户的发信息
+
+ rabbitTemplate.convertAndSend("Success",record.getUserName());
+
+ }
+ //审核驳回
+ rabbitTemplate.convertAndSend("Fail",record.getUserName());
+ //修改状态
+ recordMapper.updBhStatus(record.getUserId(),record.getRecordId());
+ }
+
+ }
+
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/RecordService.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/RecordService.java
new file mode 100644
index 0000000..5013986
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/RecordService.java
@@ -0,0 +1,23 @@
+package com.hamburg.record.service;
+
+import com.hamburg.common.domain.Contract;
+import com.hamburg.common.domain.Record;
+
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record.service
+ * @Project:730ZK
+ * @name:RecordService
+ * @Date:2024/7/30 10:29
+ */
+public interface RecordService {
+ Record findRecordById();
+
+ List findContractList();
+
+
+ int addRecord(Record record);
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/impl/RecordServciceImpl.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/impl/RecordServciceImpl.java
new file mode 100644
index 0000000..2d934a8
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/service/impl/RecordServciceImpl.java
@@ -0,0 +1,74 @@
+package com.hamburg.record.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hamburg.common.constants.TokenConstants;
+import com.hamburg.common.domain.Contract;
+import com.hamburg.common.domain.Record;
+import com.hamburg.common.domain.User;
+import com.hamburg.common.utils.JwtUtils;
+import com.hamburg.record.mapper.RecordMapper;
+import com.hamburg.record.service.RecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.record.service.impl
+ * @Project:730ZK
+ * @name:RecordServciceImpl
+ * @Date:2024/7/30 10:29
+ */
+@Service
+public class RecordServciceImpl implements RecordService{
+
+
+ @Autowired
+ private HttpServletRequest request;
+
+
+ @Autowired
+ private StringRedisTemplate stringRedisTemplate;
+
+
+ @Autowired
+ private RecordMapper recordMapper;
+
+ @Override
+ public Record findRecordById() {
+
+ User user = getUser();
+ Record record=recordMapper.recordMapper(user.getUserId());
+ return record;
+ }
+
+ @Override
+ public List findContractList() {
+ return recordMapper.findContractList();
+ }
+
+ @Override
+ public int addRecord(Record record) {
+ User user = getUser();
+ record.setUserId(user.getUserId());
+ record.setUserAge(user.getUserAge());
+ record.setUserSex(user.getUserSex());
+ record.setUserName(user.getUserName());
+ int add=recordMapper.addRecord(record);
+ return add;
+ }
+
+
+ public User getUser(){
+ String header = request.getHeader(TokenConstants.TOKEN);
+ String userKey = JwtUtils.getUserKey(header);
+ String s = stringRedisTemplate.opsForValue().get(TokenConstants.LOGIN_TOKEN_KEY + userKey);
+ User user = JSONObject.parseObject(s, User.class);
+ return user;
+
+ }
+}
diff --git a/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/util/OssUtil.java b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/util/OssUtil.java
new file mode 100644
index 0000000..9048141
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/java/com/hamburg/record/util/OssUtil.java
@@ -0,0 +1,158 @@
+package com.hamburg.record.util;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import com.aliyun.oss.model.GetObjectRequest;
+import com.aliyun.oss.model.PutObjectRequest;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.time.LocalDateTime;
+import java.util.UUID;
+
+@Log4j2
+public class OssUtil {
+
+ /**
+ * Endpoint 存储对象概述 阿里云主账号AccessKey,accessKeySecret拥有所有API的访问权限 访问路径前缀 存储对象概述
+ */
+ private static String endPoint = "oss-cn-shanghai.aliyuncs.com";
+ private static String accessKeyId = "LTAI5tDbRqXkC5i3SMrCSDcX";
+ private static String accessKeySecret = "XUzMZoHPLsjNLafHsdQnMElBWZATsu";
+ private static String accessPre = "https://mall-bw.oss-cn-shanghai.aliyuncs.com/";
+
+ /**
+ * bucket名称
+ *
+ * @return
+ */
+ private static String bucketName = "mall-bw";
+
+ private static OSS ossClient;
+
+ static {
+ ossClient = new OSSClientBuilder().build(
+ endPoint,
+ accessKeyId,
+ accessKeySecret);
+ log.info("oss服务连接成功!");
+ }
+
+ /**
+ * 默认路径上传本地文件
+ *
+ * @param filePath
+ */
+ public static String uploadFile(String filePath) {
+ return uploadFileForBucket(bucketName, getOssFilePath(filePath), filePath);
+ }
+
+ /**
+ * 默认路径上传multipartFile文件
+ *
+ * @param multipartFile
+ */
+ public static String uploadMultipartFile(MultipartFile multipartFile) {
+ return uploadMultipartFile(bucketName, getOssFilePath(multipartFile.getOriginalFilename()), multipartFile);
+ }
+
+ /**
+ * 上传 multipartFile 类型文件
+ *
+ * @param bucketName
+ * @param ossPath
+ * @param multipartFile
+ */
+ public static String uploadMultipartFile(String bucketName, String ossPath, MultipartFile multipartFile) {
+ InputStream inputStream = null;
+ try {
+ inputStream = multipartFile.getInputStream();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ uploadFileInputStreamForBucket(bucketName, ossPath, inputStream);
+ return accessPre + ossPath;
+ }
+
+ /**
+ * 使用File上传PutObject上传文件 ** 程序默认使用次方法上传
+ *
+ * @param bucketName 实例名称
+ * @param ossPath oss存储路径
+ * @param filePath 本地文件路径
+ */
+ public static String uploadFileForBucket(String bucketName, String ossPath, String filePath) {
+ // 创建PutObjectRequest对象。
+ PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, ossPath, new File(filePath));
+ // 上传
+ ossClient.putObject(putObjectRequest);
+ return accessPre + ossPath;
+ }
+
+ /**
+ * 使用文件流上传到指定的bucket实例
+ *
+ * @param bucketName 实例名称
+ * @param ossPath oss存储路径
+ * @param filePath 本地文件路径
+ */
+ public static String uploadFileInputStreamForBucket(String bucketName, String ossPath, String filePath) {
+
+ // 填写本地文件的完整路径。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件流。
+ InputStream inputStream = null;
+ try {
+ inputStream = new FileInputStream(filePath);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ // 填写Bucket名称和Object完整路径。Object完整路径中不能包含Bucket名称。
+ uploadFileInputStreamForBucket(bucketName, ossPath, inputStream);
+ return accessPre + ossPath;
+ }
+
+ public static void uploadFileInputStreamForBucket(String bucketName, String ossPath, InputStream inputStream) {
+ ossClient.putObject(bucketName, ossPath, inputStream);
+ }
+
+ /**
+ * 下载
+ *
+ * @param ossFilePath
+ * @param filePath
+ */
+ public static void downloadFile(String ossFilePath, String filePath) {
+ downloadFileForBucket(bucketName, ossFilePath, filePath);
+ }
+
+ /**
+ * 下载
+ *
+ * @param bucketName 实例名称
+ * @param ossFilePath oss存储路径
+ * @param filePath 本地文件路径
+ */
+ public static void downloadFileForBucket(String bucketName, String ossFilePath, String filePath) {
+ ossClient.getObject(new GetObjectRequest(bucketName, ossFilePath), new File(filePath));
+ }
+
+ /**
+ * @return
+ */
+ public static String getOssDefaultPath() {
+ LocalDateTime now = LocalDateTime.now();
+ String url =
+ now.getYear() + "/" +
+ now.getMonth() + "/" +
+ now.getDayOfMonth() + "/" +
+ now.getHour() + "/" +
+ now.getMinute() + "/";
+ return url;
+ }
+
+ public static String getOssFilePath(String filePath) {
+ String fileSuf = filePath.substring(filePath.indexOf(".") + 1);
+ return getOssDefaultPath() + UUID.randomUUID().toString() + "." + fileSuf;
+ }
+
+}
diff --git a/hamburg-modules/hamburg-record/src/main/resources/bootstrap.yml b/hamburg-modules/hamburg-record/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..eb8d5fe
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/resources/bootstrap.yml
@@ -0,0 +1,43 @@
+# Tomcat
+server:
+ port: 9006
+# Spring
+spring:
+ main:
+ allow-circular-references: true
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
+ time-zone: GMT+8
+ application:
+ # 应用名称
+ name: hamburg-record
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ config:
+ # 配置中心地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+fdfs:
+ so-timeout: 1500 # socket 连接时长
+ connect-timeout: 600 # 连接 tracker 服务器超时时长
+ # 这两个是你服务器的 IP 地址,注意 23000 端口也要打开,阿里云服务器记得配置安全组。tracker 要和 stroage 服务进行交流
+ tracker-list: 124.70.191.180:22122
+ web-server-url: 124.70.191.180:8888
+ pool:
+ jmx-enabled: false
+ # 生成缩略图
+ thumb-image:
+ height: 500
+ width: 500
diff --git a/hamburg-modules/hamburg-record/src/main/resources/mapper/IRecordMapper.xml b/hamburg-modules/hamburg-record/src/main/resources/mapper/IRecordMapper.xml
new file mode 100644
index 0000000..e0a1dbe
--- /dev/null
+++ b/hamburg-modules/hamburg-record/src/main/resources/mapper/IRecordMapper.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ update t_record set record_status=1 where user_id=#{userId} and record_id=#{recordId}
+
+
+ update t_record set record_status=0 where user_id=#{userId} and record_id=#{recordId}
+
+
+
+ INSERT INTO `730zk`.`t_record` ( `house_name`, `house_monthly`, `house_area`, `type_id`, `contract_id`, `record_price`, `record_discountedprice`, `user_id`, `user_name`, `record_time`, `user_sex`, `user_age`, `user_creditscore`, `record_status`)
+ VALUES ( #{houseName},#{houseMonthly},#{houseArea},#{typeId},#{contractId},#{recordPrice}, #{recordDiscountedprice},#{userId},#{userName},#{recordTime},#{userSex}, #{userAge},#{userCreditscore},#{recordStatus});
+
+
+ SELECT
+ t_record.*,
+ t_contract.contract_name
+ FROM
+ t_record
+ LEFT JOIN t_contract ON t_record.contract_id = t_contract.contract_id
+ where user_id=#{userId}
+
+
+ select * from t_contract
+
+
+ SELECT
+ t_record.*,
+ t_contract.contract_name
+ FROM
+ t_record
+ LEFT JOIN t_contract ON t_record.contract_id = t_contract.contract_id
+
+
diff --git a/hamburg-modules/hamburg-user/pom.xml b/hamburg-modules/hamburg-user/pom.xml
new file mode 100644
index 0000000..b9820ce
--- /dev/null
+++ b/hamburg-modules/hamburg-user/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+
+ org.example
+ hamburg-modules
+ 1.0-SNAPSHOT
+
+
+ hamburg-user
+
+
+ 8
+ 8
+ UTF-8
+
+
+
diff --git a/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/UserApplication.java b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/UserApplication.java
new file mode 100644
index 0000000..91bf45e
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/UserApplication.java
@@ -0,0 +1,25 @@
+package com.hamburg.user;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.user
+ * @Project:730ZK
+ * @name:UserApplication
+ * @Date:2024/7/30 9:22
+ */
+@SpringBootApplication
+@EnableFeignClients
+public class UserApplication {
+
+ public static void main(String[] args) {
+
+
+ SpringApplication.run(UserApplication.class, args);
+
+ }
+
+}
diff --git a/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/controller/UserController.java b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/controller/UserController.java
new file mode 100644
index 0000000..019c4b1
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/controller/UserController.java
@@ -0,0 +1,43 @@
+package com.hamburg.user.controller;
+
+import com.hamburg.common.domain.User;
+import com.hamburg.common.domain.request.UserReq;
+import com.hamburg.common.result.Result;
+import com.hamburg.user.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.user.controller
+ * @Project:730ZK
+ * @name:UserController
+ * @Date:2024/7/30 9:34
+ */
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+ @Autowired
+ private UserService userService;
+
+ /**
+ * 用户登录
+ * @param userReq
+ * @return
+ */
+ @PostMapping("/getLogin")
+ public Result getLogin(@RequestBody UserReq userReq) {
+
+ User user=userService.getLogin(userReq);
+
+ return Result.success(user);
+
+ }
+
+
+
+}
diff --git a/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/mapper/UserMaper.java b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/mapper/UserMaper.java
new file mode 100644
index 0000000..5a3b937
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/mapper/UserMaper.java
@@ -0,0 +1,20 @@
+package com.hamburg.user.mapper;
+
+import com.hamburg.common.domain.User;
+import com.hamburg.common.domain.request.UserReq;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.user.mapper
+ * @Project:730ZK
+ * @name:UserMaper
+ * @Date:2024/7/30 9:35
+ */
+@Mapper
+public interface UserMaper {
+
+
+ User getLogin(UserReq userReq);
+
+}
diff --git a/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/UserService.java b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/UserService.java
new file mode 100644
index 0000000..bc5b33a
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/UserService.java
@@ -0,0 +1,16 @@
+package com.hamburg.user.service;
+
+import com.hamburg.common.domain.User;
+import com.hamburg.common.domain.request.UserReq;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.user.service
+ * @Project:730ZK
+ * @name:UserService
+ * @Date:2024/7/30 9:34
+ */
+public interface UserService {
+ User getLogin(UserReq userReq);
+
+}
diff --git a/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/impl/UserServiceImpl.java b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/impl/UserServiceImpl.java
new file mode 100644
index 0000000..cd29138
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/java/com/hamburg/user/service/impl/UserServiceImpl.java
@@ -0,0 +1,30 @@
+package com.hamburg.user.service.impl;
+
+import com.hamburg.common.domain.User;
+import com.hamburg.common.domain.request.UserReq;
+import com.hamburg.user.mapper.UserMaper;
+import com.hamburg.user.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Author:liuxinyue
+ * @Package:com.hamburg.user.service.impl
+ * @Project:730ZK
+ * @name:UserServiceImpl
+ * @Date:2024/7/30 9:35
+ */
+@Service
+public class UserServiceImpl implements UserService {
+
+ @Autowired
+ private UserMaper userMaper;
+
+
+ @Override
+ public User getLogin(UserReq userReq) {
+
+
+ return userMaper.getLogin(userReq);
+ }
+}
diff --git a/hamburg-modules/hamburg-user/src/main/resources/bootstrap.yml b/hamburg-modules/hamburg-user/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..51b69e7
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/resources/bootstrap.yml
@@ -0,0 +1,43 @@
+# Tomcat
+server:
+ port: 9004
+# Spring
+spring:
+ main:
+ allow-circular-references: true
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
+ time-zone: GMT+8
+ application:
+ # 应用名称
+ name: hamburg-user
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ config:
+ # 配置中心地址
+ server-addr: 124.70.191.180:8848
+ namespace: High-five
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+fdfs:
+ so-timeout: 1500 # socket 连接时长
+ connect-timeout: 600 # 连接 tracker 服务器超时时长
+ # 这两个是你服务器的 IP 地址,注意 23000 端口也要打开,阿里云服务器记得配置安全组。tracker 要和 stroage 服务进行交流
+ tracker-list: 124.70.191.180:22122
+ web-server-url: 124.70.191.180:8888
+ pool:
+ jmx-enabled: false
+ # 生成缩略图
+ thumb-image:
+ height: 500
+ width: 500
diff --git a/hamburg-modules/hamburg-user/src/main/resources/mapper/IUserMapper.xml b/hamburg-modules/hamburg-user/src/main/resources/mapper/IUserMapper.xml
new file mode 100644
index 0000000..0e42072
--- /dev/null
+++ b/hamburg-modules/hamburg-user/src/main/resources/mapper/IUserMapper.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select * from t_user where user_name=#{userName} and user_pwd=#{userPwd}
+
+
+
diff --git a/hamburg-modules/pom.xml b/hamburg-modules/pom.xml
new file mode 100644
index 0000000..93b7456
--- /dev/null
+++ b/hamburg-modules/pom.xml
@@ -0,0 +1,89 @@
+
+
+ 4.0.0
+
+ org.example
+ 730ZK
+ 1.0-SNAPSHOT
+
+
+ hamburg-modules
+ pom
+
+ hamburg-user
+ hamburg-house
+ hamburg-record
+ hamburg-rabbitmq
+
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.16.3
+
+
+
+ com.baomidou
+ lock4j-redis-template-spring-boot-starter
+ 2.2.7
+
+
+
+ org.example
+ hamburg-common
+ 1.0-SNAPSHOT
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.2.8
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 2.2.2
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.4.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.github.tobato
+ fastdfs-client
+ 1.26.5
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..721a52a
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,68 @@
+
+
+ 4.0.0
+
+ org.example
+ 730ZK
+ 1.0-SNAPSHOT
+ pom
+
+ hamburg-common
+ hamburg-auth
+ hamburg-gateway
+ hamburg-modules
+
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+
+ spring-boot-starter-parent
+ org.springframework.boot
+ 2.6.2
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ 2021.0.0
+ pom
+ import
+
+
+
+ com.alibaba.cloud
+ spring-cloud-alibaba-dependencies
+ 2021.1
+ pom
+ import
+
+
+
+ com.alibaba.nacos
+ nacos-client
+ 2.0.4
+
+
+
+
+ org.example
+ hamburg-common
+ 1.0-SNAPSHOT
+
+
+
+
+
+