Skip to content

Commit

Permalink
feat: 优化分库分表迁移过程中,task_instance_id 动态查询条件构造逻辑 #3324
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu096 committed Dec 12, 2024
1 parent 851ea32 commit 83828eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public TaskContext getTaskContext(String username, TaskContextQuery contextQuery
InternalResponse<ServiceStepInstanceDTO> resp = serviceStepInstanceResource.getStepInstance(
username,
contextQuery.getAppId(),
contextQuery.getTaskInstanceId(),
contextQuery.getStepInstanceId()
);
if (resp.isSuccess()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@
@SmartFeignClient(value = "job-execute", contextId = "stepInstanceResource")
@InternalAPI
public interface ServiceStepInstanceResource {
@GetMapping("/service/stepInstance/app/{appId}/stepInstanceId/{stepInstanceId}")
@GetMapping("/service/app/{appId}/taskInstance/{taskInstanceId}/stepInstance/{stepInstanceId}")
InternalResponse<ServiceStepInstanceDTO> getStepInstance(
@RequestHeader("username")
String username,
@ApiParam(value = "作业平台业务ID", required = true)
@PathVariable(value = "appId")
Long appId,
@ApiParam(value = "作业实例ID", name = "taskInstanceId", required = true)
@PathVariable("taskInstanceId")
Long taskInstanceId,
@ApiParam(value = "步骤实例ID", name = "stepInstanceId", required = true)
@PathVariable("stepInstanceId")
Long stepInstanceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ public ServiceStepInstanceResourceImpl(TaskInstanceAccessProcessor taskInstanceA
}

@Override
public InternalResponse<ServiceStepInstanceDTO> getStepInstance(String username, Long appId, Long stepInstanceId) {
public InternalResponse<ServiceStepInstanceDTO> getStepInstance(String username,
Long appId,
Long taskInstanceId,
Long stepInstanceId) {
try {
StepInstanceDTO stepInstance = stepInstanceService.getStepInstanceDetail(appId, stepInstanceId);
StepInstanceDTO stepInstance = stepInstanceService.getStepInstanceDetail(appId,
taskInstanceId, stepInstanceId);
taskInstanceAccessProcessor.processBeforeAccess(username, appId, stepInstance.getTaskInstanceId());
return InternalResponse.buildSuccessResp(stepInstance.toServiceStepInstanceDTO());
} catch (NotFoundException e) {
Expand Down

0 comments on commit 83828eb

Please sign in to comment.