From 0f4bac6483639a3be54d8fa311e005a2a3c99885 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 27 九月 2024 17:45:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java | 79 +++++++++++++++++++++++++++++++++++++--
1 files changed, 75 insertions(+), 4 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
index 8f42517..0651684 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
@@ -1,8 +1,12 @@
package com.vci.web.controller;
import com.vci.constant.FrameWorkLangCodeConstant;
+import com.vci.corba.common.PLException;
import com.vci.corba.framework.data.FuncOperationInfo;
import com.vci.corba.framework.data.OperateInfo;
+import com.vci.dto.RoleInfoDTO;
+import com.vci.dto.RoleRightDTO;
+import com.vci.dto.RoleRightParamDTO;
import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI;
import com.vci.pagemodel.AppConfigDetailInfoVO;
@@ -75,17 +79,68 @@
/**
* 鑾峰彇褰撳墠妯″潡涓嬬殑瀛愭ā鍧�
- * @param parentId
- * @param modeType
* @return
*/
@GetMapping("/getSysModelAuthTreeMenuByPID")
- public BaseResult<List<MenuVO>> getSysModelAuthTreeMenuByPID(String parentId, String modeType) {
+ public BaseResult<List<MenuVO>> getSysModelAuthTreeMenuByPID() {
try {
- return BaseResult.dataList(functionQueryService.getSysModelAuthTreeMenuByPID(parentId,modeType,true));
+ return BaseResult.dataList(functionQueryService.getSysModelAuthTreeMenuByPID(false));
}catch (Exception e){
e.printStackTrace();
String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorMsg);
+ throw new VciBaseException(errorMsg);
+ }
+ }
+
+ /**
+ * 鑾峰彇鎵�鎺堟潈鐨勬ā鍧楁潈闄�
+ * @param roleId 瑙掕壊
+ * @return
+ */
+ @GetMapping("/getSysModelAuth")
+ public BaseResult<List<String>> getSysModelAuth(String roleId) {
+ try {
+ return BaseResult.dataList(functionQueryService.getSysModelAuth(roleId));
+ }catch (Exception e){
+ e.printStackTrace();
+ String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorMsg);
+ throw new VciBaseException(errorMsg);
+ }
+ }
+
+ /**
+ * 瑙掕壊鍒楄〃
+ * @param roleName 鎼滅储鐨勮鑹�
+ * @return 瑙掕壊鍒楄〃
+ */
+ @GetMapping("/getRoleList")
+ public BaseResult<List<RoleInfoDTO>> getRoleList(String roleName) {
+ try {
+ return BaseResult.dataList(functionQueryService.getRoleList(roleName));
+ }catch (Exception e){
+ e.printStackTrace();
+ String errorMsg = "鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorMsg);
+ throw new VciBaseException(errorMsg);
+ }
+ }
+
+ /**
+ * 淇濆瓨鎺堟潈鐨勬ā鍧�
+ * @param roleRightDTOS 鐢ㄦ埛閫夋嫨鎺堟潈妯″潡淇℃伅
+ * @param roleId 瑙掕壊涓婚敭
+ * @return 鎺堟潈缁撴灉
+ * @throws PLException
+ */
+ @PostMapping("/saveRoleRight")
+ public BaseResult<List<String>> saveRoleRight(@RequestBody List<RoleRightParamDTO> roleRightDTOS, String roleId) {
+ try {
+ return functionQueryService.saveRoleRight(roleRightDTOS, roleId);
+ }catch (Exception e){
+ e.printStackTrace();
+ String errorMsg = "淇濆瓨妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
logger.error(errorMsg);
throw new VciBaseException(errorMsg);
}
@@ -451,4 +506,20 @@
}
}
+ /**
+ * 鑾峰彇褰撳墠鐢ㄦ埛鍦ㄧ嚎浜烘暟
+ * @return
+ */
+ @GetMapping("/getOnlineUsersNum")
+ public BaseResult getOnlineUsersNum() {
+ try {
+ long onlineUsersNum = hmSysModConfigService.getOnlineUsersNum();
+ return BaseResult.success(onlineUsersNum);
+ } catch (Exception e) {
+ String errorMsg = "鑾峰彇褰撳墠鐢ㄦ埛鍦ㄧ嚎浜烘暟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(errorMsg);
+ throw new VciBaseException(errorMsg);
+ }
+ }
+
}
--
Gitblit v1.9.3