|
|
@ -305,7 +305,9 @@ async function getLatestDynamic(ctx) { |
|
|
|
//查项目名称 查用户名
|
|
|
|
let pepPojectIds = new Set(), notedUserIds = new Set(); |
|
|
|
for (let p of news) { |
|
|
|
pepPojectIds.add(p.projectCorrelation.pepProjectId); |
|
|
|
if(p.projectCorrelation && p.projectCorrelation.pepProjectId){ |
|
|
|
pepPojectIds.add(p.projectCorrelation.pepProjectId); |
|
|
|
} |
|
|
|
|
|
|
|
if (p.emailSendLog) { |
|
|
|
p.emailSendLog.toPepUserIds.map(u => { |
|
|
@ -317,8 +319,8 @@ async function getLatestDynamic(ctx) { |
|
|
|
} |
|
|
|
} |
|
|
|
let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(` |
|
|
|
SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds].join(',')},-1) |
|
|
|
`).toPromise() : [];
|
|
|
|
SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds].join(',')},-1) |
|
|
|
`).toPromise() : [];
|
|
|
|
|
|
|
|
let userPepRes = notedUserIds.size ? await clickHouse.pepEmis.query( |
|
|
|
`SELECT DISTINCT user.id AS id, "user"."name" AS name FROM user WHERE user.id IN (${[...notedUserIds].join(',')},-1)
|
|
|
|