Commit a9e7ec19 authored by W_Y's avatar W_Y

查看车辆审查任务

parent fd217a6c
...@@ -25,6 +25,8 @@ public class CarReviewTask implements Serializable { ...@@ -25,6 +25,8 @@ public class CarReviewTask implements Serializable {
@TableField(exist = false) @TableField(exist = false)
public static final String TASK_STATUS_FINISH = "FINISH"; public static final String TASK_STATUS_FINISH = "FINISH";
@TableField(exist = false) @TableField(exist = false)
public static final String REVIEW_STATUS_NONE = "NONE"; public static final String REVIEW_STATUS_NONE = "NONE";
@TableField(exist = false) @TableField(exist = false)
......
...@@ -117,7 +117,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C ...@@ -117,7 +117,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override @Override
public CarReviewTaskViewResponse viewReviewTask(Long taskId) { public CarReviewTaskViewResponse viewReviewTask(Long taskId) {
CarReviewTask carReviewTask = carReviewTaskService.getById(taskId); CarReviewTask carReviewTask = carReviewTaskService.getById(taskId);
return strategyCarReviewTaskContext.getResource(carReviewTask.getTaskStatus()).doView(carReviewTask); return strategyCarReviewTaskContext.getResource(carReviewTask.getTaskStatus() + "SystemReviewTask").doView(carReviewTask);
} }
@Override @Override
......
...@@ -20,7 +20,7 @@ import java.util.function.Function; ...@@ -20,7 +20,7 @@ import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Transactional @Transactional
@Service(SystemReviewTask.STATUS_PENDING) @Service(SystemReviewTask.STATUS_PENDING + "SystemReviewTask")
public class StrategySystemReviewTaskPending implements StrategySystemReviewTask { public class StrategySystemReviewTaskPending implements StrategySystemReviewTask {
@Autowired @Autowired
......
...@@ -6,6 +6,10 @@ import com.ruoyi.common.core.domain.R; ...@@ -6,6 +6,10 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.service.CarReviewTaskService; import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.web.request.CarReviewTaskCreateRequest; import com.ruoyi.web.request.CarReviewTaskCreateRequest;
import com.ruoyi.web.request.CarReviewTaskViewRequest;
import com.ruoyi.web.request.SystemReviewTaskViewRequest;
import com.ruoyi.web.response.CarReviewTaskViewResponse;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag; import org.apache.skywalking.apm.toolkit.trace.Tag;
...@@ -36,5 +40,14 @@ public class CarReviewTaskController extends BaseController { ...@@ -36,5 +40,14 @@ public class CarReviewTaskController extends BaseController {
return R.ok(); return R.ok();
} }
@ApiOperation("查看车辆审查任务详情")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/view")
public R<CarReviewTaskViewResponse> view(@Validated @RequestBody CarReviewTaskViewRequest request) {
CarReviewTaskViewResponse carReviewTaskViewResponse = carReviewTaskService.viewReviewTask(request.getTaskId());
return R.ok(carReviewTaskViewResponse);
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "CarReviewTaskViewRequest", description = "查兰车辆审查任务")
@Data
public class CarReviewTaskViewRequest {
@ApiModelProperty("任务id")
private Long taskId;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment