From 5203081b68e3a8dc139d1807b2f8774e4a00a82a Mon Sep 17 00:00:00 2001
From: ludc <ludc@vci-tech.com>
Date: 星期四, 16 一月 2025 11:11:59 +0800
Subject: [PATCH] 退出登录接口增加清除session、jwttoken等缓存信息

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebEnumController.java |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebEnumController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebEnumController.java
index d9a5837..5337f9c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebEnumController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebEnumController.java
@@ -2,7 +2,6 @@
 
 import com.vci.constant.FrameWorkLangCodeConstant;
 import com.vci.dto.OsEnumDTO;
-import com.vci.starter.web.annotation.controller.VciUnCheckRight;
 import com.vci.starter.web.annotation.log.VciBusinessLog;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseQueryObject;
@@ -12,11 +11,10 @@
 import com.vci.pagemodel.OsEnumItemVO;
 import com.vci.pagemodel.OsEnumVO;
 import com.vci.starter.web.util.ControllerUtil;
-import com.vci.starter.web.util.LangBaseUtil;
 import com.vci.starter.web.util.LocalFileUtil;
 import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.web.service.OsEnumServiceI;
-import com.vci.web.util.Func;
+import com.vci.starter.web.util.Lcm.Func;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,7 +56,6 @@
 	 * @return 鏋氫妇鐨勪笅鎷夊��
 	 */
 	@VciBusinessLog(notStore=true,operateName="鑾峰彇鏋氫妇")
-	@VciUnCheckRight
 	@GetMapping("/getEnum")
 	public BaseResult<List<KeyValue>> getEnum(String comboxKey){
 		return BaseResult.success(enumService.getEnum(comboxKey));
@@ -96,6 +93,24 @@
 	@GetMapping("/getDataEnum")
 	public BaseResult<List<KeyValue>> getDataEnum(String oid,String btmname){
 		return BaseResult.success(enumService.getDataEnum(oid,btmname));
+	}
+
+	/**
+	 * 鏍规嵁鏋氫妇绫诲瀷鑾峰彇鏋氫妇
+	 * @param enumType 鏌ヨ鏉′欢name
+	 * @return 鍒楄〃鐨勫唴瀹�
+	 */
+	@GetMapping( "/getEnumMapByType")
+	@VciBusinessLog(operateName = "鏋氫妇鍒楄〃")
+	public BaseResult getEnumMapByType(String enumType) {
+		try {
+			return BaseResult.dataList(enumService.getEnumMapByType(enumType));
+		}catch (Exception e) {
+			e.printStackTrace();
+			String exceptionMessage = "鏋氫妇绠$悊鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+			logger.error(exceptionMessage);
+			return BaseResult.fail(exceptionMessage);
+		}
 	}
 
 	/**
@@ -196,10 +211,9 @@
 	 */
 	@GetMapping( "/exportEnumTypes")
 	@VciBusinessLog(operateName = "瀵煎嚭鏋氫妇绫诲瀷")
-	@VciUnCheckRight
 	public void exportEnumTypes(String exportFileName,String enumNames, HttpServletResponse response){
 		try {
-			String excelPath = enumService.exportEnumTypes(exportFileName,enumNames);
+			String excelPath = enumService.exportEnumTypes(exportFileName,enumNames,false);
 			ControllerUtil.writeFileToResponse(response,excelPath);
 		} catch (Exception e) {
 			String msg = "瀵煎嚭鏋氫妇鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -220,7 +234,6 @@
 	 */
 	@GetMapping( "/downloadEnumTemplate")
 	@VciBusinessLog(operateName = "瀵煎嚭鏋氫妇绫诲瀷")
-	@VciUnCheckRight
 	public void downloadEnumTemplate(String exportFileName, HttpServletResponse response){
 		try {
 			String excelPath = enumService.downloadEnumTemplate(exportFileName);
@@ -254,7 +267,7 @@
 				return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
 			}
 		}catch (Throwable e) {
-			throw new VciBaseException(e.getMessage(),new String[0],e);
+			throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
 		}finally {
 			file1.delete();
 		}

--
Gitblit v1.9.3