iailab-cloud/iailab-gateway/src/main/resources/application.yaml
@@ -148,7 +148,7 @@ logging: file: name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 name: @log.path@/iailab-gateway/log/${spring.application.name}.log # 日志文件名,全路径 knife4j: # 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档 iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/controller/admin/task/BpmTaskController.java
@@ -4,6 +4,7 @@ import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.number.NumberUtils; import com.iailab.framework.datapermission.core.annotation.DataPermission; import com.iailab.module.bpm.controller.admin.task.vo.task.*; import com.iailab.module.bpm.convert.task.BpmTaskConvert; import com.iailab.module.bpm.dal.dataobject.definition.BpmFormDO; @@ -60,6 +61,7 @@ @GetMapping("todo-page") @Operation(summary = "获取 Todo 待办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") @DataPermission(enable = false) // 关闭数据权限,避免只查看自己时,查询不到部门。 public CommonResult<PageResult<BpmTaskRespVO>> getTaskTodoPage(@Valid BpmTaskPageReqVO pageVO) { PageResult<Task> pageResult = taskService.getTaskTodoPage(getLoginUserId(), pageVO); if (CollUtil.isEmpty(pageResult.getList())) { @@ -69,9 +71,11 @@ // 拼接数据 Map<String, ProcessInstance> processInstanceMap = processInstanceService.getProcessInstanceMap( convertSet(pageResult.getList(), Task::getProcessInstanceId)); // TODO 此处有bug Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap)); PageResult<BpmTaskRespVO> bpmTaskRespVOPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap); return success(bpmTaskRespVOPageResult); } @GetMapping("done-page") iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.iailab.framework.common.util.number.NumberUtils; import com.iailab.framework.datapermission.core.annotation.DataPermission; import com.iailab.module.bpm.enums.definition.BpmBoundaryEventType; import com.iailab.module.bpm.framework.flowable.core.enums.BpmnModelConstants; import com.iailab.module.bpm.framework.flowable.core.util.BpmnModelUtils; iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateClassExecutionListener.java
@@ -1,8 +1,12 @@ package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.flowable.bpmn.model.FieldExtension; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.delegate.JavaDelegate; import java.util.List; /** * 类型为 class 的 ExecutionListener 监听器示例 @@ -14,8 +18,15 @@ @Override public void execute(DelegateExecution execution) { log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), log.info("[execute][execution({}) 执行监听器(类)被调用!变量有:{}]", execution.getId(), execution.getCurrentFlowableListener().getFieldExtensions()); List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); if(ObjectUtils.isNotEmpty(fieldExtensions)) { fieldExtensions.stream().forEach(fieldExtension -> { System.out.println(fieldExtension.getFieldName()); System.out.println(fieldExtension.getExpression()); }); } } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java
@@ -1,9 +1,13 @@ package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.flowable.bpmn.model.FieldExtension; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.delegate.JavaDelegate; import org.springframework.stereotype.Component; import java.util.List; /** * 类型为 delegateExpression 的 ExecutionListener 监听器示例 @@ -16,8 +20,15 @@ @Override public void execute(DelegateExecution execution) { log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), log.info("[execute][execution({}) 执行监听器(委托表达式被调用)!变量有:{}]", execution.getId(), execution.getCurrentFlowableListener().getFieldExtensions()); List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); if(ObjectUtils.isNotEmpty(fieldExtensions)) { fieldExtensions.stream().forEach(fieldExtension -> { System.out.println(fieldExtension.getFieldName()); System.out.println(fieldExtension.getStringValue()); }); } } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoSpringExpressionExecutionListener.java
@@ -1,8 +1,12 @@ package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.flowable.bpmn.model.FieldExtension; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; import java.util.List; /** * 类型为 expression 的 ExecutionListener 监听器示例 @@ -14,8 +18,15 @@ public class DemoSpringExpressionExecutionListener { public void execute(DelegateExecution execution) { log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), log.info("[execute][execution({}) 执行监听器(spring表达式)被调用!变量有:{}]", execution.getId(), execution.getCurrentFlowableListener().getFieldExtensions()); List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); if(ObjectUtils.isNotEmpty(fieldExtensions)) { fieldExtensions.stream().forEach(fieldExtension -> { System.out.println(fieldExtension.getFieldName()); System.out.println(fieldExtension.getExpression()); }); } } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java
@@ -14,7 +14,7 @@ @Override public void notify(DelegateTask delegateTask) { log.info("[execute][task({}) 被调用]", delegateTask.getId()); log.info("[execute][task({}) 任务监听器(类)被调用]", delegateTask.getId()); } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateExpressionTaskListener.java
@@ -5,6 +5,8 @@ import org.flowable.task.service.delegate.DelegateTask; import org.springframework.stereotype.Component; import java.util.Map; /** * 类型为 delegateExpression 的 TaskListener 监听器示例 * @@ -16,7 +18,9 @@ @Override public void notify(DelegateTask delegateTask) { log.info("[execute][task({}) 被调用]", delegateTask.getId()); log.info("[execute][task({}) 任务监听器(委托表达式)被调用]", delegateTask.getId()); Map<String, Object> variables = delegateTask.getVariables(); System.out.println(variables.toString());; } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java
@@ -14,7 +14,7 @@ public class DemoSpringExpressionTaskListener { public void notify(DelegateTask delegateTask) { log.info("[execute][task({}) 被调用]", delegateTask.getId()); log.info("[execute][task({}) 任务监听器(spring表达式)被调用]", delegateTask.getId()); } } iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/service/task/BpmTaskServiceImpl.java
@@ -9,6 +9,7 @@ import com.iailab.framework.common.util.number.NumberUtils; import com.iailab.framework.common.util.object.ObjectUtils; import com.iailab.framework.common.util.object.PageUtils; import com.iailab.framework.datapermission.core.annotation.DataPermission; import com.iailab.framework.web.core.util.WebFrameworkUtils; import com.iailab.module.bpm.controller.admin.task.vo.task.*; import com.iailab.module.bpm.convert.task.BpmTaskConvert; @@ -1145,7 +1146,6 @@ } } } AdminUserRespDTO startUser = adminUserApi.getUser(Long.valueOf(processInstance.getStartUserId())).getCheckedData(); messageService.sendMessageWhenTaskAssigned(BpmTaskConvert.INSTANCE.convert(processInstance, startUser, task)); } iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvokerTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpressionTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptMemberStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateExpressionStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateGroupStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidatePostStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateRoleStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateUserStrategyTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/service/category/BpmCategoryServiceImplTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/service/definition/BpmFormServiceTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/java/com/iailab/module/bpm/service/definition/BpmUserGroupServiceTest.java
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/resources/application-unit-test.yaml
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/resources/logback.xml
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/resources/sql/clean.sql
文件已删除 iailab-module-bpm/iailab-module-bpm-biz/src/test/resources/sql/create_tables.sql
文件已删除 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
@@ -3,6 +3,7 @@ import com.iailab.module.data.common.enums.DataSourceType; import com.iailab.module.data.common.utils.R; import com.iailab.module.data.channel.kio.collector.KingIOCollector; import com.iailab.module.data.influxdb.pojo.InfluxPointValueBoolPOJO; import com.iailab.module.data.influxdb.pojo.InfluxPointValueDigPOJO; import com.iailab.module.data.influxdb.pojo.InfluxPointValueSimPOJO; import com.iailab.module.data.point.collection.handler.CalculateHandle; @@ -23,6 +24,7 @@ import javax.annotation.Resource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -68,6 +70,13 @@ @Autowired private DaPointCollectStatusService daPointCollectStatusService; @Autowired private RedisTemplate<String, Object> redisTemplate; public static final String PV = "PV_"; public static final int offset = 60 * 3; /** * 采集 * @@ -95,9 +104,22 @@ List<DaPointDTO> pointCumulateList = daPointService.getCumulatePoint(minfreq); pointValues.addAll(cumulateHandle.handle(collectTime, pointCumulateList)); log.info("存入数据库"); log.info("存入时序库"); influxDBService.asyncWritePointValues(pointValues); log.info("存入缓存"); for (InfluxPointValuePOJO pointValue : pointValues) { if (pointValue instanceof InfluxPointValueSimPOJO) { InfluxPointValueSimPOJO simPOJO = (InfluxPointValueSimPOJO) pointValue; redisTemplate.opsForValue().set(PV + simPOJO.getPoint(), simPOJO.getValue(), offset); } else if (pointValue instanceof InfluxPointValueDigPOJO) { InfluxPointValueDigPOJO digPOJO = (InfluxPointValueDigPOJO) pointValue; redisTemplate.opsForValue().set(PV + digPOJO.getPoint(), digPOJO.getValue(), offset); } else if (pointValue instanceof InfluxPointValueBoolPOJO) { InfluxPointValueBoolPOJO boolPOJO = (InfluxPointValueBoolPOJO) pointValue; redisTemplate.opsForValue().set(PV + boolPOJO.getPoint(), boolPOJO.getValue(), offset); } } log.info("更新采集状态"); daPointCollectStatusService.recordStatusList(pointValues, collectTime); log.info("采集完成"); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CalculateHandle.java
@@ -1,8 +1,10 @@ package com.iailab.module.data.point.collection.handler; import com.iailab.module.data.common.enums.CommonConstant; import com.iailab.module.data.common.enums.DataTypeEnum; import com.iailab.module.data.common.enums.JsErrorCode; import com.iailab.module.data.common.utils.JavaScriptHandler; import com.iailab.module.data.point.collection.PointCollector; import com.iailab.module.data.point.collection.utils.GenInfluxPointValueUtils; import com.iailab.module.data.point.dto.DaPointDTO; import com.iailab.module.data.point.service.DaPointService; @@ -10,6 +12,9 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import javax.annotation.Resource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -38,6 +43,9 @@ @Resource private JavaScriptHandler javaScriptHandler; @Autowired private RedisTemplate<String, Object> redisTemplate; public static final String regex = "[+\\-\\*/()\\&\\|\\>\\<]"; @@ -86,7 +94,7 @@ String result = javaScriptHandler.eval(expression); log.info("result=" + result); if (result == null) { return null; return CommonConstant.BAD_VALUE; } else if (result.contains(JsErrorCode.Infinity.name()) || result.contains(JsErrorCode.NaN.name())) { log.info("计算异常,使用默认值"); @@ -95,7 +103,7 @@ if (DataTypeEnum.INT.getCode().equals(dto.getDataType())) { return new BigDecimal(result).intValue(); } else if (DataTypeEnum.FLOAT.getCode().equals(dto.getDataType())) { return new BigDecimal(result).setScale(10, BigDecimal.ROUND_UP).doubleValue(); return new BigDecimal(result).setScale(4, BigDecimal.ROUND_UP).doubleValue(); } else if (DataTypeEnum.BOOLEAN.getCode().equals(dto.getDataType())) { return Boolean.parseBoolean(result); } @@ -110,12 +118,19 @@ return data; } pointMathList.forEach(item -> { data.put(item.getPointNo(), singleCompute(item)); Object value = CommonConstant.BAD_VALUE; if (redisTemplate.hasKey(PointCollector.PV + item.getPointNo())) { value = redisTemplate.opsForValue().get(PointCollector.PV + item.getPointNo()); } else { value = singleCompute(item); } data.put(item.getPointNo(), value); }); return data; } private Object singleCompute(DaPointDTO dto) { String result = CommonConstant.BAD_VALUE.toString(); Map<String, Object> dataMap = new HashMap<>(); String expression = dto.getExpression(); String[] arr = expression.split(regex); @@ -135,19 +150,18 @@ expression = expression.replace("False", "false"); expression = expression.replace("True", "true"); log.info("PointNo=" + dto.getPointNo() + ";expression=" + expression); String result = javaScriptHandler.eval(expression); result = javaScriptHandler.eval(expression); log.info("result=" + result); if (result == null) { return null; } else if (result.contains(JsErrorCode.Infinity.name()) || result.contains(JsErrorCode.NaN.name())) { return CommonConstant.BAD_VALUE; } else if (result.contains(JsErrorCode.Infinity.name()) || result.contains(JsErrorCode.NaN.name())) { log.info("计算异常,使用默认值"); return dto.getDefaultValue() == null ? BigDecimal.ZERO : dto.getDefaultValue(); } else { if (DataTypeEnum.INT.getCode().equals(dto.getDataType())) { return new BigDecimal(result).intValue(); } else if (DataTypeEnum.FLOAT.getCode().equals(dto.getDataType())) { return new BigDecimal(result).setScale(10, BigDecimal.ROUND_UP).doubleValue(); return new BigDecimal(result).setScale(2, BigDecimal.ROUND_UP).doubleValue(); } else if (DataTypeEnum.BOOLEAN.getCode().equals(dto.getDataType())) { return Boolean.parseBoolean(result); } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java
@@ -7,12 +7,14 @@ import com.iailab.module.data.common.enums.CommonConstant; import com.iailab.module.data.enums.DataPointFreqEnum; import com.iailab.module.data.influxdb.pojo.InfluxPointValuePOJO; import com.iailab.module.data.point.collection.PointCollector; import com.iailab.module.data.point.collection.utils.GenInfluxPointValueUtils; import com.iailab.module.data.point.dto.DaPointDTO; import com.iailab.module.data.point.service.DaPointService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -37,6 +39,9 @@ @Autowired @Lazy private DataPointApi dataPointApi; @Autowired private RedisTemplate<String, Object> redisTemplate; public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos) { List<InfluxPointValuePOJO> result = new ArrayList<>(); @@ -73,7 +78,13 @@ Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.MILLISECOND, 0); pointMathList.forEach(item -> { data.put(item.getPointNo(), singleCompute(item, calendar.getTime())); Object value = CommonConstant.BAD_VALUE; if (redisTemplate.hasKey(PointCollector.PV + item.getPointNo())) { value = redisTemplate.opsForValue().get(PointCollector.PV + item.getPointNo()); } else { value = singleCompute(item, calendar.getTime()); } data.put(item.getPointNo(), value); }); return data; } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -10,6 +10,7 @@ import com.iailab.module.data.channel.kio.collector.KingIOCollector; import com.iailab.module.data.channel.modbus.collector.ModBusCollector; import com.iailab.module.data.channel.opcua.collector.OpcUaCollector; import com.iailab.module.data.point.collection.PointCollector; import com.iailab.module.data.point.collection.utils.GenInfluxPointValueUtils; import com.iailab.module.data.point.common.PointDataTypeEnum; import com.iailab.module.data.point.dto.DaPointDTO; @@ -19,6 +20,7 @@ import javax.annotation.Resource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -57,6 +59,9 @@ @Resource private DaPointService daPointService; @Autowired private RedisTemplate<String, Object> redisTemplate; public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos, Map<String, Object> dataMap) { log.info("测量点处理开始"); @@ -178,7 +183,9 @@ item -> { try { Object value = CommonConstant.BAD_VALUE; if (DataSourceType.OPCUA.getCode().equals(item.getSourceType())) { if (redisTemplate.hasKey(PointCollector.PV + item.getPointNo())) { value = redisTemplate.opsForValue().get(PointCollector.PV + item.getPointNo()); } else if (DataSourceType.OPCUA.getCode().equals(item.getSourceType())) { value = opcUaCollector.getTagValue(item.getSourceId(), item.getTagNo()); } else if (DataSourceType.ModBus.getCode().equals(item.getSourceType())) { value = modBusCollector.getTagValue(item.getSourceId(), item.getTagNo()); @@ -186,12 +193,13 @@ value = kingIOCollector.getTagValue(item.getSourceId(), item.getTagNo()); } else if (DataSourceType.HTTP.getCode().equals(item.getSourceType())) { value = httpCollectorForIhd.getTagValue(item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()); // 存入缓存 redisTemplate.opsForValue().set(PointCollector.PV + item.getPointNo(), value, PointCollector.offset); } else { log.info("没有匹配的TagNo=" + item.getTagNo()); } log.info("没有匹配的TagNo=" + item.getTagNo()); log.info("valueStr=" + value.toString()); log.info("DataType=" + item.getDataType()); log.info("TagNo=" + item.getTagNo() + ",value=" + value.toString()); if (!PointDataTypeEnum.BOOLEAN.getCode().equals(item.getDataType())) { BigDecimal decValue = new BigDecimal(value.toString()); if (PointDataTypeEnum.FLOAT.getCode().equals(item.getDataType())) { iailab-module-data/iailab-module-data-biz/src/main/resources/application.yaml
@@ -61,7 +61,7 @@ logging: file: name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 name: @log.path@/iailab-data/log/${spring.application.name}.log # 日志文件名,全路径 level: org: springframework: iailab-module-infra/iailab-module-infra-biz/src/main/resources/application.yaml
@@ -11,7 +11,7 @@ username: @nacos.username@ password: @nacos.password@ discovery: # 【配置中心】配置项 ip: @deploy.server@ # ip: @deploy.server@ namespace: @profiles.active@ group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP metadata: @@ -58,7 +58,7 @@ logging: file: name: D:/DLUT/IailabPlat/webapp/infra/logs/${spring.application.name}.log # 日志文件名,全路径 name: @log.path@/iailab-infra/log/${spring.application.name}.log # 日志文件名,全路径 --- #################### 接口文档配置 #################### iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml
@@ -58,7 +58,7 @@ logging: file: name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 name: @log.path@/iailab-model/log/${spring.application.name}.log # 日志文件名,全路径 level: org: springframework: iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java
@@ -253,7 +253,7 @@ menu.setParentId(parentMenu.getId()); tempChildren.add(parentMenu); } else if(menu.getType().equals(MenuTypeEnum.DIR.getType())) { // 为应用菜单二级目录前增加“/” // 为应用菜单二级目录前增加“/” (不处理外链菜单path) if(!menu.getPath().contains("http:") && !menu.getPath().contains("https:")) { menu.setPath("/" + menu.getPath()); } iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/convert/auth/AuthConvert.java
@@ -208,7 +208,10 @@ List<AuthPermissionInfoRespVO.MenuVO> menuVOS = filterList(treeNodeMap.values(), node -> id.equals(node.getParentId())); if(type == 0) { menuVOS.stream().forEach(menuVO -> { menuVO.setPath((parentPath + "/" + menuVO.getPath()).replace("//", "/")); // 不处理外链菜单path if(!menuVO.getPath().contains("http:") && !menuVO.getPath().contains("https:")) { menuVO.setPath((parentPath + "/" + menuVO.getPath()).replace("//", "/")); } }); } return menuVOS; iailab-module-system/iailab-module-system-biz/src/main/resources/application.yaml
@@ -58,7 +58,7 @@ logging: file: name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 name: @log.path@/iailab-system/log/${spring.application.name}.log # 日志文件名,全路径 --- #################### 接口文档配置 #################### @@ -225,4 +225,4 @@ begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 end-code: 9999 # 这里配置 9999 的原因是,测试方便。 debug: false debug: true pom.xml
@@ -122,7 +122,7 @@ <nacos.metadata.version>1.0.0</nacos.metadata.version> <log.path>D:\DLUT\iailab-plat</log.path> <logstash.address>127.0.0.1:4560</logstash.address> <deploy.server>192.168.56.1</deploy.server> <deploy.server>172.16.216.132</deploy.server> </properties> <activation> <!-- 默认环境 --> @@ -156,7 +156,7 @@ <nacos.username>nacos</nacos.username> <nacos.password>nacos</nacos.password> <nacos.metadata.version>1.0.0</nacos.metadata.version> <log.path>D:\iailab\logs</log.path> <log.path>D:\iailab</log.path> <logstash.address>127.0.0.1:4560</logstash.address> <deploy.server>10.88.4.131</deploy.server> </properties>