邮件:循环邮件优化

This commit is contained in:
luying
2022-02-23 20:02:10 +08:00
parent 76fcd98c75
commit e71e1d0850
8 changed files with 43 additions and 35 deletions
@@ -104,17 +104,7 @@ export class GmHandler {
await f.pushToUsers();
// await f.saveRecord(uid);
}
let sendTime = '';
if(isPass) {
if(timeType == MAIL_TIME_TYPE.IMMEDIATE) {
sendTime = moment().format('YYYY-MM-DD HH:mm:ss');
} else if (timeType == MAIL_TIME_TYPE.DELAY) {
sendTime = moment(startTime * 1000).format('YYYY-MM-DD HH:mm:ss');
} else if (timeType == MAIL_TIME_TYPE.CIRCLE) {
sendTime = (circleDay == 0?'每天': '每周'+circleDay) + ' ' + circleHour;
}
}
await GMMailModel.updateMailById(id, { status: isPass? GM_MAIL_STATUS.PASS: GM_MAIL_STATUS.NOT_PASS, viewAt: new Date(), viewBy: uid, sendTime }, uid);
await GMMailModel.updateMailById(id, { status: isPass? GM_MAIL_STATUS.PASS: GM_MAIL_STATUS.NOT_PASS, viewAt: new Date(), viewBy: uid }, uid);
return resResult(STATUS.SUCCESS);
}