✨ feat(礼包码邮件): 添加一些打印
This commit is contained in:
@@ -327,15 +327,17 @@ export async function sendSurveyMail(code: string) {
|
||||
}
|
||||
|
||||
export async function sendGiftCodeMail(message: string) {
|
||||
console.log('***** sendSurveyMail', message);
|
||||
console.log('***** sendGiftCodeMail 1', message);
|
||||
let [roleId, _giftId] = message.split('|');
|
||||
let giftId = parseInt(_giftId);
|
||||
console.log('****** sendGiftCodeMail 2', roleId, giftId, isNaN(giftId))
|
||||
if(isNaN(giftId) || !roleId) return false;
|
||||
let giftCode = await GiftCodeModel.findByGiftId(giftId);
|
||||
if(!giftCode) {
|
||||
console.log('***** sendSurveyMail giftId not found', giftId);
|
||||
console.log('***** sendGiftCodeMail giftId not found', giftId);
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log('****** sendGiftCodeMail 3', roleId, giftCode.goods);
|
||||
await sendMailByContent(MAIL_TYPE.SEND_MAIL, roleId, { goods: giftCode.goods, params: ['尊敬的百家传人,附件为您在平台活动获得的奖励,请查收!'] });
|
||||
}
|
||||
Reference in New Issue
Block a user