支付回调

This commit is contained in:
luying
2021-11-09 19:24:00 +08:00
parent 173481a60c
commit 106493b878
26 changed files with 424 additions and 135 deletions
+4 -1
View File
@@ -70,7 +70,10 @@ declare module 'redis' {
smembersAsync(key: string): Promise<string[]>;
// 增加集合成员
saddAsync(key: string, values: string[]): Promise<string>;
// 将信息发送到指定的频道
publishAsync(channel: string, message: string): Promise<number>;
// 订阅给定的一个或多个频道的信息
subscribeAsync(...channels: string[]): Promise<number>;
}
export interface Multi extends Commands<Multi> {
execAsync(...args: any[]): Promise<any>;
+8 -1
View File
@@ -99,6 +99,7 @@ import { UserTaskHistoryModel } from '../db/UserTaskHistory';
import { UserTaskRecModel } from '../db/UserTaskRec';
import { WishPoolReportModel } from '../db/WishPoolReport';
import { pick } from "underscore";
import { HeroShowParam } from '../domain/roleField/hero';
// 储存在内存中的初始数据
export function getInitRoleInfo() {
@@ -341,11 +342,17 @@ export class CreateHeroes extends UpdateHeroes {
pinus.app.get('channelService').pushMessageByUids('onHeadChange', resResult(STATUS.SUCCESS, { ...figureInfo }), uids);
}
pinus.app.get('channelService').pushMessageByUids('onHeroSkinChange', resResult(STATUS.SUCCESS, this.skinPushMessages), uids);
pinus.app.get('channelService').pushMessageByUids('onHeroUpdate', resResult(STATUS.SUCCESS, { heroes: this.resultHeroes }), uids);
}
public getResultHeroes() {
return this.resultHeroes
}
public getShowHeroes() {
return this.resultHeroes.map(cur => {
return { ...cur, ce: reduceCe(cur.ce)}
let hero = new HeroShowParam(cur);
return { ...hero, ce: reduceCe(cur.ce)}
});
}
}
+5 -1
View File
@@ -1,4 +1,4 @@
import { SDK_37_ADDR, SDK_37_CONST } from '../consts';
import { REDIS_KEY, SDK_37_ADDR, SDK_37_CONST } from '../consts';
import { request37 } from './httpUtil';
import { nowSeconds } from './timeUtil';
import { LoginValidataReturn37 } from '../domain/sdk';
@@ -85,4 +85,8 @@ export function checkVidObjSign(obj: any) {
function treatVid(str) {
return 'vId' + str;
}
export function getRedisSubChannel(key: REDIS_KEY, env: string) {
return `${key}:${env}`;
}