feat(活动): 37通用对接接口

This commit is contained in:
luying
2023-04-04 18:53:02 +08:00
parent 16eace7d4c
commit ad808162d7
9 changed files with 252 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
import { Controller } from 'egg';
import { GetGuildInfoByUserParam, GetServerListParam, GuildNameCallBackParam, IOSRefundParam, PayCallback37Data, RoleNameCallBackParam, SendGiftCodeParam } from '../domain/sdk';
import { GetGuildInfoByUserParam, GetRoleByServerParam, GetRoleByUidParam, GetServerListParam, GetServerParam, GuildNameCallBackParam, IOSRefundParam, PayCallback37Data, RoleNameCallBackParam, SendGiftCodeParam } from '../domain/sdk';
export default class SdkController extends Controller {
@@ -68,4 +68,25 @@ export default class SdkController extends Controller {
ctx.body = await ctx.service.sdk.sendGiftCode(params);
return;
}
public async getRoleByUidAndServer() {
const { ctx } = this;
const params = new GetRoleByServerParam(ctx.query);
ctx.body = await ctx.service.sdk.getRoleByUidAndServer(params);
return;
}
public async getRoleByUid() {
const { ctx } = this;
const params = new GetRoleByUidParam(ctx.query);
ctx.body = await ctx.service.sdk.getRoleByUid(params);
return;
}
public async getServerInfo() {
const { ctx } = this;
const params = new GetServerParam(ctx.query);
ctx.body = await ctx.service.sdk.getServerInfo(params);
return;
}
}