From 5222132678f963cf1a9b99739ac33f6bdd9ff88c Mon Sep 17 00:00:00 2001 From: nyoung <12190070+nyoungo@user.noreply.gitee.com> Date: Sat, 14 Sep 2024 11:51:06 +0800 Subject: [PATCH] 1 --- .../controller/AppSwiperController.java | 8 +++---- .../controller/admin/SysLoginController.java | 21 +++++++++++++++++++ .../src/main/resources/application.yaml | 1 + 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java index 610c88fd..d91631b0 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java @@ -69,7 +69,7 @@ public class AppSwiperController extends BaseController /** * 查询【请填写功能名称】列表 */ - @PreAuthorize("@ss.hasPermi('system:swiper:list')") + @GetMapping("/system/appSwiper/list") public TableDataInfo list(AppSwiper appSwiper) { @@ -81,7 +81,7 @@ public class AppSwiperController extends BaseController /** * 导出【请填写功能名称】列表 */ - @PreAuthorize("@ss.hasPermi('system:swiper:export')") + @PostMapping("/system/appSwiper/export") public void export(HttpServletResponse response, AppSwiper appSwiper) { @@ -93,7 +93,7 @@ public class AppSwiperController extends BaseController /** * 获取【请填写功能名称】详细信息 */ - @PreAuthorize("@ss.hasPermi('system:swiper:query')") + @GetMapping(value = "/system/appSwiper/{swiperId}") public CommonResult getInfo(@PathVariable("swiperId") Long swiperId) { @@ -103,7 +103,7 @@ public class AppSwiperController extends BaseController /** * 新增【请填写功能名称】 */ - @PreAuthorize("@ss.hasPermi('system:swiper:add')") + @PostMapping("/system/appSwiper/add") public CommonResult add(@RequestBody AppSwiper appSwiper) { diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java index 3f37731c..ad67370c 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java @@ -161,6 +161,27 @@ public class SysLoginController { authLoginReqVO.setPassword(loginBody.getPassword()); return success(loginService.login(authLoginReqVO)); } + + /** + * 登录方法 + * + * @param loginBody 登录信息 + * @return 结果 + */ + @PostMapping("/loginJcApp") + public CommonResult loginJcApp(@RequestBody LoginBody loginBody) throws Exception { + String userName = loginBody.getUsername(); + AdminUserDO user = userService.getUserByUsername(userName); + if (ObjectUtil.isEmpty(user)) { + return error(CommonErrorCodeConstants.LOGIN_ACCOUNT_NOT_EXIST); + } + AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO(); + authLoginReqVO.setUsername(loginBody.getUsername()); + authLoginReqVO.setPassword(loginBody.getPassword()); + return success(loginService.login(authLoginReqVO)); + } + + /** * 司机登录方法 * diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index fcfe3025..925cda6d 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -224,6 +224,7 @@ yudao: - /websocket/** - /admin-api/rescue/wxLoginRescue - /admin-api/rescue/wxLoginJc + - /admin-api/rescue/loginJcApp websocket: enable: true # websocket的开关 path: /infra/ws # 路径