From c2f20e97c090ad861b617f3aaa08fd61d85dcafe Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期二, 15 六月 2021 16:23:57 +0800 Subject: [PATCH] bugfixed --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java index cdd5532..ee20528 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java @@ -1,5 +1,6 @@ package com.panzhihua.service_community.api; +import com.panzhihua.common.exceptions.ServiceException; import com.panzhihua.common.model.dtos.community.*; import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; @@ -56,7 +57,11 @@ */ @PostMapping("/add/auth") public R addAuth(@RequestBody ComEldersAuthGetResultDTO authGetResultDTO){ - return eldersAuthService.addAuthByEldersApp(authGetResultDTO); + try { + return eldersAuthService.addAuthByEldersApp(authGetResultDTO); + } catch (Exception e) { + throw new ServiceException(e.getMessage()); + } } /** @@ -65,7 +70,7 @@ * @return 查询结果 */ @PostMapping("/page/auth") - public R pageEldersByApp(@RequestBody ComEldersAuthPageDTO authPageDTO){ + public R pageEldersByApp(@RequestBody ComEldersAuthPageDTO authPageDTO) throws Exception{ return eldersAuthService.pageEldersByApp(authPageDTO); } -- Gitblit v1.7.1