diff --git a/order/order-client/pom.xml b/order/order-client/pom.xml
new file mode 100644
index 0000000..2918856
--- /dev/null
+++ b/order/order-client/pom.xml
@@ -0,0 +1,15 @@
+
+
+
+ order
+ cn.algerfan
+ 0.0.1-SNAPSHOT
+
+ 4.0.0
+
+ order-client
+
+
+
\ No newline at end of file
diff --git a/order/order-common/pom.xml b/order/order-common/pom.xml
new file mode 100644
index 0000000..ffa57cd
--- /dev/null
+++ b/order/order-common/pom.xml
@@ -0,0 +1,15 @@
+
+
+
+ order
+ cn.algerfan
+ 0.0.1-SNAPSHOT
+
+ 4.0.0
+
+ order-common
+
+
+
\ No newline at end of file
diff --git a/order/order-server/pom.xml b/order/order-server/pom.xml
new file mode 100644
index 0000000..ea2c411
--- /dev/null
+++ b/order/order-server/pom.xml
@@ -0,0 +1,77 @@
+
+
+
+ order
+ cn.algerfan
+ 0.0.1-SNAPSHOT
+
+ 4.0.0
+
+ order-server
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ mysql
+ mysql-connector-java
+
+
+ org.projectlombok
+ lombok
+
+
+ com.google.code.gson
+ gson
+
+
+ org.springframework.cloud
+ spring-cloud-config-client
+
+
+ cn.algerfan
+ product-client
+ ${product-client.version}
+
+
+ cn.algerfan
+ product-common
+ ${product-common.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
\ No newline at end of file
diff --git a/order/src/main/java/cn/algerfan/order/OrderApplication.java b/order/order-server/src/main/java/cn/algerfan/order/server/OrderApplication.java
similarity index 94%
rename from order/src/main/java/cn/algerfan/order/OrderApplication.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/OrderApplication.java
index 9f54cb8..5ab2b15 100755
--- a/order/src/main/java/cn/algerfan/order/OrderApplication.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/OrderApplication.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order;
+package cn.algerfan.order.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/order/src/main/java/cn/algerfan/order/config/RestTemplateConfig.java b/order/order-server/src/main/java/cn/algerfan/order/server/config/RestTemplateConfig.java
similarity index 87%
rename from order/src/main/java/cn/algerfan/order/config/RestTemplateConfig.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/config/RestTemplateConfig.java
index 6586920..616ac64 100755
--- a/order/src/main/java/cn/algerfan/order/config/RestTemplateConfig.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/config/RestTemplateConfig.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.config;
+package cn.algerfan.order.server.config;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
diff --git a/order/src/main/java/cn/algerfan/order/controller/ClientController.java b/order/order-server/src/main/java/cn/algerfan/order/server/controller/ClientController.java
similarity index 89%
rename from order/src/main/java/cn/algerfan/order/controller/ClientController.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/controller/ClientController.java
index 9b425eb..ec1b250 100755
--- a/order/src/main/java/cn/algerfan/order/controller/ClientController.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/controller/ClientController.java
@@ -1,8 +1,8 @@
-package cn.algerfan.order.controller;
+package cn.algerfan.order.server.controller;
-import cn.algerfan.order.client.ProductClient;
-import cn.algerfan.order.common.DecreaseStockOutput;
-import cn.algerfan.order.common.ProductInfoOutput;
+import cn.algerfan.product.client.ProductClient;
+import cn.algerfan.product.common.DecreaseStockOutput;
+import cn.algerfan.product.common.ProductInfoOutput;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
diff --git a/order/src/main/java/cn/algerfan/order/controller/OrderController.java b/order/order-server/src/main/java/cn/algerfan/order/server/controller/OrderController.java
similarity index 77%
rename from order/src/main/java/cn/algerfan/order/controller/OrderController.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/controller/OrderController.java
index 8d1c1ca..7e5230b 100755
--- a/order/src/main/java/cn/algerfan/order/controller/OrderController.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/controller/OrderController.java
@@ -1,13 +1,13 @@
-package cn.algerfan.order.controller;
+package cn.algerfan.order.server.controller;
-import cn.algerfan.order.form.OrderForm;
-import cn.algerfan.order.converter.OrderFormToOrderDto;
-import cn.algerfan.order.dto.OrderDto;
-import cn.algerfan.order.enums.Result;
-import cn.algerfan.order.exception.OrderException;
-import cn.algerfan.order.service.OrderService;
-import cn.algerfan.order.util.ResultVoUtil;
-import cn.algerfan.order.vo.ResultVo;
+import cn.algerfan.order.server.converter.OrderFormToOrderDto;
+import cn.algerfan.order.server.dto.OrderDto;
+import cn.algerfan.order.server.enums.Result;
+import cn.algerfan.order.server.exception.OrderException;
+import cn.algerfan.order.server.form.OrderForm;
+import cn.algerfan.order.server.service.OrderService;
+import cn.algerfan.order.server.util.ResultVoUtil;
+import cn.algerfan.order.server.vo.ResultVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
diff --git a/order/src/main/java/cn/algerfan/order/converter/OrderFormToOrderDto.java b/order/order-server/src/main/java/cn/algerfan/order/server/converter/OrderFormToOrderDto.java
similarity index 75%
rename from order/src/main/java/cn/algerfan/order/converter/OrderFormToOrderDto.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/converter/OrderFormToOrderDto.java
index 77f1e7d..20486cf 100755
--- a/order/src/main/java/cn/algerfan/order/converter/OrderFormToOrderDto.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/converter/OrderFormToOrderDto.java
@@ -1,10 +1,10 @@
-package cn.algerfan.order.converter;
+package cn.algerfan.order.server.converter;
-import cn.algerfan.order.exception.OrderException;
-import cn.algerfan.order.form.OrderForm;
-import cn.algerfan.order.domain.OrderDetail;
-import cn.algerfan.order.dto.OrderDto;
-import cn.algerfan.order.enums.Result;
+import cn.algerfan.order.server.dto.OrderDto;
+import cn.algerfan.order.server.enums.Result;
+import cn.algerfan.order.server.exception.OrderException;
+import cn.algerfan.order.server.form.OrderForm;
+import cn.algerfan.order.server.domain.OrderDetail;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
diff --git a/order/src/main/java/cn/algerfan/order/domain/OrderDetail.java b/order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderDetail.java
similarity index 88%
rename from order/src/main/java/cn/algerfan/order/domain/OrderDetail.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderDetail.java
index 0ff5d57..98b8bea 100755
--- a/order/src/main/java/cn/algerfan/order/domain/OrderDetail.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderDetail.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.domain;
+package cn.algerfan.order.server.domain;
import lombok.Data;
diff --git a/order/src/main/java/cn/algerfan/order/domain/OrderMaster.java b/order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderMaster.java
similarity index 90%
rename from order/src/main/java/cn/algerfan/order/domain/OrderMaster.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderMaster.java
index 02ea769..1e7f336 100755
--- a/order/src/main/java/cn/algerfan/order/domain/OrderMaster.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/domain/OrderMaster.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.domain;
+package cn.algerfan.order.server.domain;
import lombok.Data;
diff --git a/order/src/main/java/cn/algerfan/order/dto/OrderDto.java b/order/order-server/src/main/java/cn/algerfan/order/server/dto/OrderDto.java
similarity index 84%
rename from order/src/main/java/cn/algerfan/order/dto/OrderDto.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/dto/OrderDto.java
index f431fe0..1869bcf 100755
--- a/order/src/main/java/cn/algerfan/order/dto/OrderDto.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/dto/OrderDto.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.dto;
+package cn.algerfan.order.server.dto;
-import cn.algerfan.order.domain.OrderDetail;
+import cn.algerfan.order.server.domain.OrderDetail;
import lombok.Data;
import java.math.BigDecimal;
diff --git a/order/src/main/java/cn/algerfan/order/enums/OrderStatus.java b/order/order-server/src/main/java/cn/algerfan/order/server/enums/OrderStatus.java
similarity index 86%
rename from order/src/main/java/cn/algerfan/order/enums/OrderStatus.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/enums/OrderStatus.java
index e2c3b58..f795c25 100755
--- a/order/src/main/java/cn/algerfan/order/enums/OrderStatus.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/enums/OrderStatus.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.enums;
+package cn.algerfan.order.server.enums;
import lombok.Getter;
diff --git a/order/src/main/java/cn/algerfan/order/enums/PayStatus.java b/order/order-server/src/main/java/cn/algerfan/order/server/enums/PayStatus.java
similarity index 85%
rename from order/src/main/java/cn/algerfan/order/enums/PayStatus.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/enums/PayStatus.java
index 889fec0..71d731a 100755
--- a/order/src/main/java/cn/algerfan/order/enums/PayStatus.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/enums/PayStatus.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.enums;
+package cn.algerfan.order.server.enums;
import lombok.Getter;
diff --git a/order/src/main/java/cn/algerfan/order/enums/Result.java b/order/order-server/src/main/java/cn/algerfan/order/server/enums/Result.java
similarity index 86%
rename from order/src/main/java/cn/algerfan/order/enums/Result.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/enums/Result.java
index 98982e9..3390d1e 100755
--- a/order/src/main/java/cn/algerfan/order/enums/Result.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/enums/Result.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.enums;
+package cn.algerfan.order.server.enums;
import lombok.Getter;
diff --git a/order/src/main/java/cn/algerfan/order/exception/OrderException.java b/order/order-server/src/main/java/cn/algerfan/order/server/exception/OrderException.java
similarity index 77%
rename from order/src/main/java/cn/algerfan/order/exception/OrderException.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/exception/OrderException.java
index 48ffc19..260dd24 100755
--- a/order/src/main/java/cn/algerfan/order/exception/OrderException.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/exception/OrderException.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.exception;
+package cn.algerfan.order.server.exception;
-import cn.algerfan.order.enums.Result;
+import cn.algerfan.order.server.enums.Result;
/**
* @author algerfan
diff --git a/order/src/main/java/cn/algerfan/order/form/OrderForm.java b/order/order-server/src/main/java/cn/algerfan/order/server/form/OrderForm.java
similarity index 89%
rename from order/src/main/java/cn/algerfan/order/form/OrderForm.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/form/OrderForm.java
index 03e482d..ac53c0b 100755
--- a/order/src/main/java/cn/algerfan/order/form/OrderForm.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/form/OrderForm.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.form;
+package cn.algerfan.order.server.form;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
diff --git a/order/src/main/java/cn/algerfan/order/repository/OrderDetailRepository.java b/order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderDetailRepository.java
similarity index 64%
rename from order/src/main/java/cn/algerfan/order/repository/OrderDetailRepository.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderDetailRepository.java
index 9a92a38..c9fa10e 100755
--- a/order/src/main/java/cn/algerfan/order/repository/OrderDetailRepository.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderDetailRepository.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.repository;
+package cn.algerfan.order.server.repository;
-import cn.algerfan.order.domain.OrderDetail;
+import cn.algerfan.order.server.domain.OrderDetail;
import org.springframework.data.jpa.repository.JpaRepository;
/**
diff --git a/order/src/main/java/cn/algerfan/order/repository/OrderMasterRepository.java b/order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderMasterRepository.java
similarity index 64%
rename from order/src/main/java/cn/algerfan/order/repository/OrderMasterRepository.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderMasterRepository.java
index 7dcec75..721b1aa 100755
--- a/order/src/main/java/cn/algerfan/order/repository/OrderMasterRepository.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/repository/OrderMasterRepository.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.repository;
+package cn.algerfan.order.server.repository;
-import cn.algerfan.order.domain.OrderMaster;
+import cn.algerfan.order.server.domain.OrderMaster;
import org.springframework.data.jpa.repository.JpaRepository;
/**
diff --git a/order/src/main/java/cn/algerfan/order/service/OrderService.java b/order/order-server/src/main/java/cn/algerfan/order/server/service/OrderService.java
similarity index 67%
rename from order/src/main/java/cn/algerfan/order/service/OrderService.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/service/OrderService.java
index 81d14ad..ddcbd80 100755
--- a/order/src/main/java/cn/algerfan/order/service/OrderService.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/service/OrderService.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.service;
+package cn.algerfan.order.server.service;
-import cn.algerfan.order.dto.OrderDto;
+import cn.algerfan.order.server.dto.OrderDto;
/**
* @author algerfan
diff --git a/order/src/main/java/cn/algerfan/order/service/impl/OrderServiceImpl.java b/order/order-server/src/main/java/cn/algerfan/order/server/service/impl/OrderServiceImpl.java
similarity index 77%
rename from order/src/main/java/cn/algerfan/order/service/impl/OrderServiceImpl.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/service/impl/OrderServiceImpl.java
index 9f81a5f..e8bbaaf 100755
--- a/order/src/main/java/cn/algerfan/order/service/impl/OrderServiceImpl.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/service/impl/OrderServiceImpl.java
@@ -1,17 +1,17 @@
-package cn.algerfan.order.service.impl;
+package cn.algerfan.order.server.service.impl;
-import cn.algerfan.order.client.ProductClient;
-import cn.algerfan.order.common.DecreaseStockOutput;
-import cn.algerfan.order.common.ProductInfoOutput;
-import cn.algerfan.order.repository.OrderDetailRepository;
-import cn.algerfan.order.repository.OrderMasterRepository;
-import cn.algerfan.order.domain.OrderDetail;
-import cn.algerfan.order.domain.OrderMaster;
-import cn.algerfan.order.dto.OrderDto;
-import cn.algerfan.order.enums.OrderStatus;
-import cn.algerfan.order.enums.PayStatus;
-import cn.algerfan.order.service.OrderService;
-import cn.algerfan.order.util.KeyUtil;
+import cn.algerfan.order.server.repository.OrderDetailRepository;
+import cn.algerfan.order.server.repository.OrderMasterRepository;
+import cn.algerfan.order.server.domain.OrderDetail;
+import cn.algerfan.order.server.domain.OrderMaster;
+import cn.algerfan.order.server.dto.OrderDto;
+import cn.algerfan.order.server.enums.OrderStatus;
+import cn.algerfan.order.server.enums.PayStatus;
+import cn.algerfan.order.server.service.OrderService;
+import cn.algerfan.order.server.util.KeyUtil;
+import cn.algerfan.product.client.ProductClient;
+import cn.algerfan.product.common.DecreaseStockOutput;
+import cn.algerfan.product.common.ProductInfoOutput;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/order/src/main/java/cn/algerfan/order/util/KeyUtil.java b/order/order-server/src/main/java/cn/algerfan/order/server/util/KeyUtil.java
similarity index 87%
rename from order/src/main/java/cn/algerfan/order/util/KeyUtil.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/util/KeyUtil.java
index fb377f8..791fc6f 100755
--- a/order/src/main/java/cn/algerfan/order/util/KeyUtil.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/util/KeyUtil.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.util;
+package cn.algerfan.order.server.util;
import java.util.Random;
diff --git a/order/src/main/java/cn/algerfan/order/util/ResultVoUtil.java b/order/order-server/src/main/java/cn/algerfan/order/server/util/ResultVoUtil.java
similarity index 76%
rename from order/src/main/java/cn/algerfan/order/util/ResultVoUtil.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/util/ResultVoUtil.java
index 80ca5f3..4f7d853 100755
--- a/order/src/main/java/cn/algerfan/order/util/ResultVoUtil.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/util/ResultVoUtil.java
@@ -1,6 +1,6 @@
-package cn.algerfan.order.util;
+package cn.algerfan.order.server.util;
-import cn.algerfan.order.vo.ResultVo;
+import cn.algerfan.order.server.vo.ResultVo;
/**
* @author algerfan
diff --git a/order/src/main/java/cn/algerfan/order/vo/ResultVo.java b/order/order-server/src/main/java/cn/algerfan/order/server/vo/ResultVo.java
similarity index 76%
rename from order/src/main/java/cn/algerfan/order/vo/ResultVo.java
rename to order/order-server/src/main/java/cn/algerfan/order/server/vo/ResultVo.java
index 3cca610..13ab232 100755
--- a/order/src/main/java/cn/algerfan/order/vo/ResultVo.java
+++ b/order/order-server/src/main/java/cn/algerfan/order/server/vo/ResultVo.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order.vo;
+package cn.algerfan.order.server.vo;
import lombok.Data;
diff --git a/order/src/main/resources/application.yml b/order/order-server/src/main/resources/application.yml
similarity index 100%
rename from order/src/main/resources/application.yml
rename to order/order-server/src/main/resources/application.yml
diff --git a/order/src/test/java/cn/algerfan/order/OrderApplicationTests.java b/order/order-server/src/test/java/cn/algerfan/order/server/OrderApplicationTests.java
similarity index 90%
rename from order/src/test/java/cn/algerfan/order/OrderApplicationTests.java
rename to order/order-server/src/test/java/cn/algerfan/order/server/OrderApplicationTests.java
index fc8af0d..6ab34a2 100755
--- a/order/src/test/java/cn/algerfan/order/OrderApplicationTests.java
+++ b/order/order-server/src/test/java/cn/algerfan/order/server/OrderApplicationTests.java
@@ -1,4 +1,4 @@
-package cn.algerfan.order;
+package cn.algerfan.order.server;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/order/src/test/java/cn/algerfan/order/repository/OrderDetailRepositoryTest.java b/order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderDetailRepositoryTest.java
similarity index 86%
rename from order/src/test/java/cn/algerfan/order/repository/OrderDetailRepositoryTest.java
rename to order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderDetailRepositoryTest.java
index dab88ca..b0ec1e9 100755
--- a/order/src/test/java/cn/algerfan/order/repository/OrderDetailRepositoryTest.java
+++ b/order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderDetailRepositoryTest.java
@@ -1,8 +1,8 @@
-package cn.algerfan.order.repository;
+package cn.algerfan.order.server.repository;
-import cn.algerfan.order.OrderApplicationTests;
+import cn.algerfan.order.server.OrderApplicationTests;
-import cn.algerfan.order.domain.OrderDetail;
+import cn.algerfan.order.server.domain.OrderDetail;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/order/src/test/java/cn/algerfan/order/repository/OrderMasterRepositoryTest.java b/order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderMasterRepositoryTest.java
similarity index 80%
rename from order/src/test/java/cn/algerfan/order/repository/OrderMasterRepositoryTest.java
rename to order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderMasterRepositoryTest.java
index ba3eb21..e0150bb 100755
--- a/order/src/test/java/cn/algerfan/order/repository/OrderMasterRepositoryTest.java
+++ b/order/order-server/src/test/java/cn/algerfan/order/server/repository/OrderMasterRepositoryTest.java
@@ -1,9 +1,9 @@
-package cn.algerfan.order.repository;
+package cn.algerfan.order.server.repository;
-import cn.algerfan.order.OrderApplicationTests;
-import cn.algerfan.order.domain.OrderMaster;
-import cn.algerfan.order.enums.OrderStatus;
-import cn.algerfan.order.enums.PayStatus;
+import cn.algerfan.order.server.OrderApplicationTests;
+import cn.algerfan.order.server.domain.OrderMaster;
+import cn.algerfan.order.server.enums.OrderStatus;
+import cn.algerfan.order.server.enums.PayStatus;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/order/pom.xml b/order/pom.xml
index 59081f0..b908cde 100755
--- a/order/pom.xml
+++ b/order/pom.xml
@@ -2,6 +2,11 @@
4.0.0
+
+ order-server
+ order-common
+ order-client
+
org.springframework.boot
spring-boot-starter-parent
@@ -13,7 +18,7 @@
order
0.0.1-SNAPSHOT
order
- jar
+ pom
Demo project for Spring Boot
@@ -24,50 +29,6 @@
0.0.1-SNAPSHOT
-
-
- org.springframework.cloud
- spring-cloud-starter-netflix-eureka-client
-
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- mysql
- mysql-connector-java
-
-
- org.projectlombok
- lombok
-
-
- com.google.code.gson
- gson
-
-
- org.springframework.cloud
- spring-cloud-config-client
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
@@ -117,13 +78,4 @@
-->
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
diff --git a/order/src/main/java/cn/algerfan/order/client/ProductClient.java b/order/src/main/java/cn/algerfan/order/client/ProductClient.java
deleted file mode 100644
index a7fbe21..0000000
--- a/order/src/main/java/cn/algerfan/order/client/ProductClient.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.algerfan.order.client;
-
-import cn.algerfan.order.common.DecreaseStockOutput;
-import cn.algerfan.order.common.ProductInfoOutput;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import java.util.List;
-
-/**
- * @author algerfan
- * @time 2019 21: 39
- */
-@FeignClient(name = "product")
-public interface ProductClient {
-
- /**
- * 根据id查找商品
- * @param productIdList id集合
- * @return 传输对象
- */
- @PostMapping("/product/listForOrder")
- List productInfoList(@RequestBody List productIdList);
-
- /**
- * 扣库存
- * @param decreaseStockOutputs 传输对象
- */
- @PostMapping("/product/decreaseStock")
- void decreaseStock(@RequestBody List decreaseStockOutputs);
-
-}
diff --git a/order/src/main/java/cn/algerfan/order/common/DecreaseStockOutput.java b/order/src/main/java/cn/algerfan/order/common/DecreaseStockOutput.java
deleted file mode 100644
index 895c16b..0000000
--- a/order/src/main/java/cn/algerfan/order/common/DecreaseStockOutput.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.algerfan.order.common;
-
-import lombok.Data;
-
-/**
- * @author algerfan
- * @time 2019 18: 00
- */
-@Data
-public class DecreaseStockOutput {
- /**
- * 商品id
- */
- private String productId;
-
- /**
- * 商品数量
- */
- private Integer productQuantity;
-
- public DecreaseStockOutput(String productId, Integer productQuantity) {
- this.productId = productId;
- this.productQuantity = productQuantity;
- }
-}
diff --git a/order/src/main/java/cn/algerfan/order/common/ProductInfoOutput.java b/order/src/main/java/cn/algerfan/order/common/ProductInfoOutput.java
deleted file mode 100644
index 4fb60b6..0000000
--- a/order/src/main/java/cn/algerfan/order/common/ProductInfoOutput.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.algerfan.order.common;
-
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * @author algerfan
- * @time 2019 17: 58
- */
-@Data
-public class ProductInfoOutput {
- private String productId;
-
- /** 名字. */
- private String productName;
-
- /** 单价. */
- private BigDecimal productPrice;
-
- /** 库存. */
- private Integer productStock;
-
- /** 描述. */
- private String productDescription;
-
- /** 小图. */
- private String productIcon;
-
- /** 状态, 0正常1下架. */
- private Integer productStatus;
-
- /** 类目编号. */
- private Integer categoryType;
-
- private Date createTime;
-
- private Date updateTime;
-}