From 757bfa4a2865b3066e82a7e80bea1efd8bdcd72c Mon Sep 17 00:00:00 2001 From: lyh <liuyuanheng@xalxzn.com> Date: 星期四, 20 二月 2025 15:03:27 +0800 Subject: [PATCH] 去除原有日志 默认新增管理员权限 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ComponentInfoSeServiceImpl.java | 51 ++++++--------------------------------------------- 1 files changed, 6 insertions(+), 45 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ComponentInfoSeServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ComponentInfoSeServiceImpl.java index ef7d501..58c024a 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ComponentInfoSeServiceImpl.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ComponentInfoSeServiceImpl.java @@ -52,9 +52,9 @@ @Autowired private IDocInfoService docInfoService; @Autowired - private INcLogInfoService iNcLogInfoService; - @Autowired private IDocRelativeService iDocRelativeService; + @Autowired + private IProductPermissionService productPermissionService; @Override @Transactional(rollbackFor = {Exception.class}) @@ -93,15 +93,6 @@ } componentInfo.setComponentStatus(1); - //娣诲姞鏃ュ織 - NcLogInfo ncLogInfo = new NcLogInfo(); - //妯″潡 - ncLogInfo.setModuleInfo("浜у搧缁撴瀯鏍�"); - //绫诲瀷 - ncLogInfo.setOperateType(2); - //鏃ュ織鍐呭 - ncLogInfo.setLogContent("閮ㄤ欢鍚嶇О锛�"+componentInfo.getComponentName()+"锛岄儴浠朵唬鍙凤細"+componentInfo.getComponentCode()); - iNcLogInfoService.saveLogNcInfos(ncLogInfo); boolean b = super.save(componentInfo); if(!b) ExceptionCast.cast(CommonCode.FAIL); @@ -131,30 +122,11 @@ if(!b) ExceptionCast.cast(CommonCode.FAIL); } - ComponentPermission permission = new ComponentPermission(); - permission.setComponentId(componentInfo.getComponentId()); - permission.setUserId(userId); - b = componentPermissionService.save(permission); - if(!b) - ExceptionCast.cast(CommonCode.FAIL); + b = productPermissionService.add(componentInfo.getComponentId(), userId,"2"); + if (!b) { + ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); + } //鍘婚櫎榛樿鏂板宸ュ簭锛岃浆涓烘墜鍔ㄦ坊鍔� - /*/娣诲姞榛樿宸ュ簭 - ProcessStream processStream = new ProcessStream(); - processStream.setProductId(componentInfo.getProductId()); - processStream.setComponentId(componentInfo.getComponentId()); - processStream.setProcessCode("1"); - //娣诲姞鏃ュ織 - NcLogInfo ncLogInfogx = new NcLogInfo(); - //妯″潡 - ncLogInfogx.setModuleInfo("浜у搧缁撴瀯鏍�"); - //绫诲瀷 - ncLogInfogx.setOperateType(2); - //鏃ュ織鍐呭 - ncLogInfogx.setLogContent("閮ㄤ欢鍚嶇О锛�"+componentInfo.getComponentName()+"鐢熸垚榛樿宸ュ簭锛屽伐搴忓彿锛�"+processStream.getProcessCode()); - iNcLogInfoService.saveLogNcInfos(ncLogInfogx); - b = processStreamService.save(processStream); - if(!b) - ExceptionCast.cast(CommonCode.FAIL);*/ //娣诲姞鏉冮檺 PermissionStream stream = new PermissionStream(); stream.setUserId(userId); @@ -182,17 +154,6 @@ componentInfo.setComponentStatus(null); componentInfo.setRankLevel(null); componentInfo.setProductId(null); - //娣诲姞鏃ュ織 - NcLogInfo ncLogInfo = new NcLogInfo(); - //妯″潡 - ncLogInfo.setModuleInfo("浜у搧缁撴瀯鏍�"); - //绫诲瀷 - ncLogInfo.setOperateType(3); - //鏃ュ織鍐呭 - ncLogInfo.setLogContent("淇敼閮ㄤ欢鍚嶇О锛�"+productInfoMapper.selectById(en.getProductId()).getProductName()+"瀛愰泦閮ㄤ欢"); - //淇敼淇濆瓨澶囨敞 - ncLogInfo.setRemark(JSONObject.toJSONString(en)); - iNcLogInfoService.saveLogNcInfos(ncLogInfo); boolean b = super.updateById(componentInfo); if(!b) return false; -- Gitblit v1.9.3