问卷
This commit is contained in:
@@ -286,11 +286,14 @@ export async function checkFilterWords(word: string) {
|
||||
}
|
||||
|
||||
export async function sendSurveyMail(code: string) {
|
||||
console.log('***** sendSurveyMail', code);
|
||||
let rec = await SurveyRecModel.findByCode(code);
|
||||
if(!rec || rec.hasSentMail) return false;
|
||||
console.log('***** sendSurveyMail hasSentMail', rec.hasSentMail);
|
||||
|
||||
let survey = await SurveyModel.receive(rec.surveyId, rec.roleId);
|
||||
let survey = await SurveyModel.findBySurveyId(rec.surveyId);
|
||||
if(!survey) return false;
|
||||
console.log('***** sendSurveyMail survey', survey);
|
||||
|
||||
await sendMailByContent(MAIL_TYPE.SEND_MAIL, rec.roleId, { goods: survey.reward, params: [survey.mailContent] });
|
||||
await sendMessageToUserWithSuc(rec.roleId, PUSH_ROUTE.DELETE_SURVEY, { code: rec.code });
|
||||
|
||||
Reference in New Issue
Block a user