初始化天卡开放平台后端项目

包含完整功能模块:
- 设备激活(直销激活码模式 + 代销免激活码模式)
- 微信支付 + 天卡订单
- 天卡池管理 + 异步橘视厅SDK激活
- 第三方合作伙伴接口(代销模式)
  - 签名鉴权(appKey/appSecret + nonce防重放)
  - 天卡消耗(事务 + 幂等 + 并发控制)
  - 媒资接口(三级授权过滤)
  - 审计日志
- 定价策略(3层:门店 > 渠道 > 平台)
- 分账(微信分账 + 分润规则)
- Docker部署(含Redis容器)
This commit is contained in:
zhaogd
2026-07-26 12:34:13 +08:00
commit 30198c7191
349 changed files with 28837 additions and 0 deletions

View File

@@ -0,0 +1,101 @@
# Tomcat
server:
tomcat:
uri-encoding: UTF-8
threads:
max: 1000
min-spare: 30
connection-timeout: 5000ms
basedir: .
accesslog:
enabled: true
pattern: '%t %a "%r" %s %b %Dms'
suffix: .log
prefix: access_log
directory: logs
port: ${SERVER_PORT:8084}
servlet:
context-path: /
spring:
# 环境 dev|test|prod,通过环境变量 SPRING_PROFILES_ACTIVE 指定
profiles:
active: ${SPRING_PROFILES_ACTIVE:dev}
# jackson时间格式化
jackson:
time-zone: Asia/Shanghai
date-format: yyyy-MM-dd HH:mm:ss
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
enabled: true
mvc:
throw-exception-if-no-handler-found: true
pathmatch:
matching-strategy: ANT_PATH_MATCHER
#mybatis
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: io.as.modules.*.entity,io.as.modules.*.entity,io.as.modules.device.entity,io.as.modules.jst.entity
global-config:
db-config:
id-type: AUTO
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
renren:
redis:
open: ${REDIS_OPEN:true}
jwt:
secret: ${JWT_SECRET:daycard-openapi-secret-change-in-prod-2026}
expire: ${JWT_EXPIRE:604800}
header: ${JWT_HEADER:token}
api:
device-sign-secret: ${API_SIGN_SECRET:daycard-partner-sign-secret-change-in-prod}
# 天卡业务配置
daycard:
# 订单超时时间(分钟)
order-timeout-minutes: ${DAYCARD_ORDER_TIMEOUT:15}
# 天卡有效期(小时)
card-valid-hours: ${DAYCARD_VALID_HOURS:24}
# 超时取消任务每次处理数量
cancel-batch-size: ${DAYCARD_CANCEL_BATCH:200}
# App UI 资源配置(顶栏按钮图标、登录背景图)
ui:
logo-url: ${UI_LOGO_URL:https://daycard.oss-cn-hangzhou.aliyuncs.com/logo.png}
login-bg-url: ${UI_LOGIN_BG_URL:https://daycard.oss-cn-hangzhou.aliyuncs.com/login_bg.png}
search-normal-url: ${UI_SEARCH_NORMAL:https://daycard.oss-cn-hangzhou.aliyuncs.com/search_normal.png}
search-focus-url: ${UI_SEARCH_FOCUS:https://daycard.oss-cn-hangzhou.aliyuncs.com/search_focus.png}
help-normal-url: ${UI_HELP_NORMAL:https://daycard.oss-cn-hangzhou.aliyuncs.com/help_normal.png}
help-focus-url: ${UI_HELP_FOCUS:https://daycard.oss-cn-hangzhou.aliyuncs.com/help_focus.png}
# 微信支付配置
wechat:
pay:
app-id: ${WECHAT_PAY_APP_ID:}
mch-id: ${WECHAT_PAY_MCH_ID:}
api-v3-key: ${WECHAT_PAY_API_V3_KEY:}
cert-serial-no: ${WECHAT_PAY_CERT_SERIAL_NO:}
private-key-path: ${WECHAT_PAY_PRIVATE_KEY_PATH:}
notify-url: ${WECHAT_PAY_NOTIFY_URL:}
# 橘视厅媒资接口配置(对应 Android 端 ApiConfig.kt)
jetsen:
media:
base-url: ${JETSEN_MEDIA_BASE_URL:https://servhub-ep03.future.jetsentv.com/}
path-prefix: ${JETSEN_MEDIA_PATH_PREFIX:/IPTVPortalInterface}
sp-token: ${JETSEN_MEDIA_SP_TOKEN:9006874392099a89506142c6df9e3314}
portal-code: ${JETSEN_MEDIA_PORTAL_CODE:PCODE-JC}
sign-key: ${JETSEN_MEDIA_SIGN_KEY:alltvjs}
channel-id: ${JETSEN_MEDIA_CHANNEL_ID:001}
export-page-size: ${JETSEN_MEDIA_EXPORT_PAGE_SIZE:50}
export-max-rows: ${JETSEN_MEDIA_EXPORT_MAX_ROWS:5000}