✨ feat(活动): 新将擢迁保底显示
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { Application, BackendSession, HandlerService, } from 'pinus';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { STATUS } from '../../../consts';
|
||||
import { getPlayerNewHeroGachaData } from '../../../services/activity/newHeroService';
|
||||
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
return new NewHeroGachaHandler(app);
|
||||
}
|
||||
|
||||
export class NewHeroGachaHandler {
|
||||
constructor(private app: Application) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取关卡活动数据
|
||||
* @param {{ activityId: number}} msg
|
||||
* @param {BackendSession} session
|
||||
* @memberof NewHeroGachaHandler
|
||||
*/
|
||||
async getData(msg: { activityId: number }, session: BackendSession) {
|
||||
const { activityId } = msg;
|
||||
const roleId = session.get('roleId');
|
||||
const serverId = session.get('serverId');
|
||||
|
||||
let playerData = await getPlayerNewHeroGachaData(activityId, serverId, roleId)
|
||||
|
||||
if (!playerData) return resResult(STATUS.ACTIVITY_MISSING);
|
||||
|
||||
return resResult(STATUS.SUCCESS, playerData);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user