问卷
This commit is contained in:
@@ -289,9 +289,10 @@ export async function sendSurveyMail(code: string) {
|
||||
let rec = await SurveyRecModel.findByCode(code);
|
||||
if(!rec || rec.hasSentMail) return false;
|
||||
|
||||
let survey = await SurveyModel.findBySurveyId(rec.surveyId);
|
||||
let survey = await SurveyModel.receive(rec.surveyId, rec.roleId);
|
||||
if(!survey) return false;
|
||||
|
||||
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 });
|
||||
rec = await SurveyRecModel.send(rec.code);
|
||||
}
|
||||
Reference in New Issue
Block a user