邮件 活跃度下发
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {Application, BackendSession} from 'pinus';
|
||||
import {Application, BackendSession, pinus} from 'pinus';
|
||||
import { RoleModel } from '../../../db/Role';
|
||||
import { EventRecordModel } from '../../../db/EventRecord';
|
||||
import { getEvent } from '../../../services/eventSercive';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
|
||||
|
||||
import { GMMailModel } from '../../../db/GMMail';
|
||||
import { setGmMails } from '../../../pubUtils/gmData/gmDataUtil';
|
||||
export default function(app: Application) {
|
||||
return new GmHandler(app);
|
||||
}
|
||||
@@ -70,7 +70,6 @@ export class GmHandler {
|
||||
channel.add(roleId, sid);
|
||||
}
|
||||
|
||||
|
||||
let tsid = channel.getMember(roleId)['sid'];
|
||||
channelService.pushMessageByUids(eventName, resResult(STATUS.SUCCESS, content), [{
|
||||
uid: roleId,
|
||||
@@ -78,4 +77,10 @@ export class GmHandler {
|
||||
}]);
|
||||
return resResult(STATUS.SUCCESS, { msg: content });
|
||||
}
|
||||
|
||||
async addMail(msg: { endTime: number, serverId: number, sendName: string, content: string, goods, sendRoles:[{roleId: string, status: number}], gmMailType: number, sendTime: number, }) {
|
||||
let {sendRoles, endTime, content, sendName, gmMailType, sendTime, goods, serverId} = msg;
|
||||
let mail = await GMMailModel.addMail({serverId, sendRoles, sendName, endTime, content, gmMailType, sendTime, goods});
|
||||
setGmMails([mail]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user