zerosaturation
|
8a767fb400
|
fix(backend): service stability — batch 3 accumulated (bcrypt off-txn / login anti-enum / MQ stub / aiChat / event reliability / gateway aggregate)
- 3.1 bcrypt 移出事务 (Register): repository.HashPassword 前移到 db.Transaction 之前。
- 3.2 Login 消除用户枚举 + 限流 + timing 抹平: pkg/errors 加 ErrInvalidCredential / ErrTooManyLoginAttempts;
user-not-found 跑 dummy bcrypt 抹平 ~100ms 时序差; mobile 5次/ip 20次 per 15min 限流 (Redis, fail-open 降级)。
- 3.3 MQ streams adapter 停用 → stub: 0 业务调用方, noop EventProducer.Publish; Init 不再装配 streams;
11 处硬编码 'gallery'/'default' 抽常量到 pkg/queue/consts (值不变, 消漂移)。
- 3.5 JWT 密钥治理: pkg/jwt MustInit fail-fast + atomic.Value, 50-goroutine race_test 零告警;
MustInit 调用点 gateway main + auth_provider + loadgen 同步更新。
- 3.6 aiChat 健壮性: SaveContext 用 persona.ID(非 req.PersonaId); Redis/memory 错误 记 WARN 不静默;
Dify err 映射稳定用户文案。
- 3.7 statistic.Client 重构: TrackEvent 改 buffered channel (cap 1024) + dispatchLoop worker。
- 3.8 网关聚合: StarCache (60s TTL, singleflight) 替换 GetFanIdentities 链式调用;
DeleteAccount 改网关直调 userService.DeleteAccount(避免改 hand-written triple.go);
铸造双写改异步 channel+consumer (3 retry)。
- 大量单测: 各子项 TDD (RED→GREEN), 关键并发 race_test (50 goroutine)。
- .env.example JWT_SECRET 改为 ≥32 字节 base64 示例(原为空, 被 MustInit 立即拒)。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-24 14:03:21 +08:00 |
|
zerosaturation
|
878bd46399
|
fix(backend): financial correctness — settlement/hours/mint idempotency (batch 1)
- settlement(1.1): exhibition_revenue_records 加 UNIQUE(exhibition_id,cycle_start_time)
+ CreateRevenueRecord ON CONFLICT DO NOTHING; MQ 用 settled_at 替代复用 is_processed;
恢复扫描器过滤改 settled_at IS NULL; created_at 统一毫秒; 删死代码 cleanup_worker.go。
- hours(1.2): 新增 exhibition_hours_log/asset_exhibition_hours_log(source_id 唯一)幂等表;
fan_profile/assetLevel 的 AddExhibitionHours 按 sourceID 幂等(事务包裹); 存量重算脚本。
- mint(1.4/1.5/1.6): crystal_transaction_records (source_id,change_type) 部分唯一索引
+ UpdateCrystalBalance/CreateMintOrder 幂等; 保底改 crypto/rand; 下线伪 tx_hash;
doMint Redis Lua 原子限流。
- migrations 001/002/003; 各服务单测(自包含, 缺 DB t.Skip)。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-23 01:11:54 +08:00 |
|
zerosaturation
|
d554d7be83
|
feat:修改周边验证
|
2026-07-17 16:53:57 +08:00 |
|
zerosaturation
|
d900c0d8b2
|
feat:增加验证真伪访问次数和首次验证
|
2026-07-13 14:24:42 +08:00 |
|
zerosaturation
|
74853800b6
|
feat:增加二维码验证真伪的功能
|
2026-07-13 11:22:56 +08:00 |
|
zerosaturation
|
2032246fd0
|
feat:增加分享界面,完善的保存图片功能
|
2026-06-26 16:45:29 +08:00 |
|
zerosaturation
|
280b4bbee0
|
feat:docker新增统计的微服务
|
2026-06-11 16:35:56 +08:00 |
|
zerosaturation
|
dfb79af4b1
|
feat: 铸造菜单改为动态配置
|
2026-06-09 12:38:12 +08:00 |
|
zerosaturation
|
44f368cda0
|
feat: 修改bug
|
2026-06-01 15:08:25 +08:00 |
|
zerosaturation
|
5e33bbb031
|
feat: 修改用户经验bug和收益记录bug
|
2026-05-31 20:38:58 +08:00 |
|
zerosaturation
|
d5a645eaea
|
feat: 给榜单增加字段
|
2026-05-29 19:47:09 +08:00 |
|
zerosaturation
|
3f58a82a91
|
feat: 修改藏品展示等级和藏品没有同步问题
|
2026-05-29 12:18:40 +08:00 |
|
zerosaturation
|
7c5d5a7275
|
feat:修改藏品等级硬编码改为根据数据库的配置来定义
|
2026-05-25 19:03:32 +08:00 |
|
zerosaturation
|
0753f0b168
|
feat: add asset level repositories
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-25 19:03:31 +08:00 |
|
zerosaturation
|
ce4fd85926
|
fea: 修改下架移除点赞记录删除
|
2026-05-22 18:49:34 +08:00 |
|
zerosaturation
|
02598db333
|
feat: 修改当前点赞逻辑
|
2026-05-20 12:36:58 +08:00 |
|
zerosaturation
|
2450fc1368
|
feat: 修改各种小bug
|
2026-05-17 23:33:45 +08:00 |
|
zerosaturation
|
afb235afd3
|
feat: 合并代码,解决冲突
|
2026-05-16 02:42:32 +08:00 |
|
zerosaturation
|
c5bf9df955
|
feat: 经济系统重构 - 任务服务与画廊服务解耦
- galleryService 独立启动,配置 task-service-url
- 新增 taskService 到 galleryService 的 RPC 调用
- 更新 proto 文件并重新生成代码
- 新增展览唯一约束迁移脚本
- 修复多个 service 的配置和依赖关系
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-15 23:12:02 +08:00 |
|
zerosaturation
|
74182ad662
|
feat: 新增经济系统
|
2026-05-14 15:59:07 +08:00 |
|
zerosaturation
|
e05769e79e
|
feat: 新增修改错误显示展出状态问题的功能
|
2026-05-09 19:44:53 +08:00 |
|
zerosaturation
|
1b82e4c3bc
|
feat: 新增图片类型计算
|
2026-05-07 14:07:36 +08:00 |
|
zerosaturation
|
f6e1caad8b
|
feat:新增docker密钥登录部署
|
2026-04-24 18:04:55 +08:00 |
|
zerosaturation
|
55104d5aef
|
fix: 修改模拟数据路径
|
2026-04-21 15:18:55 +08:00 |
|
zerosaturation
|
956be17a4e
|
feat: 新增软删除,留有记录保存
|
2026-04-21 13:26:54 +08:00 |
|
zerosaturation
|
35ebfa337e
|
fix: 修复星册更多的bug
|
2026-04-20 17:04:34 +08:00 |
|
zerosaturation
|
bebdc13c80
|
fix: 修改任务系统的bug
|
2026-04-17 17:17:32 +08:00 |
|
zerosaturation
|
9a2d597e2b
|
feat: 修改遗留bug
|
2026-04-12 16:05:13 +08:00 |
|
zerosaturation
|
06f4038a75
|
提交后端代码
|
2026-04-07 22:29:48 +08:00 |
|