From 7d9733a9fe0e21efe346787838aa5182633e30d2 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 08 十月 2023 22:33:10 +0800
Subject: [PATCH] 注意更新blade-core-tool.jar

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/PasswordFreeLoginController.java |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 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 d0cd358..c4d7e8e 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
@@ -5,12 +5,21 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.springframework.web.servlet.view.RedirectView;
 
 import javax.annotation.Resource;
+import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import java.io.IOException;
 
 import static com.vci.ubcs.starter.util.AESUtils.aesDecrypt;
 import static com.vci.ubcs.starter.util.AESUtils.aesEncrypt;
@@ -41,21 +50,19 @@
 
 	/**
 	 * 鍗曠偣鐧诲綍
-	 * @param request
+	 * @param empCode
 	 * @return
 	 * @throws Exception
 	 */
-	@GetMapping("/ssoLogin")
-	public ModelAndView oaSsoLogin(HttpServletRequest request, ModelAndView model){
+	@PostMapping("/ssoLogin")
+	public String oaSsoLogin(String empCode){
 		String token;
 		try {
-			token = passwordFreeLoginService.ssoFreeLogin(request);
+			token = passwordFreeLoginService.ssoFreeLogin(empCode);
 		}catch (Exception e){
 			throw new ServiceException("鍗曠偣鐧诲綍鑾峰彇token澶辫触:"+e.getMessage());
 		}
-		model.addObject("token",token);
-		model.setViewName("sso");
-		return model;
+		return token;
 	}
 
 }

--
Gitblit v1.9.3