From dd0627e4526cd9f735753ebb6f2bb76effe0cc4d Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Wed, 10 Aug 2022 14:48:21 +0800
Subject: [PATCH] 1
---
.../com/cweb/controller/OrderController.java | 46 +++++++++++++++++++
.../src/main/resources/dev/application.yml | 25 ++++++++--
hai-service/pom.xml | 5 ++
3 files changed, 73 insertions(+), 3 deletions(-)
create mode 100644 hai-order/src/main/java/com/cweb/controller/OrderController.java
diff --git a/hai-order/src/main/java/com/cweb/controller/OrderController.java b/hai-order/src/main/java/com/cweb/controller/OrderController.java
new file mode 100644
index 00000000..10cc225c
--- /dev/null
+++ b/hai-order/src/main/java/com/cweb/controller/OrderController.java
@@ -0,0 +1,46 @@
+package com.cweb.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.hai.common.Base64Util;
+import com.hai.common.exception.ErrorCode;
+import com.hai.common.exception.ErrorHelp;
+import com.hai.common.exception.SysCode;
+import com.hai.common.security.AESEncodeUtil;
+import com.hai.common.utils.ResponseMsgUtil;
+import com.hai.entity.HighDiscountAgentCode;
+import com.hai.entity.HighDiscountAgentRel;
+import com.hai.model.ResponseData;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+@Controller
+@RequestMapping(value = "")
+@Api(value = "订单业务")
+public class OrderController {
+
+ private static Logger log = LoggerFactory.getLogger(OrderController.class);
+
+ @RequestMapping(value="/create",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "创建订单")
+ public ResponseData create(@RequestBody JSONObject body) {
+ try {
+
+ if (body == null) {
+
+ }
+
+ return ResponseMsgUtil.success(null);
+
+ } catch (Exception e) {
+ log.error("OrderController -> create() error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+}
diff --git a/hai-order/src/main/resources/dev/application.yml b/hai-order/src/main/resources/dev/application.yml
index c7da0636..dd069aac 100644
--- a/hai-order/src/main/resources/dev/application.yml
+++ b/hai-order/src/main/resources/dev/application.yml
@@ -9,8 +9,8 @@ debug: true
#datasource数据源设置
spring:
datasource:
- url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
- username: hfkj
+ url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
+ username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
@@ -39,13 +39,32 @@ spring:
max-wait: -1
max-idle: 10
min-idle: 0
+ #MQTT配置信息
+ mqtt:
+ #MQTT服务地址
+ url: ws://139.159.177.244:8083/mqtt
+ #用户名
+ username: printer_provider
+ #密码
+ password: 123654
+ #客户端id(不能重复)
+ # client:
+ # id: provider-id
+ #MQTT默认的消息推送主题,实际可在调用接口是指定
+ # default:
+ # topic: topic
+ rocketmq:
+ name-server: 127.0.0.1:9876
+ producer:
+ #必须指定group
+ group: test-group
#配置日期返回至前台为时间戳
jackson:
serialization:
write-dates-as-timestamps: true
mybatis:
mapperLocations:
- - classpath*:sqlmap*/*.xml
+ - classpath*:sqlmap*/*.xml
type-aliases-package:
org.springboot.sample.entity
diff --git a/hai-service/pom.xml b/hai-service/pom.xml
index 1f0d244b..a84535f0 100644
--- a/hai-service/pom.xml
+++ b/hai-service/pom.xml
@@ -268,6 +268,11 @@
org.springframework.integration
spring-integration-mqtt
+
+ org.apache.rocketmq
+ rocketmq-spring-boot-starter
+ 2.2.2
+
io.netty
netty-all