|
@@ -27,19 +27,19 @@ public class DemoController {
|
|
|
@Autowired
|
|
|
private DemoService demoService;
|
|
|
|
|
|
- @GetMapping("/info")
|
|
|
- @ApiOperation("/info")
|
|
|
- public ResultVo<DemoVO> getDemo(@RequestParam(name = "id", defaultValue = "1", required = false) String id) {
|
|
|
- Demo demo = demoService.getById(id);
|
|
|
- return ResultVo.ok(BeanUtils.copy(demo, DemoVO.class));
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/add")
|
|
|
- @ApiOperation("/add")
|
|
|
- public ResultVo<Boolean> addDemo(@RequestParam("name") String name, @RequestParam("content") String content) {
|
|
|
- Demo demo = new Demo();
|
|
|
- demo.setContent(content);
|
|
|
- demo.setName(name);
|
|
|
- return ResultVo.ok(demoService.save(demo));
|
|
|
- }
|
|
|
+// @GetMapping("/info")
|
|
|
+// @ApiOperation("/info")
|
|
|
+// public ResultVo<DemoVO> getDemo(@RequestParam(name = "id", defaultValue = "1", required = false) String id) {
|
|
|
+// Demo demo = demoService.getById(id);
|
|
|
+// return ResultVo.ok(BeanUtils.copy(demo, DemoVO.class));
|
|
|
+// }
|
|
|
+//
|
|
|
+// @GetMapping("/add")
|
|
|
+// @ApiOperation("/add")
|
|
|
+// public ResultVo<Boolean> addDemo(@RequestParam("name") String name, @RequestParam("content") String content) {
|
|
|
+// Demo demo = new Demo();
|
|
|
+// demo.setContent(content);
|
|
|
+// demo.setName(name);
|
|
|
+// return ResultVo.ok(demoService.save(demo));
|
|
|
+// }
|
|
|
}
|