提交 b6dfee10 authored 作者: 孙洁清's avatar 孙洁清

评估报告管理页面修改v1.0.3

上级 fa63db07
...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Map; import java.util.Map;
...@@ -33,9 +34,16 @@ public class EvaluationController { ...@@ -33,9 +34,16 @@ public class EvaluationController {
return ResponseEntity.ok(200); return ResponseEntity.ok(200);
} }
@ApiOperation("根据用户名查询最新的报告输出") @ApiOperation("根据用户名查询最新的报告输出")
@GetMapping(value = "/{name}") @GetMapping(value = "/{name}/{id}")
public ResponseEntity getName(@PathVariable String name) { public ResponseEntity getName(@PathVariable String name,@PathVariable String id) {
Evaluation evaluation = evaluationService.findByName(name); if(StringUtils.isEmpty(id)){
Evaluation e = evaluationService.findByName(name);
if(e!=null){
return ResponseEntity.ok(e.getOutEva());
}
return ResponseEntity.ok(null);
}
Evaluation evaluation = evaluationService.findById(id);
if(evaluation!=null){ if(evaluation!=null){
return ResponseEntity.ok(evaluation.getOutEva()); return ResponseEntity.ok(evaluation.getOutEva());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论