This commit is contained in:
luying
2022-04-11 20:32:08 +08:00
parent d4a103a6b1
commit c6ebb62c6a
14 changed files with 124 additions and 49 deletions
+2 -1
View File
@@ -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);
}