From 6c92976e4e560575bf17646a74a45aa6c7eb1923 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 15 九月 2023 08:52:32 +0800
Subject: [PATCH] 代码打包重新部署
---
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..8ca959b 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 String passwordFreeLogin(@RequestParam String username, HttpServletRequest request) {
+ String token = "";
+ try {
+ token = passwordFreeLoginService.passwordFreeLogin(username,request);
+ }catch (Exception e){
+ throw new ServiceException("鍏嶅瘑鐧诲綍鑾峰彇token澶辫触锛�"+e.getMessage());
+ }
+ return token;
}
-
-
-
}
--
Gitblit v1.9.3