将 WechatGame 单体模块拆分为独立的 User、Level、GameConfig 模块, 新增体力值系统、关卡闯关流程,并修复多项代码质量问题: - 体力不足错误码从 401 修正为 400 - enterLevel 改用 findById 替代全表扫描 - consumeStamina 增加原子更新防止并发竞态 - 并行化独立数据库查询 (Promise.all) - 移除 WechatGameService/Controller 死代码
12 lines
386 B
TypeScript
12 lines
386 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { GameConfigController } from './game-config.controller';
|
|
import { GameConfigService } from './game-config.service';
|
|
import { WechatGameModule } from '../wechat-game/wechat-game.module';
|
|
|
|
@Module({
|
|
imports: [WechatGameModule],
|
|
controllers: [GameConfigController],
|
|
providers: [GameConfigService],
|
|
})
|
|
export class GameConfigModule {}
|