Files
lottery/.zcode/plans/plan-sess_2b7f7712-b48d-4809-b5dc-b642e2df80ce.md
T
feng0207 3fc4dcc777 initial commit: lottery 项目集(三工程统一管理)
- apps/lotteryServer, lotteryCapture, lotteryOpen 三个业务工程
- 忽略 archive/, tools/, infra/data/ 大目录与敏感配置文件
- 移除 lotteryServer 原嵌套 git,并入顶层统一管理
2026-09-17 19:03:32 +08:00

1.7 KiB
Raw Blame History

把 lotteryCapture 和 lotteryOpen 跑起来,与已运行的 nine_surplus 组成完整三进程系统。

1. 配置改造(两个模块同样处理)

  • lotteryCapture/src/main/resources/config/datasource/db.properties:127.0.0.1:3306 → 127.0.0.1:33206(docker lottery-mysql),密码复用 nine_surplus 里已生成好的 druid 加密串(devpass123)
  • lotteryOpen/.../db.properties:同上
  • lotteryCapture/.../redis.properties:host/port 是 DES 加密值(|e 后缀)→ 直接改成明文 127.0.0.1 / 36379(EncryptPropertyPlaceholderConfigurer 对无 |e 后缀的值原样透传,nine_surplus 就是这么用的)
  • lotteryOpen/.../redis.properties:6379 → 36379

2. 构建并启动

  • JDK8 + 本地 Maven 分别 mvn package(jar,主类 lottery.bin.StartUp)
  • 后台 java -jar(或 mvn exec)启动 lotteryOpen —— 核心验证对象
  • 启动 lotteryCapture —— 预期其外部爬虫请求失败(站点已死),但要确认进程活着、只有爬虫报错

3. 验证链路

  • 观察 lotteryOpen 日志:自主彩开奖 Job(SelfLotteryLastOpenCodeJob 等)每 30 秒生成号码
  • Redis 出现 OPEN_CODE:jsmmc 等 key;MySQL lottery_open_code 表有新数据
  • lotteryOpen 的 LotteryOpenJob 每 5 秒扫描未开奖注单
  • 用 zz 账号在 jsmmc 上下一注测试注单,观察结算:user_bets 状态变化、user_bill 出现"派奖"记录、余额到账
  • Web 页面(8080)上该彩种开奖号码自动刷新(WebSocket 推送)

4. 收尾

  • 把两个进程的启动/停止命令补进 dev.bat 和 DEV-README.md
  • 明确记录:外部爬虫目标站已失效属预期现象,自主彩链路是可验证的部分