feat: 优惠券

This commit is contained in:
2025-11-07 17:29:59 +08:00
parent 31001df0a7
commit c910fc1916
2 changed files with 66 additions and 72 deletions
@@ -1,69 +1,66 @@
spring:
datasource:
# url: jdbc:mysql://${zlt.datasource.ip}:3306/device-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
url: jdbc:mysql://${zlt.datasource.ip}/coupon-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: ${zlt.datasource.username}
password: ${zlt.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
# 环境配置:test(测试环境) / prod(生产环境)
profiles:
active: test
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.central.coupon.model
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto
springdoc:
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: com.central.coupon.controller
knife4j:
enable: true
setting:
swagger-model-name: 优惠券中心接口文档
zlt:
#多租户配置
tenant:
enable: false
ignoreTables:
ignoreSqls:
# 禁用分布式锁
lock:
lockerType: NONE
# 日志配置
logging:
level:
com.central.order.controller.OrderFileController: DEBUG
com.central.coupon.util.CtripDecryptUtil: DEBUG
com.central.coupon.service.impl.OrderDetailServiceImpl: DEBUG
# 携程API配置
ctrip:
# AES加密配置
aes:
key: 6196f64f4f6e5dca # 为实际的AES密钥
iv: 28405d20246ecccd # 为实际的AES IV
# 签名配置(使用账户密钥进行签名计算)
# API配置
api:
# 测试环境URL
test-url: https://ttdopen.ctrip.com/api
# 生产环境URL
prod-url: https://ttdentry.ctrip.com/ttd-connect-orderentryapi/supplier
# 当前环境(test/prod)
environment: prod
timeout: 30000 # 请求超时时间(毫秒)
retry-times: 3 # 重试次数
# 账户配置
account:
id: e02647943fdfb4c5 # 为实际的账户ID
secret: 0b4f4dabb50999cb04a773fc96f81499 # 实际的账户密钥
#spring:
# datasource:
# # url: jdbc:mysql://${zlt.datasource.ip}:3306/device-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://${zlt.datasource.ip}/coupon-center-test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowMultiQueries=true
# username: ${zlt.datasource.username}
# password: ${zlt.datasource.password}
# driver-class-name: com.mysql.cj.jdbc.Driver
#
#mybatis-plus:
# mapper-locations: classpath:/mapper/*Mapper.xml
# #实体扫描,多个package用逗号或者分号分隔
# typeAliasesPackage: com.central.coupon.model
# # configuration:
# # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# global-config:
# db-config:
# id-type: auto
#
#springdoc:
# group-configs:
# - group: 'default'
# paths-to-match: '/**'
# packages-to-scan: com.central.coupon.controller
#
#knife4j:
# enable: true
# setting:
# swagger-model-name: 优惠券中心接口文档
#zlt:
# #多租户配置
# tenant:
# enable: false
# ignoreTables:
# ignoreSqls:
# # 禁用分布式锁
# lock:
# lockerType: NONE
#
## 日志配置
#logging:
# level:
# com.central.order.controller.OrderFileController: DEBUG
# com.central.coupon.util.CtripDecryptUtil: DEBUG
# com.central.coupon.service.impl.OrderDetailServiceImpl: DEBUG
#
## 携程API配置
#ctrip:
# # AES加密配置
# aes:
# key: 6196f64f4f6e5dca # 为实际的AES密钥
# iv: 28405d20246ecccd # 为实际的AES IV
# # 签名配置(使用账户密钥进行签名计算)
# # API配置
# api:
# # 测试环境URL
# test-url: https://ttdopen.ctrip.com/api
# # 生产环境URL
# prod-url: https://ttdentry.ctrip.com/ttd-connect-orderentryapi/supplier
# # 当前环境(test/prod)
# environment: prod
# timeout: 30000 # 请求超时时间(毫秒)
# retry-times: 3 # 重试次数
# # 账户配置
# account:
# id: e02647943fdfb4c5 # 为实际的账户ID
# secret: 0b4f4dabb50999cb04a773fc96f81499 # 实际的账户密钥
@@ -1,6 +1,3 @@
server:
port: 8002
spring:
application:
name: coupon-center