Commit 229f9493 by zhangxw

修改

1 parent 711c221e
......@@ -21,7 +21,7 @@ export class ClueController{
@Query('event_time_start') event_time_start: string,
@Query('event_time_end') event_time_end: string
) {
const event_codes = event_code ? [event_code] : ['mentorship_page', 'supervisor_daily_page', '0', '1', '3', 'extraction']
const event_codes = event_code ? [event_code] : ['mentorship_page', 'supervisor_daily_page', 'sales_content', 'training_materials', 'scene_market', 'extraction']
const data = {}
const promises = event_codes.map(event_code => {
const where = {}
......@@ -46,9 +46,11 @@ export class ClueController{
new Date(event_time_end),
)
}
} else if (['0', '1', '3'].includes(event_code)) {
} else if (['sales_content', 'training_materials', 'scene_market'].includes(event_code)) {
tableName = 'dj_car_life_customer_dynamic_record'
where['show_channel'] = event_code
if (event_code == 'training_materials') where['show_channel'] = '0'
if (event_code == 'sales_content') where['show_channel'] = '1'
if (event_code == 'scene_market') where['show_channel'] = '3'
if (event_time_start && event_time_end) {
where['created_date'] = Between(
new Date(event_time_start),
......@@ -58,7 +60,6 @@ export class ClueController{
}
return this.queryService.querySingleTable({ table: tableName, where });
});
console.log(promises)
const results = await Promise.all(promises);
event_codes?.forEach((item, index) => {
data[item] = results[index].data || []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!