leo.li
2024-09-09 277967dbf4acbaf5626ae18d3a8f180737eeb17b
update
2 files modified
13 ■■■■ changed files
src/main/java/com/jw/ai/entity/TaskLog.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/jw/ai/service/impl/TaskServiceImpl.java 10 ●●●● patch | view | raw | blame | history
src/main/java/com/jw/ai/entity/TaskLog.java
@@ -53,5 +53,8 @@
    private String jobid;
    private String uuid;
    private String secId;
}
src/main/java/com/jw/ai/service/impl/TaskServiceImpl.java
@@ -185,6 +185,7 @@
                    // 一键获客的日志增加批次号
                    jobExecLog.setSecId(secId);
                }
                jobExecLog.setStartTime(new Date());
                jobExecLogMapper.insert(jobExecLog);
                // 任务执行流水
@@ -194,6 +195,10 @@
                taskLog.setUpdateTime(new Date());
                taskLog.setJobid(task.getJobUniqueNo());
                taskLog.setTenantId(task.getTenantId());
                taskLog.setUuid(uuid);
                if (StringUtils.isNotBlank(secId)) {
                taskLog.setSecId(secId);
                }
                taskLogService.save(taskLog);
            }
        }
@@ -517,7 +522,7 @@
            // 3.更新任务日志数据(只返回100条记录)
            for (Map.Entry<String, List<CommonRes.Finished>> entry : entries) {
                String jobid = entry.getKey();
                /*String jobid = entry.getKey();
                List<CommonRes.Finished> finishedList = entry.getValue();
                List<JobExecLog> jobExecLogs = jobExecLogMapper.selectList(new LambdaQueryWrapper<JobExecLog>()
                        .eq(JobExecLog::getName, jobid)
@@ -543,7 +548,7 @@
                    log.info("更新。。。。。。");
                } else {
                    //taskLogService.saveBatch(list);
                }
                }*/
            }
            // 4.如果任务执行完成后待完善粉丝数量 > 0 需要重复执行完善脚本
            if (!CollectionUtil.isEmpty(demandUserProfile)) {
@@ -620,6 +625,7 @@
        body.put("task_name", selectOne.getName());
        body.put("tenant_id", selectOne.getTenantId());
        body.put("sec_id", secId);
        body.put("demand_id", task.getRequireId());
        body.put("uuid", uuid);
        log.info("execPyJob ==> request url {}", body);
        String s = HttpUtil.post(pythonScriptConfig.getScheduleJob(), body);