记得上下班打卡 | git大法好,push需谨慎

Commit 2e53c157 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents 687ecb29 d36a2832
create database if not exists ln_scene character set utf8mb4 collate utf8mb4_unicode_ci;
-- >>------------------------------------------------------------------------------------
use ln_scene;
-- 支付订单表
drop TABLE if exists `dragon_orders`;
CREATE TABLE `dragon_orders`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`status` tinyint NOT NULL DEFAULT '0' COMMENT '订单状态',
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '订单支付编号',
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '订单类型',
`price` decimal(10, 2) NOT NULL COMMENT '总价格',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '类别或名称',
`detail` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '详情或描述',
`order_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '调用端订单编号',
`client_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户客户端ip地址',
`notify_url` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '支付完成通知回调地址',
`payment_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '支付类型',
`payment_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '支付的订单号',
`payment_at` timestamp NULL DEFAULT NULL COMMENT '支付时间',
`finished_at` timestamp NULL DEFAULT NULL COMMENT '结束时间',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT '删除时间',
PRIMARY KEY (`id`),
UNIQUE KEY `orders_code_unique` (`code`),
UNIQUE KEY `orders_payment_id_unique` (`payment_id`),
KEY `orders_payment_type_index` (`payment_type`),
KEY `orders_status_index` (`status`),
KEY `orders_type_index` (`type`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '支付订单表';
-- 支付订单日志表
drop TABLE if exists `dragon_order_logs`;
CREATE TABLE `dragon_order_logs`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`order_id` bigint NOT NULL COMMENT '订单id',
`payment_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '支付类型',
`content` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '支付通知内容',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `order_logs_order_id_index` (`order_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '支付订单日志表';
-- 退款订单表
drop TABLE if exists `dragon_order_refunds`;
CREATE TABLE `dragon_order_refunds`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`order_id` bigint NOT NULL COMMENT '订单id',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '订单退款状态',
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '订单退款编号',
`order_refund_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '调用端订单退款编号',
`price` decimal(10, 2) NOT NULL COMMENT '退款价格',
`reason` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '退款原因',
`notify_url` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '退款完成通知回调地址',
`refund_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '退款类型',
`refund_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '退款的订单号',
`refund_error` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '退款失败原因',
`refund_at` timestamp NULL DEFAULT NULL COMMENT '退款时间',
`finished_at` timestamp NULL DEFAULT NULL COMMENT '退款结束时间',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT '删除时间',
PRIMARY KEY (`id`),
UNIQUE KEY `order_refunds_code_unique` (`code`),
UNIQUE KEY `order_refunds_order_id_order_refund_code_unique` (`order_id`, `order_refund_code`),
KEY `order_refunds_order_id_index` (`order_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '退款订单表';
-- 退款订单信息表
drop TABLE if exists `dragon_order_refund_logs`;
CREATE TABLE `dragon_order_refund_logs`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`order_id` bigint NOT NULL COMMENT '订单id',
`order_refund_id` bigint NOT NULL COMMENT '退款订单id',
`refund_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '退款类型',
`content` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '退款通知内容',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `order_refund_logs_order_id_index` (`order_id`),
KEY `order_refund_logs_order_refund_id_index` (`order_refund_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '退款订单信息表';
<?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>liquidnet-service-dragon</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-service-dragon-impl</artifactId>
</project>
package com.liquidnet.service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.util.Arrays;
@Slf4j
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceDragonApplication implements CommandLineRunner {
@Autowired
private Environment environment;
public static void main(String[] args) {
SpringApplication.run(ServiceDragonApplication.class, args);
}
@Override
public void run(String... strings) {
try {
log.info("\n----------------------------------------------------------\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
"Local: \t\thttp://127.0.0.1:{}\n\t" +
"External: \thttp://{}:{}{}/doc.html\n\t" +
"Profile(s): \t{}\n----------------------------------------------------------",
environment.getProperty("spring.application.name"),
environment.getProperty("server.port"),
InetAddress.getLocalHost().getHostAddress(),
environment.getProperty("server.port"),
environment.getProperty("server.servlet.context-path"),
Arrays.toString(environment.getActiveProfiles()));
} catch (Exception e) {
e.printStackTrace();
}
}
// @Bean
// MongoTransactionManager transactionManager(MongoDbFactory factory){
// return new MongoTransactionManager(factory);
// }
}
package com.liquidnet.service.dragon.config;
import com.liquidnet.common.web.config.WebMvcConfig;
import com.liquidnet.common.web.filter.GlobalAuthorityInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class DragonWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
# begin-dev-这里是配置信息基本值
liquidnet:
cloudConfig:
profile: dev
security:
username: user
password: user123
eureka:
host: 127.0.0.1:7001
# end-dev-这里是配置信息基本值
spring:
profiles:
include: service-dragon
# begin-dev-这里是配置信息基本值
liquidnet:
cloudConfig:
profile: prod
security:
username: user
password: user123
eureka:
host: 172.17.207.189:7001
# end-dev-这里是配置信息基本值
spring:
profiles:
include: service-dragon
#eurekaServer配置
eureka:
client:
register-with-eureka: true
fetch-registry: true
serviceUrl:
defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
#configServer配置
spring:
cloud:
config:
# uri: http://39.105.38.151:7002/support-config
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
enabled: true
service-id: liquidnet-support-config
# begin-dev-这里是配置信息基本值
liquidnet:
cloudConfig:
profile: test
security:
username: user
password: user123
eureka:
host: 172.17.207.177:7001
# end-dev-这里是配置信息基本值
spring:
profiles:
include: service-dragon
spring:
application:
name: liquidnet-service-dragon
profiles:
active: dev
server:
tomcat:
max-threads: 2000
min-spare-threads: 200
max-connections: 20000
connection-timeout: 5000
<?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>liquidnet-bus-service</artifactId>
<groupId>com.liquidnet</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>liquidnet-service-dragon</artifactId>
<packaging>pom</packaging>
<modules>
<module>liquidnet-service-dragon-impl</module>
</modules>
<dependencies>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-web</artifactId>
</dependency>
</dependencies>
</project>
......@@ -324,11 +324,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
orderTicketVo.setOrderCode(orderTicketVo.getOrderCode().substring(orderTicketVo.getOrderCode().length()-10));
KylinOrderRefundsVo kylinOrderRefundsVoBase = dataUtils.getOrderRefundVo(orderRefundId);
kylinOrderRefundsVoBase.setOrderRefundCode(kylinOrderRefundsVoBase.getOrderRefundCode().substring(kylinOrderRefundsVoBase.getOrderRefundCode().length()-10));
kylinOrderRefundsVoBase.setRefundCode(kylinOrderRefundsVoBase.getRefundCode().substring(kylinOrderRefundsVoBase.getRefundCode().length()-10));
vo.setKylinOrderRefundsVoBaseList(kylinOrderRefundsVoBase);
vo.setOrderTicketVo(orderTicketVo);
return ResponseDto.success(vo);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(ErrorMapping.get("20030"));
}
}
......
......@@ -33,7 +33,7 @@
20028=订单已失效
20027=您已支付请刷新再试
20029=未选择支付方式
20030=无权查看
20030=查看失败
#APP PARTNER
20101=添加失败
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment