fix:
终身卡定时器log
This commit is contained in:
parent
1412da00ae
commit
075c60a9f8
@ -58,14 +58,21 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
||||
|
||||
(async () => {
|
||||
// 每周一,发放终身卡
|
||||
if (PublicShared.getWeek(G.time) != 1) return;
|
||||
if (PublicShared.getWeek(G.time) != 1) {
|
||||
console.log("不是周一,不发放终身卡", PublicShared.getWeek(G.time));
|
||||
return
|
||||
};
|
||||
|
||||
let logs = await G.mongodb.collection("payLogNew").find(
|
||||
{ key: "zhongshengka", del_time: { $exists: false } }, { projection: { _id: 0, } }
|
||||
).toArray();
|
||||
|
||||
if (logs.length == 0) {
|
||||
console.log("没有终身卡数据,不发放终身卡");
|
||||
}
|
||||
let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0];
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
console.log("发放终身卡", logs[i].uid);
|
||||
// 发送邮件
|
||||
EmailFun.addEmail({
|
||||
uid: logs[i].uid,
|
||||
|
Loading…
Reference in New Issue
Block a user