捐献所
This commit is contained in:
@@ -25,15 +25,15 @@ export function getContent(operate: number, params: string[]) {
|
||||
}
|
||||
return content
|
||||
}
|
||||
export async function getMailContent(roleId: string, operate: number, params: string[], goods:RewardInter[], mails:MailType[], pushMessage:pushMail[], sendName: string = '系统') {
|
||||
|
||||
export async function getMailContent(roleId: string, operate: number, params: string[], goods: RewardInter[], mails: MailType[], pushMessage: pushMail[], sendName: string = '系统') {
|
||||
const doc = new MailModel();
|
||||
let content = getContent( operate, params);
|
||||
|
||||
const mail = Object.assign(doc.toJSON(), {roleId, goods, sendName, mailId: 1, sendTime: nowSeconds(), content});
|
||||
const mail = Object.assign(doc.toJSON(), { roleId, goods, sendName, mailId: 1, sendTime: nowSeconds(), content });
|
||||
mails.push(mail);
|
||||
let key = 'login_roleId_' + roleId;
|
||||
let sid = await getRedis(key);
|
||||
if (!!sid) {
|
||||
pushMessage.push({route: 'onMailsAdd', data:[mail], uids: [{uid:roleId, sid}]});
|
||||
pushMessage.push({route: 'onMailsAdd', data:[mail], uids: [{ uid: roleId, sid }]});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user