From cc1a6cea86e0ca686bfa33073a567c189227bfce Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Fri, 5 Jun 2020 18:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=90=86=E5=92=A8=E8=AF=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=B4=E8=A1=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PsychologistTitleController.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java index 8d67ce9..2df2f69 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java @@ -45,24 +45,24 @@ import java.util.Map; @RestController @RequestMapping("psychologisttitle") public class PsychologistTitleController { - + @Autowired private PsychologistTitleService psychologistTitleService; @GetMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = psychologistTitleService.page(params); return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ + public Result get(@PathVariable("id") String id) { PsychologistTitleDTO data = psychologistTitleService.get(id); return new Result().ok(data); } @PostMapping - public Result save(@RequestBody PsychologistTitleDTO dto){ + public Result save(@RequestBody PsychologistTitleDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); psychologistTitleService.save(dto); @@ -70,7 +70,7 @@ public class PsychologistTitleController { } @PutMapping - public Result update(@RequestBody PsychologistTitleDTO dto){ + public Result update(@RequestBody PsychologistTitleDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); psychologistTitleService.update(dto); @@ -78,7 +78,7 @@ public class PsychologistTitleController { } @DeleteMapping - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); psychologistTitleService.delete(ids); @@ -91,4 +91,9 @@ public class PsychologistTitleController { ExcelUtils.exportExcelToTarget(response, null, list, PsychologistTitleExcel.class); } + @GetMapping("list") + public Result> list(@RequestParam Map params) { + List page = psychologistTitleService.list(params); + return new Result>().ok(page); + } } \ No newline at end of file