You've already forked FrameTour-BE
名称
This commit is contained in:
@@ -55,7 +55,7 @@ public class AppTaskController {
|
|||||||
|
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
public ApiResponse<String> submitVideoTask(@RequestBody VideoTaskReq videoTaskReq) {
|
public ApiResponse<String> submitVideoTask(@RequestBody VideoTaskReq videoTaskReq) {
|
||||||
taskService.createTaskByFaceIdAndTempalteId(videoTaskReq.getFaceId(),videoTaskReq.getTemplateId(),0);
|
taskService.createTaskByFaceIdAndTemplateId(videoTaskReq.getFaceId(),videoTaskReq.getTemplateId(),0);
|
||||||
return ApiResponse.success("成功");
|
return ApiResponse.success("成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,9 +14,9 @@ public interface TaskService {
|
|||||||
|
|
||||||
TemplateRespVO workerGetTemplate(Long templateId, WorkerAuthReqVo req);
|
TemplateRespVO workerGetTemplate(Long templateId, WorkerAuthReqVo req);
|
||||||
|
|
||||||
void createTaskByFaceIdAndTempalteId(Long faceId, Long templateId);
|
void createTaskByFaceIdAndTemplateId(Long faceId, Long templateId);
|
||||||
|
|
||||||
void createTaskByFaceIdAndTempalteId(Long faceId, Long templateId, int automatic);
|
void createTaskByFaceIdAndTemplateId(Long faceId, Long templateId, int automatic);
|
||||||
|
|
||||||
void taskSuccess(Long taskId, TaskSuccessReqVo req);
|
void taskSuccess(Long taskId, TaskSuccessReqVo req);
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ public interface TaskService {
|
|||||||
|
|
||||||
void forceCreateTaskByFaceIdAndTempalteId(Long faceId, Long templateId);
|
void forceCreateTaskByFaceIdAndTempalteId(Long faceId, Long templateId);
|
||||||
|
|
||||||
void autoCreateTaskByFaceId(Long id);
|
void autoCreateTaskByFaceId(Long faceId);
|
||||||
|
|
||||||
Date getTaskShotDate(Long taskId);
|
Date getTaskShotDate(Long taskId);
|
||||||
|
|
||||||
|
@@ -250,7 +250,7 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void forceCreateTaskByFaceIdAndTempalteId(Long faceId, Long templateId) {
|
public void forceCreateTaskByFaceIdAndTempalteId(Long faceId, Long templateId) {
|
||||||
createTaskByFaceIdAndTempalteIdInternal(faceId, templateId, 0, true);
|
createTaskByFaceIdAndTemplateIdInternal(faceId, templateId, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -286,22 +286,22 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
}
|
}
|
||||||
if (Integer.valueOf(3).equals(scenicConfig.getBookRoutine()) || Integer.valueOf(4).equals(scenicConfig.getBookRoutine())) {
|
if (Integer.valueOf(3).equals(scenicConfig.getBookRoutine()) || Integer.valueOf(4).equals(scenicConfig.getBookRoutine())) {
|
||||||
// 生成全部视频的逻辑
|
// 生成全部视频的逻辑
|
||||||
templateList.forEach(template -> createTaskByFaceIdAndTempalteId(faceId, template.getId(), 1));
|
templateList.forEach(template -> createTaskByFaceIdAndTemplateId(faceId, template.getId(), 1));
|
||||||
} else {
|
} else {
|
||||||
createTaskByFaceIdAndTempalteId(faceId, templateList.getFirst().getId(), 1);
|
createTaskByFaceIdAndTemplateId(faceId, templateList.getFirst().getId(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void createTaskByFaceIdAndTempalteId(Long faceId, Long templateId) {
|
public void createTaskByFaceIdAndTemplateId(Long faceId, Long templateId) {
|
||||||
createTaskByFaceIdAndTempalteId(faceId, templateId, 0);
|
createTaskByFaceIdAndTemplateId(faceId, templateId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createTaskByFaceIdAndTempalteId(Long faceId, Long templateId, int automatic) {
|
public void createTaskByFaceIdAndTemplateId(Long faceId, Long templateId, int automatic) {
|
||||||
createTaskByFaceIdAndTempalteIdInternal(faceId, templateId, automatic, false);
|
createTaskByFaceIdAndTemplateIdInternal(faceId, templateId, automatic, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createTaskByFaceIdAndTempalteIdInternal(Long faceId, Long templateId, int automatic, boolean forceCreate) {
|
private void createTaskByFaceIdAndTemplateIdInternal(Long faceId, Long templateId, int automatic, boolean forceCreate) {
|
||||||
FaceEntity face = faceRepository.getFace(faceId);
|
FaceEntity face = faceRepository.getFace(faceId);
|
||||||
if (face == null) {
|
if (face == null) {
|
||||||
log.info("faceId:{} is not exist", faceId);
|
log.info("faceId:{} is not exist", faceId);
|
||||||
|
Reference in New Issue
Block a user