Procházet zdrojové kódy

任务提交 客户订单查询接口 完成部分

秦国才 před 4 roky
rodič
revize
f4be7b53bf

+ 14 - 0
modules/get-order/pom.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>modules</artifactId>
+        <groupId>com.blue</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>get-order</artifactId>
+
+</project>

+ 19 - 0
modules/get-order/src/main/java/com/fire/getorder/GetOrderApplication.java

@@ -0,0 +1,19 @@
+package com.fire.getorder;
+
+import com.spring4all.swagger.EnableSwagger2Doc;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication(scanBasePackages = {"com.fire.getorder","com.fire.common.redis"})
+@EnableDiscoveryClient
+@EnableSwagger2Doc
+@EnableScheduling
+public class GetOrderApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(GetOrderApplication.class, args);
+    }
+
+}

+ 37 - 0
modules/get-order/src/main/java/com/fire/getorder/rest/GetOrderRest.java

@@ -0,0 +1,37 @@
+package com.fire.getorder.rest;
+
+
+
+import com.fire.dto.response.BaseRestResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.util.Map;
+
+
+@Api(tags = "客户获取订单信息")
+@RestController
+@RequestMapping("/gateway")
+public class GetOrderRest {
+
+
+    /**
+     * 订单查询
+     *
+     * @param  msg 下单参数
+     * @return OrderSearchResponse( 下单响应对象
+     */
+    @PostMapping("/flowservice/queryorder.ws")
+    @ApiOperation(value = "订单信息", notes = "order_search.py")
+    public void orderSearch(@RequestBody String msg) {
+
+    }
+
+
+
+
+}

+ 15 - 0
modules/get-order/src/main/resources/bootstrap.yml

@@ -0,0 +1,15 @@
+server:
+  port: 8091
+spring:
+  application:
+    name: get-order
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.106.133.48:8848
+        file-extension: yaml
+        namespace: fire
+      discovery:
+        server-addr: 47.106.133.48:8848
+        namespace: fire
+        service: get-order

+ 1 - 0
modules/pom.xml

@@ -17,6 +17,7 @@
         <module>fmp-customer</module>
         <module>distribution</module>
         <module>save-data</module>
+        <module>get-order</module>
     </modules>
 
     <dependencies>