From 386f7e24fb132deacb829a86aeb723dd1d1172eb Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 16 七月 2024 14:13:46 +0800
Subject: [PATCH] 修改密码调用接口 登录添加过期提醒 登录框中英文切换不显示bug

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java
index fa9b95d..be2eb81 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java
@@ -567,7 +567,7 @@
 	}
 
 	/**
-	 * 淇濆瓨鐢ㄦ埛瑙掕壊鍏宠仈鍏崇郴
+	 * 鎴愬憳绠$悊鍒嗛厤瑙掕壊璋冪敤锛屼繚瀛樼敤鎴疯鑹插叧鑱斿叧绯�
 	 * @param userOids
 	 * @param roleIds
 	 * @return
@@ -576,7 +576,23 @@
 	public boolean saveRights(String[] userOids, String[] roleIds) throws PLException {
 		VciBaseUtil.alertNotNull(userOids,"鐢ㄦ埛涓婚敭");
 		//roleIds鍏佽涓虹┖锛屼负绌烘椂娓呯┖褰撳墠鐢ㄦ埛鐨勬潈闄�
-		return platformClientUtil.getFrameworkService().saveRights(roleIds,userOids,new UserEntityInfo());
+		UserEntityInfo userEntityInfo = new UserEntityInfo(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(),null);
+		return platformClientUtil.getFrameworkService().saveRights(roleIds,userOids,userEntityInfo);
+	}
+
+	/**
+	 * 瑙掕壊绠$悊鍒嗛厤鎴愬憳鎺ュ彛璋冪敤
+	 * @param userOids
+	 * @param roleId
+	 * @return
+	 * @throws PLException
+	 */
+	@Override
+	public boolean saveRight(String[] userOids, String roleId) throws PLException {
+		VciBaseUtil.alertNotNull(roleId,"瑙掕壊涓婚敭");
+		//roleIds鍏佽涓虹┖锛屼负绌烘椂娓呯┖褰撳墠鐢ㄦ埛鐨勬潈闄�
+		UserEntityInfo userEntityInfo = new UserEntityInfo(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(),null);
+		return platformClientUtil.getFrameworkService().saveRight(roleId,userOids,userEntityInfo);
 	}
 
 	/**
@@ -630,7 +646,7 @@
 		VciBaseUtil.alertNotNull(
 				smRoleDTO,"娣诲姞鐨勮鑹插璞�",
 				smRoleDTO.getName(),"瑙掕壊鍚�");
-		//鏌ヨ鏁版嵁搴撲腑鐨勶紝鏍规嵁瑙掕壊鍚嶆煡
+		//鏍规嵁瑙掕壊涓婚敭鏌ヨ锛岀‘淇濅慨鏀圭殑瑙掕壊瀛樺湪
 		Map<String, String> conditionMap = new HashMap<>();
 		conditionMap.put("pluid",smRoleDTO.getOid());
 		SmRoleVO dbSmRoleVO = getRoleByConditionMap(conditionMap);
@@ -638,8 +654,14 @@
 		if(Func.isEmpty(dbSmRoleVO) || Func.isBlank(dbSmRoleVO.getOid())){
 			throw new PLException("500", new String[] { "褰撳墠淇敼鐨勮鑹蹭笉瀛樺湪!"});
 		}
-		//瑙掕壊鍚嶇浉绛夛紝浣嗘槸涓婚敭涓嶇浉绛夛紝璇存槑淇敼涓虹殑瑙掕壊鍚嶅凡瀛樺湪锛屼笉鑳介噸澶�
-		if(dbSmRoleVO.getName().equals(smRoleDTO.getName()) && !dbSmRoleVO.getOid().equals(smRoleDTO.getOid())){
+		//鏌ヨ鏁版嵁搴撲腑鐨勶紝鏍规嵁瑙掕壊鍚嶆煡閲�
+		conditionMap.clear();
+		conditionMap.put("plname",smRoleDTO.getName());
+		//鎺掗櫎鎺夊綋鍓嶄慨鏀圭殑鐢ㄦ埛
+		conditionMap.put("pluid",QueryOptionConstant.NOTEQUAL + smRoleDTO.getName());
+		SmRoleVO reapeatSmRoleVO = getRoleByConditionMap(conditionMap);
+		//璇存槑淇敼涓虹殑瑙掕壊鍚嶅凡瀛樺湪锛屼笉鑳介噸澶�
+		if(Func.isNotEmpty(reapeatSmRoleVO) && smRoleDTO.getName().equals(reapeatSmRoleVO)){
 			throw new PLException("500", new String[] { "璇ヨ鑹插悕绉板凡缁忓瓨鍦�,璇蜂慨鏀�!"});
 		}
 		SmRoleDTO smRoleDTO1 = new SmRoleDTO();
@@ -676,7 +698,7 @@
 	 * @throws VciBaseException
 	 */
 	@Override
-	public BaseResult importRole(File file) throws VciBaseException {
+	public BaseResult importRole(File file) throws Exception {
 		VciBaseUtil.alertNotNull(file,"excel鏂囦欢");
 		if(!file.exists()){
 			throw new VciBaseException("瀵煎叆鐨別xcel鏂囦欢涓嶅瓨鍦�,{0}",new String[]{file.getPath()});

--
Gitblit v1.9.3