From 8381325223bee254168855b1b697db31fc591b9e Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 19 九月 2023 09:28:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java index 4e04c10..0d10fee 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java @@ -2,12 +2,12 @@ import com.vci.ubcs.code.service.IPasswordFreeLoginService; import io.swagger.annotations.Api; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; /** * @author ludc @@ -21,13 +21,15 @@ @Resource private IPasswordFreeLoginService passwordFreeLoginService; - @GetMapping("/login") - public R passwordFreeLogin(String account) { - boolean resBoolean = passwordFreeLoginService.passwordFreeLogin(account); - return R.status(resBoolean); + @PostMapping("/login") + public R passwordFreeLogin(@RequestParam String username, HttpServletRequest request) { + boolean status; + try { + status = passwordFreeLoginService.passwordFreeLogin(username,request); + }catch (Exception e){ + throw new ServiceException("鍏嶅瘑鐧诲綍鑾峰彇token澶辫触锛�"+e.getMessage()); + } + return R.status(status); } - - - } -- Gitblit v1.9.3