dev-discount
胡锐 2 years ago
parent a40ece69fa
commit dd0627e452
  1. 46
      hai-order/src/main/java/com/cweb/controller/OrderController.java
  2. 25
      hai-order/src/main/resources/dev/application.yml
  3. 5
      hai-service/pom.xml

@ -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);
}
}
}

@ -9,8 +9,8 @@ debug: true
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: hfkj username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
@ -39,13 +39,32 @@ spring:
max-wait: -1 max-wait: -1
max-idle: 10 max-idle: 10
min-idle: 0 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: jackson:
serialization: serialization:
write-dates-as-timestamps: true write-dates-as-timestamps: true
mybatis: mybatis:
mapperLocations: mapperLocations:
- classpath*:sqlmap*/*.xml - classpath*:sqlmap*/*.xml
type-aliases-package: type-aliases-package:
org.springboot.sample.entity org.springboot.sample.entity

@ -268,6 +268,11 @@
<groupId>org.springframework.integration</groupId> <groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mqtt</artifactId> <artifactId>spring-integration-mqtt</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>2.2.2</version>
</dependency>
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>netty-all</artifactId>

Loading…
Cancel
Save