├── .gitignore ├── LICENSE ├── README.md ├── pom.xml ├── rule-engine-open-compute ├── pom.xml └── src │ ├── main │ ├── java │ │ └── cn │ │ │ └── ruleengine │ │ │ └── compute │ │ │ ├── ComputeApp.java │ │ │ ├── aspect │ │ │ └── RequestLogAspect.java │ │ │ ├── config │ │ │ ├── EngineConfig.java │ │ │ ├── MonitorController.java │ │ │ ├── ThreadPoolTaskExecutorBeanPostProcessor.java │ │ │ ├── WebMvcConfig.java │ │ │ └── rabbit │ │ │ │ ├── RabbitConfig.java │ │ │ │ ├── RabbitQueueConfig.java │ │ │ │ └── RabbitTopicConfig.java │ │ │ ├── controller │ │ │ ├── FunctionController.java │ │ │ ├── GeneralRuleOutController.java │ │ │ ├── GeneralRuleTestController.java │ │ │ └── exception │ │ │ │ └── ApiExceptionHandler.java │ │ │ ├── enums │ │ │ ├── DataStatus.java │ │ │ └── ErrorCodeEnum.java │ │ │ ├── exception │ │ │ └── ApiException.java │ │ │ ├── function │ │ │ ├── AvgFunction.java │ │ │ ├── ChineseCharacterToPinyinFunction.java │ │ │ ├── CollectionDeduplicationFunction.java │ │ │ ├── CollectionMaxFunction.java │ │ │ ├── CollectionMinFunction.java │ │ │ ├── CollectionRandomValueFunction.java │ │ │ ├── CollectionSizeFunction.java │ │ │ ├── CryptoFunction.java │ │ │ ├── CurrentDateFunction.java │ │ │ ├── DateToTimestampFunction.java │ │ │ ├── Function.java │ │ │ ├── GetCollectionElementsFunction.java │ │ │ ├── GetTheDayOfTheWeekFunction.java │ │ │ ├── GetUUIDFunction.java │ │ │ ├── HttpFunction.java │ │ │ ├── IsBetweenFunction.java │ │ │ ├── IsCitizenIdFunction.java │ │ │ ├── IsEmailFunction.java │ │ │ ├── IsEmptyCollectionFunction.java │ │ │ ├── IsEmptyFunction.java │ │ │ ├── IsMobileFunction.java │ │ │ ├── LetterToLowerCaseFunction.java │ │ │ ├── LetterToUpperCaseFunction.java │ │ │ ├── MathAbsFunction.java │ │ │ ├── MobilePhoneProvinceFunction.java │ │ │ ├── SendEmailFunction.java │ │ │ ├── StringConcatFunction.java │ │ │ ├── StringLengthFunction.java │ │ │ ├── StringReplaceFunction.java │ │ │ ├── StringToCollectionFunction.java │ │ │ ├── StringTrimFunction.java │ │ │ ├── SubstringFunction.java │ │ │ ├── SumFunction.java │ │ │ ├── TimeOfDayFunction.java │ │ │ └── json │ │ │ │ ├── JsonEval.java │ │ │ │ ├── ParseJsonBooleanFunction.java │ │ │ │ ├── ParseJsonCollectionFunction.java │ │ │ │ ├── ParseJsonNumberFunction.java │ │ │ │ └── ParseJsonStringFunction.java │ │ │ ├── interceptor │ │ │ └── TraceInterceptor.java │ │ │ ├── listener │ │ │ ├── GeneralRuleMessageListener.java │ │ │ ├── VariableMessageListener.java │ │ │ └── body │ │ │ │ ├── GeneralRuleMessageBody.java │ │ │ │ └── VariableMessageBody.java │ │ │ ├── service │ │ │ ├── FunctionService.java │ │ │ ├── GeneralRulePublishService.java │ │ │ ├── MonitorService.java │ │ │ ├── RuleEngineOutService.java │ │ │ ├── RunTestService.java │ │ │ ├── ValueResolve.java │ │ │ ├── VariableResolveService.java │ │ │ ├── WorkspaceService.java │ │ │ └── impl │ │ │ │ ├── BatchExecuteTask.java │ │ │ │ ├── FunctionServiceImpl.java │ │ │ │ ├── GeneralRuleOutServiceImpl.java │ │ │ │ ├── GeneralRulePublishServiceImpl.java │ │ │ │ ├── GeneralRuleRunTestServiceImpl.java │ │ │ │ ├── ValueResolveImpl.java │ │ │ │ ├── VariableResolveServiceImpl.java │ │ │ │ └── WorkspaceServiceImpl.java │ │ │ ├── store │ │ │ ├── entity │ │ │ │ ├── RuleEngineFunction.java │ │ │ │ ├── RuleEngineFunctionParam.java │ │ │ │ ├── RuleEngineFunctionValue.java │ │ │ │ ├── RuleEngineGeneralRulePublish.java │ │ │ │ ├── RuleEngineInputParameter.java │ │ │ │ ├── RuleEngineVariable.java │ │ │ │ └── RuleEngineWorkspace.java │ │ │ ├── manager │ │ │ │ ├── RuleEngineFunctionManager.java │ │ │ │ ├── RuleEngineFunctionParamManager.java │ │ │ │ ├── RuleEngineFunctionValueManager.java │ │ │ │ ├── RuleEngineGeneralRulePublishManager.java │ │ │ │ ├── RuleEngineInputParameterManager.java │ │ │ │ ├── RuleEngineVariableManager.java │ │ │ │ ├── RuleEngineWorkspaceManager.java │ │ │ │ └── impl │ │ │ │ │ ├── RuleEngineFunctionManagerImpl.java │ │ │ │ │ ├── RuleEngineFunctionParamManagerImpl.java │ │ │ │ │ ├── RuleEngineFunctionValueManagerImpl.java │ │ │ │ │ ├── RuleEngineGeneralRulePublishManagerImpl.java │ │ │ │ │ ├── RuleEngineInputParameterManagerImpl.java │ │ │ │ │ ├── RuleEngineVariableManagerImpl.java │ │ │ │ │ └── RuleEngineWorkspaceManagerImpl.java │ │ │ └── mapper │ │ │ │ ├── RuleEngineFunctionMapper.java │ │ │ │ ├── RuleEngineFunctionParamMapper.java │ │ │ │ ├── RuleEngineFunctionValueMapper.java │ │ │ │ ├── RuleEngineGeneralRulePublishMapper.java │ │ │ │ ├── RuleEngineInputParameterMapper.java │ │ │ │ ├── RuleEngineVariableMapper.java │ │ │ │ └── RuleEngineWorkspaceMapper.java │ │ │ ├── util │ │ │ ├── HttpServletUtils.java │ │ │ └── IPUtils.java │ │ │ └── vo │ │ │ ├── AccessKey.java │ │ │ ├── BatchExecuteRequest.java │ │ │ ├── BatchExecuteResponse.java │ │ │ ├── ExecuteFunctionRequest.java │ │ │ ├── ExecuteRequest.java │ │ │ ├── FunctionData.java │ │ │ ├── IsExistsRequest.java │ │ │ ├── ParamValue.java │ │ │ └── RunTestRequest.java │ └── resources │ │ ├── application-dev.yml │ │ ├── application.yml │ │ ├── logback-spring.xml │ │ └── mapper │ │ ├── RuleEngineFunctionMapper.xml │ │ ├── RuleEngineFunctionParamMapper.xml │ │ ├── RuleEngineFunctionValueMapper.xml │ │ ├── RuleEngineGeneralRulePublishMapper.xml │ │ ├── RuleEngineInputParameterMapper.xml │ │ └── RuleEngineVariableMapper.xml │ └── test │ └── java │ └── cn │ └── ruleengine │ └── AppTest.java ├── rule-engine-open-core ├── pom.xml └── src │ └── main │ └── java │ └── cn │ └── ruleengine │ └── core │ ├── Container.java │ ├── DataSupport.java │ ├── DefaultInput.java │ ├── DefaultOutput.java │ ├── Engine.java │ ├── EngineVariable.java │ ├── FunctionExecutor.java │ ├── GeneralRuleEngine.java │ ├── Input.java │ ├── JsonParse.java │ ├── Output.java │ ├── Parameter.java │ ├── RuleEngineConfiguration.java │ ├── annotation │ ├── Executor.java │ ├── FailureStrategy.java │ ├── Function.java │ ├── FunctionCacheable.java │ └── Param.java │ ├── cache │ ├── DefaultFunctionCache.java │ ├── DefaultKeyGenerator.java │ ├── FunctionCache.java │ └── KeyGenerator.java │ ├── condition │ ├── Compare.java │ ├── Condition.java │ ├── ConditionCompare.java │ ├── ConditionCompareFactory.java │ ├── ConditionGroup.java │ ├── ConditionSet.java │ ├── Operator.java │ └── compare │ │ ├── BooleanCompare.java │ │ ├── CollectionCompare.java │ │ ├── DateCompare.java │ │ ├── NumberCompare.java │ │ └── StringCompare.java │ ├── event │ ├── Endurance.java │ ├── Event.java │ └── EventFeature.java │ ├── exception │ ├── ConditionException.java │ ├── DecisionTableException.java │ ├── EngineException.java │ ├── FormulaException.java │ ├── FunctionException.java │ ├── ValidException.java │ └── ValueException.java │ ├── listener │ ├── DefaultExecuteListener.java │ └── ExecuteListener.java │ ├── rule │ ├── GeneralRule.java │ └── Rule.java │ ├── scorecard │ ├── Card.java │ ├── ScoreCard.java │ ├── ScoreCardStrategyType.java │ └── strategy │ │ ├── AvgStrategy.java │ │ ├── MaxStrategy.java │ │ ├── MinStrategy.java │ │ ├── ScoreCardStrategy.java │ │ ├── ScoreCardStrategyFactory.java │ │ └── SumStrategy.java │ └── value │ ├── Assignment.java │ ├── Constant.java │ ├── Executor.java │ ├── Formula.java │ ├── Function.java │ ├── InputParameter.java │ ├── Value.java │ ├── ValueType.java │ ├── Variable.java │ └── VariableType.java └── rule-engine-open-web ├── pom.xml └── src ├── main ├── java │ └── cn │ │ └── ruleengine │ │ └── web │ │ ├── WebApp.java │ │ ├── annotation │ │ ├── Auth.java │ │ ├── DataPermission.java │ │ ├── NoLogin.java │ │ ├── RateLimit.java │ │ ├── ReSubmitLock.java │ │ └── SystemLog.java │ │ ├── aspect │ │ ├── DataPermissionAspect.java │ │ ├── RateLimitAspect.java │ │ ├── ReSubmitLockAspect.java │ │ ├── RequestLogAspect.java │ │ └── SystemLogAspect.java │ │ ├── config │ │ ├── Context.java │ │ ├── MybatisMetaObjectHandler.java │ │ ├── MybatisPlusConfig.java │ │ ├── SwaggerConfig.java │ │ ├── ThreadPoolTaskExecutorBeanPostProcessor.java │ │ ├── WebMvcConfig.java │ │ └── rabbit │ │ │ ├── RabbitConfig.java │ │ │ ├── RabbitQueueConfig.java │ │ │ └── RabbitTopicConfig.java │ │ ├── controller │ │ ├── ConditionController.java │ │ ├── ConditionGroupConditionController.java │ │ ├── ConditionGroupController.java │ │ ├── DataPermissionController.java │ │ ├── FunctionController.java │ │ ├── GeneralRuleController.java │ │ ├── ImportExportController.java │ │ ├── InputParameterController.java │ │ ├── OperationRecordController.java │ │ ├── RuleController.java │ │ ├── SymbolController.java │ │ ├── SystemLogController.java │ │ ├── UserController.java │ │ ├── VariableController.java │ │ ├── WorkplaceController.java │ │ ├── WorkspaceController.java │ │ ├── WorkspaceMemberController.java │ │ └── exception │ │ │ └── ApiExceptionHandler.java │ │ ├── enums │ │ ├── DataStatus.java │ │ ├── DataType.java │ │ ├── DeletedEnum.java │ │ ├── EnableEnum.java │ │ ├── ErrorCodeEnum.java │ │ ├── FtlTemplatesEnum.java │ │ ├── FunctionSource.java │ │ ├── OperationType.java │ │ ├── RateLimitEnum.java │ │ ├── UserType.java │ │ └── VerifyCodeType.java │ │ ├── exception │ │ ├── ApiException.java │ │ ├── DataPermissionException.java │ │ ├── LoginException.java │ │ └── ReSubmitException.java │ │ ├── interceptor │ │ ├── AuthInterceptor.java │ │ ├── TokenInterceptor.java │ │ ├── TraceInterceptor.java │ │ └── WorkspaceInterceptor.java │ │ ├── listener │ │ ├── EventPublisherListener.java │ │ ├── SystemLogMessageListener.java │ │ ├── body │ │ │ ├── GeneralRuleMessageBody.java │ │ │ └── VariableMessageBody.java │ │ └── event │ │ │ ├── GeneralRuleEvent.java │ │ │ ├── SystemLogEvent.java │ │ │ └── VariableEvent.java │ │ ├── service │ │ ├── ConditionGroupConditionService.java │ │ ├── ConditionGroupService.java │ │ ├── ConditionService.java │ │ ├── ConditionSetService.java │ │ ├── DataPermissionService.java │ │ ├── DataReferenceService.java │ │ ├── FunctionService.java │ │ ├── GeneralRuleService.java │ │ ├── ImportExportService.java │ │ ├── InputParameterService.java │ │ ├── OperationRecordService.java │ │ ├── RuleService.java │ │ ├── SymbolService.java │ │ ├── SystemLogService.java │ │ ├── UserService.java │ │ ├── ValueResolve.java │ │ ├── VariableService.java │ │ ├── WorkplaceService.java │ │ ├── WorkspaceMemberService.java │ │ ├── WorkspaceService.java │ │ └── impl │ │ │ ├── ConditionGroupConditionServiceImpl.java │ │ │ ├── ConditionGroupServiceImpl.java │ │ │ ├── ConditionServiceImpl.java │ │ │ ├── ConditionSetServiceImpl.java │ │ │ ├── DataPermissionServiceImpl.java │ │ │ ├── DataReferenceServiceImpl.java │ │ │ ├── FunctionServiceImpl.java │ │ │ ├── GeneralRuleServiceImpl.java │ │ │ ├── ImportExportServiceImpl.java │ │ │ ├── InputParameterServiceImpl.java │ │ │ ├── OperationRecordServiceImpl.java │ │ │ ├── RuleServiceImpl.java │ │ │ ├── SymbolServiceImpl.java │ │ │ ├── SystemLogServiceImpl.java │ │ │ ├── UserServiceImpl.java │ │ │ ├── ValueResolveImpl.java │ │ │ ├── VariableServiceImpl.java │ │ │ ├── WorkplaceServiceImpl.java │ │ │ ├── WorkspaceMemberServiceImpl.java │ │ │ └── WorkspaceServiceImpl.java │ │ ├── store │ │ ├── entity │ │ │ ├── RuleEngineCondition.java │ │ │ ├── RuleEngineConditionGroup.java │ │ │ ├── RuleEngineConditionGroupCondition.java │ │ │ ├── RuleEngineDataPermission.java │ │ │ ├── RuleEngineDataReference.java │ │ │ ├── RuleEngineFunction.java │ │ │ ├── RuleEngineFunctionParam.java │ │ │ ├── RuleEngineFunctionValue.java │ │ │ ├── RuleEngineGeneralRule.java │ │ │ ├── RuleEngineGeneralRulePublish.java │ │ │ ├── RuleEngineInputParameter.java │ │ │ ├── RuleEngineOperationRecord.java │ │ │ ├── RuleEngineRule.java │ │ │ ├── RuleEngineSystemLog.java │ │ │ ├── RuleEngineUser.java │ │ │ ├── RuleEngineUserWorkspace.java │ │ │ ├── RuleEngineVariable.java │ │ │ └── RuleEngineWorkspace.java │ │ ├── manager │ │ │ ├── RuleEngineConditionGroupConditionManager.java │ │ │ ├── RuleEngineConditionGroupManager.java │ │ │ ├── RuleEngineConditionManager.java │ │ │ ├── RuleEngineDataPermissionManager.java │ │ │ ├── RuleEngineDataReferenceManager.java │ │ │ ├── RuleEngineFunctionManager.java │ │ │ ├── RuleEngineFunctionParamManager.java │ │ │ ├── RuleEngineFunctionValueManager.java │ │ │ ├── RuleEngineGeneralRuleManager.java │ │ │ ├── RuleEngineGeneralRulePublishManager.java │ │ │ ├── RuleEngineInputParameterManager.java │ │ │ ├── RuleEngineOperationRecordManager.java │ │ │ ├── RuleEngineRuleManager.java │ │ │ ├── RuleEngineSystemLogManager.java │ │ │ ├── RuleEngineUserManager.java │ │ │ ├── RuleEngineUserWorkspaceManager.java │ │ │ ├── RuleEngineVariableManager.java │ │ │ ├── RuleEngineWorkspaceManager.java │ │ │ └── impl │ │ │ │ ├── RuleEngineConditionGroupConditionManagerImpl.java │ │ │ │ ├── RuleEngineConditionGroupManagerImpl.java │ │ │ │ ├── RuleEngineConditionManagerImpl.java │ │ │ │ ├── RuleEngineDataPermissionManagerImpl.java │ │ │ │ ├── RuleEngineDataReferenceManagerImpl.java │ │ │ │ ├── RuleEngineFunctionManagerImpl.java │ │ │ │ ├── RuleEngineFunctionParamManagerImpl.java │ │ │ │ ├── RuleEngineFunctionValueManagerImpl.java │ │ │ │ ├── RuleEngineGeneralRuleManagerImpl.java │ │ │ │ ├── RuleEngineGeneralRulePublishManagerImpl.java │ │ │ │ ├── RuleEngineInputParameterManagerImpl.java │ │ │ │ ├── RuleEngineOperationRecordManagerImpl.java │ │ │ │ ├── RuleEngineRuleManagerImpl.java │ │ │ │ ├── RuleEngineSystemLogManagerImpl.java │ │ │ │ ├── RuleEngineUserManagerImpl.java │ │ │ │ ├── RuleEngineUserWorkspaceManagerImpl.java │ │ │ │ ├── RuleEngineVariableManagerImpl.java │ │ │ │ └── RuleEngineWorkspaceManagerImpl.java │ │ └── mapper │ │ │ ├── RuleEngineConditionGroupConditionMapper.java │ │ │ ├── RuleEngineConditionGroupMapper.java │ │ │ ├── RuleEngineConditionMapper.java │ │ │ ├── RuleEngineDataPermissionMapper.java │ │ │ ├── RuleEngineDataReferenceMapper.java │ │ │ ├── RuleEngineFunctionMapper.java │ │ │ ├── RuleEngineFunctionParamMapper.java │ │ │ ├── RuleEngineFunctionValueMapper.java │ │ │ ├── RuleEngineGeneralRuleMapper.java │ │ │ ├── RuleEngineGeneralRulePublishMapper.java │ │ │ ├── RuleEngineInputParameterMapper.java │ │ │ ├── RuleEngineOperationRecordMapper.java │ │ │ ├── RuleEngineRuleMapper.java │ │ │ ├── RuleEngineSystemLogMapper.java │ │ │ ├── RuleEngineUserMapper.java │ │ │ ├── RuleEngineUserWorkspaceMapper.java │ │ │ ├── RuleEngineVariableMapper.java │ │ │ └── RuleEngineWorkspaceMapper.java │ │ ├── timer │ │ └── DemoTimer.java │ │ ├── util │ │ ├── AliOSSClient.java │ │ ├── EmailClient.java │ │ ├── FileTypeUtils.java │ │ ├── HttpServletUtils.java │ │ ├── IPUtils.java │ │ ├── JWTUtils.java │ │ ├── MD5Utils.java │ │ ├── OrikaBeanMapper.java │ │ ├── PageUtils.java │ │ ├── ResponseUtils.java │ │ └── SpelUtils.java │ │ └── vo │ │ ├── common │ │ ├── DownloadListResponse.java │ │ ├── GoBackRequest.java │ │ ├── HistoryListResponse.java │ │ ├── RearrangeRequest.java │ │ └── ViewRequest.java │ │ ├── condition │ │ ├── AddConditionRequest.java │ │ ├── ConditionBody.java │ │ ├── ConditionGroupCondition.java │ │ ├── ConditionGroupConfig.java │ │ ├── ConfigBean.java │ │ ├── ConfigValue.java │ │ ├── ExecuteConditionRequest.java │ │ ├── ListConditionRequest.java │ │ ├── ListConditionResponse.java │ │ ├── SwitchConditionOrderRequest.java │ │ ├── UpdateConditionRequest.java │ │ └── group │ │ │ ├── DeleteConditionGroupRequest.java │ │ │ ├── SaveOrUpdateConditionGroup.java │ │ │ └── condition │ │ │ ├── DeleteConditionAndBindGroupRefRequest.java │ │ │ ├── SaveConditionAndBindGroupRequest.java │ │ │ ├── SaveConditionAndBindGroupResponse.java │ │ │ └── SaveOrUpdateConditionGroupCondition.java │ │ ├── data │ │ └── file │ │ │ ├── ExportRequest.java │ │ │ └── ExportResponse.java │ │ ├── function │ │ ├── AddFunction.java │ │ ├── ExecuteFunctionRequest.java │ │ ├── FunctionParam.java │ │ ├── GetFunctionResponse.java │ │ ├── ListFunctionRequest.java │ │ ├── ListFunctionResponse.java │ │ └── UpdateFunction.java │ │ ├── operation │ │ └── record │ │ │ ├── OperationRecordBody.java │ │ │ ├── OperationRecordRequest.java │ │ │ └── OperationRecordResponse.java │ │ ├── parameter │ │ ├── AddInputParameterRequest.java │ │ ├── GetInputParameterResponse.java │ │ ├── ListInputParameterRequest.java │ │ ├── ListInputParameterResponse.java │ │ ├── UpdateInputParameterRequest.java │ │ └── VerifyInputParameterCodeRequest.java │ │ ├── permission │ │ └── data │ │ │ ├── ListDataPermissionRequest.java │ │ │ ├── ListDataPermissionResponse.java │ │ │ └── UpdateDataPermissionRequest.java │ │ ├── reference │ │ ├── ReferenceData.java │ │ └── ReferenceDataMap.java │ │ ├── rule │ │ ├── RuleBody.java │ │ ├── SaveRuleAndBindRuleSetRequest.java │ │ └── general │ │ │ ├── DefaultAction.java │ │ │ ├── DefaultActionSwitchRequest.java │ │ │ ├── GeneralRuleBody.java │ │ │ ├── GeneralRuleDefinition.java │ │ │ ├── GetGeneralRuleResponse.java │ │ │ ├── ListGeneralRuleRequest.java │ │ │ ├── ListGeneralRuleResponse.java │ │ │ ├── PublishListRequest.java │ │ │ ├── PublishListResponse.java │ │ │ ├── RunTestRequest.java │ │ │ ├── SaveActionRequest.java │ │ │ ├── SaveDefaultActionRequest.java │ │ │ └── ViewGeneralRuleResponse.java │ │ ├── symbol │ │ └── SymbolResponse.java │ │ ├── system │ │ └── log │ │ │ ├── GetLogResponse.java │ │ │ ├── ListLogRequest.java │ │ │ └── ListLogResponse.java │ │ ├── template │ │ ├── ExceptionMessage.java │ │ └── VerifyCode.java │ │ ├── user │ │ ├── AddUserRequest.java │ │ ├── DeleteUserRequest.java │ │ ├── ForgotRequest.java │ │ ├── GetVerifyCodeByEmailRequest.java │ │ ├── ListUserRequest.java │ │ ├── ListUserResponse.java │ │ ├── LoginRequest.java │ │ ├── RegisterRequest.java │ │ ├── SelectUserRequest.java │ │ ├── SelectUserResponse.java │ │ ├── UpdateUserInfoRequest.java │ │ ├── UserData.java │ │ ├── UserResponse.java │ │ ├── VerifyEmailRequest.java │ │ ├── VerifyNameRequest.java │ │ ├── VerifyUserEmailRequest.java │ │ └── VerifyUserNameRequest.java │ │ ├── variable │ │ ├── AddVariableRequest.java │ │ ├── GetVariableResponse.java │ │ ├── ListVariableRequest.java │ │ ├── ListVariableResponse.java │ │ ├── ParamValue.java │ │ ├── UpdateVariableRequest.java │ │ ├── VariableFunction.java │ │ └── VerifyVariableNameRequest.java │ │ ├── workplace │ │ ├── DynamicRequest.java │ │ ├── DynamicResponse.java │ │ ├── HeadInfoResponse.java │ │ ├── NumberOfCreationsRankingResponse.java │ │ └── ProjectInProgressResponse.java │ │ └── workspace │ │ ├── AccessKey.java │ │ ├── AddWorkspaceRequest.java │ │ ├── CurrentWorkspaceInfoResponse.java │ │ ├── EditWorkspaceRequest.java │ │ ├── ListWorkspaceRequest.java │ │ ├── ListWorkspaceResponse.java │ │ ├── SelectWorkspaceResponse.java │ │ ├── UpdateAccessKeyRequest.java │ │ ├── VerifyWorkspaceRequest.java │ │ ├── Workspace.java │ │ └── member │ │ ├── BindMemberRequest.java │ │ ├── DeleteMemberRequest.java │ │ ├── ListWorkspaceMemberRequest.java │ │ ├── OptionalPersonnelRequest.java │ │ ├── PermissionTransferRequest.java │ │ └── WorkspaceMember.java └── resources │ ├── application-dev.yml │ ├── application.yml │ ├── logback-spring.xml │ ├── mapper │ ├── RuleEngineConditionGroupConditionMapper.xml │ ├── RuleEngineConditionGroupMapper.xml │ ├── RuleEngineConditionMapper.xml │ ├── RuleEngineDataPermissionMapper.xml │ ├── RuleEngineDataReferenceMapper.xml │ ├── RuleEngineFunctionMapper.xml │ ├── RuleEngineFunctionParamMapper.xml │ ├── RuleEngineFunctionValueMapper.xml │ ├── RuleEngineGeneralRuleMapper.xml │ ├── RuleEngineGeneralRulePublishMapper.xml │ ├── RuleEngineInputParameterMapper.xml │ ├── RuleEngineOperationRecordMapper.xml │ ├── RuleEngineRuleMapper.xml │ ├── RuleEngineSystemLogMapper.xml │ ├── RuleEngineUserMapper.xml │ ├── RuleEngineUserWorkspaceMapper.xml │ ├── RuleEngineVariableMapper.xml │ └── RuleEngineWorkspaceMapper.xml │ ├── sql │ └── rule-engine-open.sql │ └── templates │ ├── ExceptionMessage.ftl │ └── VerifyCode.ftl └── test └── java └── cn └── ruleengine └── AppTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | */logs/* 2 | logs/* 3 | 4 | */target/ 5 | target 6 | .idea 7 | *.iml 8 | 9 | *.DS_Store 10 | 11 | */src/main/resources/application-test.yml 12 | */src/main/resources/application-local.yml 13 | */src/main/resources/test.json 14 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/config/MonitorController.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.config; 2 | 3 | import io.swagger.annotations.Api; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * 〈MonitorController〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/9/9 8:50 下午 13 | * @since 1.0.0 14 | */ 15 | @Api(tags = "监控控制器") 16 | @RestController 17 | @RequestMapping("monitor") 18 | public class MonitorController { 19 | 20 | 21 | @PostMapping("health") 22 | public boolean monitorHealth() { 23 | return true; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/config/rabbit/RabbitQueueConfig.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.config.rabbit; 2 | 3 | import org.springframework.amqp.core.Queue; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈队列〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/6/17 14 | * @since 1.0.0 15 | */ 16 | @ConditionalOnBean(RabbitConfig.class) 17 | @Component 18 | public class RabbitQueueConfig { 19 | 20 | /** 21 | * 用于日志的队列 22 | */ 23 | public final static String SYSTEM_LOG_QUEUE = "boot_engine_system_log_queue"; 24 | 25 | /** 26 | * 用于日志的队列 27 | * 28 | * @return Queue 29 | */ 30 | @Bean 31 | public Queue systemLogQueue() { 32 | return new Queue(SYSTEM_LOG_QUEUE, true); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/enums/DataStatus.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/8/26 12 | * @since 1.0.0 13 | */ 14 | @AllArgsConstructor 15 | public enum DataStatus { 16 | 17 | /** 18 | * 规则/决策表的各种状态 19 | */ 20 | DEV(0), TEST(1), PRD(2), 21 | /** 22 | * 历史的线上 23 | */ 24 | HISTORY(3); 25 | 26 | @Getter 27 | private final Integer status; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/ChineseCharacterToPinyinFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import cn.ruleengine.core.annotation.Executor; 5 | import cn.ruleengine.core.annotation.Function; 6 | import cn.ruleengine.core.annotation.Param; 7 | import lombok.extern.slf4j.Slf4j; 8 | 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2021/2/9 16 | * @since 1.0.0 17 | */ 18 | @Slf4j 19 | @Function 20 | public class ChineseCharacterToPinyinFunction { 21 | 22 | @Executor 23 | public String executor(@Param(value = "string", required = false) String string, 24 | @Param(value = "separator", required = false) String separator) { 25 | if (StrUtil.isBlank(string)) { 26 | return string; 27 | } 28 | // TODO: 2021/2/9 29 | return null; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/CollectionDeduplicationFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.hutool.core.collection.CollUtil; 4 | import cn.ruleengine.core.annotation.Executor; 5 | import cn.ruleengine.core.annotation.Function; 6 | import cn.ruleengine.core.annotation.Param; 7 | import lombok.extern.slf4j.Slf4j; 8 | 9 | import java.util.Collections; 10 | import java.util.List; 11 | import java.util.stream.Collectors; 12 | 13 | /** 14 | * 〈一句话功能简述〉
15 | * 〈〉 16 | * 集合去除重复数据 17 | * 18 | * @author 丁乾文 19 | * @date 2020/11/18 20 | * @since 1.0.0 21 | */ 22 | @Slf4j 23 | @Function 24 | public class CollectionDeduplicationFunction { 25 | 26 | @Executor 27 | public List executor(@Param(value = "list", required = false) List list) { 28 | if (CollUtil.isEmpty(list)) { 29 | return Collections.emptyList(); 30 | } 31 | return list.stream().distinct().collect(Collectors.toList()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/CurrentDateFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.hutool.core.lang.Validator; 4 | import cn.ruleengine.core.annotation.Executor; 5 | import cn.ruleengine.core.annotation.Function; 6 | import cn.ruleengine.core.annotation.Param; 7 | 8 | import java.time.Instant; 9 | import java.time.ZoneId; 10 | import java.time.ZonedDateTime; 11 | import java.util.Date; 12 | import java.util.Optional; 13 | 14 | /** 15 | * 〈一句话功能简述〉
16 | * 〈〉 17 | * 18 | * @author 丁乾文 19 | * @date 2020/11/19 20 | * @since 1.0.0 21 | */ 22 | @Function 23 | public class CurrentDateFunction { 24 | 25 | @Executor 26 | public Date executor(@Param(value = "timeZone", required = false) String timeZone) { 27 | ZoneId zoneId = Optional.ofNullable(timeZone).filter(Validator::isNotEmpty).map(ZoneId::of).orElseGet(ZoneId::systemDefault); 28 | ZonedDateTime zonedDateTime = ZonedDateTime.now(zoneId); 29 | Instant instant = zonedDateTime.toInstant(); 30 | return Date.from(instant); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/DateToTimestampFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import cn.ruleengine.core.annotation.Param; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2021/2/24 15 | * @since 1.0.0 16 | */ 17 | @Function 18 | public class DateToTimestampFunction { 19 | 20 | @Executor 21 | public Long executor(@Param(value = "date") Date date) { 22 | return date.getTime(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/Function.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | /** 4 | * 〈一句话功能简述〉
5 | * 〈〉 6 | * 7 | * @author 丁乾文 8 | * @date 2020/11/21 9 | * @since 1.0.0 10 | */ 11 | public class Function { 12 | 13 | /** 14 | * 增加字符串转拼音函数 15 | *

16 | * 优化点 17 | * 函数调用缓存调用链路待完成(待完成) 18 | *

19 | * 函数返回值可以不确定,创建变量时指定 uncertain 20 | */ 21 | public void init() { 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/GetTheDayOfTheWeekFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import cn.ruleengine.core.annotation.Executor; 5 | import cn.ruleengine.core.annotation.Function; 6 | 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2021/2/24 14 | * @since 1.0.0 15 | */ 16 | @Function(name = "获取今天星期几") 17 | public class GetTheDayOfTheWeekFunction { 18 | 19 | @Executor 20 | public String executor() { 21 | return DateUtil.thisDayOfWeekEnum().toChinese(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/GetUUIDFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | import java.util.UUID; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 返回一个随机UUID字符串。 13 | * 14 | * @author dingqianwen 15 | * @date 2021/2/9 16 | * @since 1.0.0 17 | */ 18 | @Function 19 | @Slf4j 20 | public class GetUUIDFunction { 21 | 22 | @Executor 23 | public String executor() { 24 | return UUID.randomUUID().toString(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/LetterToLowerCaseFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import cn.ruleengine.core.annotation.Param; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 字母转小写 11 | * 12 | * @author 丁乾文 13 | * @date 2020/12/24 14 | * @since 1.0.0 15 | */ 16 | @Function 17 | public class LetterToLowerCaseFunction { 18 | 19 | @Executor 20 | public String executor(@Param(value = "letter",required = false) String letter) { 21 | if (letter == null) { 22 | return null; 23 | } 24 | return letter.toLowerCase(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/LetterToUpperCaseFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import cn.ruleengine.core.annotation.Param; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 字母转大写 11 | * 12 | * @author 丁乾文 13 | * @date 2020/12/24 14 | * @since 1.0.0 15 | */ 16 | @Function 17 | public class LetterToUpperCaseFunction { 18 | 19 | @Executor 20 | public String executor(@Param(value = "letter",required = false) String letter) { 21 | if (letter == null) { 22 | return null; 23 | } 24 | return letter.toUpperCase(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/StringConcatFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import cn.ruleengine.core.annotation.Param; 6 | import lombok.extern.slf4j.Slf4j; 7 | 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | *

13 | * 字符串拼接 14 | * 15 | * @author dingqianwen 16 | * @date 2021/2/9 17 | * @since 1.0.0 18 | */ 19 | @Slf4j 20 | @Function 21 | public class StringConcatFunction { 22 | 23 | @Executor 24 | public String executor(@Param(value = "source") String source, 25 | @Param(value = "target", required = false) String target) { 26 | return source.concat(target); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/StringReplaceFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | import lombok.Data; 6 | import lombok.extern.slf4j.Slf4j; 7 | 8 | import javax.validation.Valid; 9 | import javax.validation.constraints.NotNull; 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 15 | * @author 丁乾文 16 | * @date 2020/11/18 17 | * @since 1.0.0 18 | */ 19 | @Slf4j 20 | @Function 21 | public class StringReplaceFunction { 22 | 23 | @Executor 24 | public String executor(@Valid Params params) { 25 | String value = params.getValue(); 26 | if (value == null) { 27 | return null; 28 | } 29 | String replacement = params.getReplacement(); 30 | return value.replace(params.getTarget(), replacement); 31 | } 32 | 33 | @Data 34 | public static class Params { 35 | 36 | private String value; 37 | 38 | @NotNull 39 | private String target; 40 | 41 | @NotNull 42 | private String replacement; 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/TimeOfDayFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function; 2 | 3 | import cn.ruleengine.core.annotation.Executor; 4 | import cn.ruleengine.core.annotation.Function; 5 | 6 | import java.text.SimpleDateFormat; 7 | import java.util.Date; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2021/2/24 15 | * @since 1.0.0 16 | */ 17 | @Function(name = "当前时间段") 18 | public class TimeOfDayFunction { 19 | 20 | @Executor 21 | public String executor() { 22 | Date date = new Date(); 23 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH"); 24 | int hour = Integer.parseInt(simpleDateFormat.format(date)); 25 | if (hour >= 0 && hour < 6) { 26 | return "凌晨"; 27 | } 28 | if (hour >= 6 && hour < 11) { 29 | return "上午"; 30 | } 31 | // 中午是11时至13时。太阳在子午线上方时为正午,一般是12时左右 32 | if (hour >= 11 && hour < 13) { 33 | return "中午"; 34 | } 35 | if (hour >= 13 && hour <= 18) { 36 | return "下午"; 37 | } 38 | return "晚上"; 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/json/ParseJsonStringFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.function.json; 2 | 3 | 4 | import cn.hutool.core.lang.Validator; 5 | import cn.ruleengine.core.annotation.Executor; 6 | import cn.ruleengine.core.annotation.Function; 7 | import cn.ruleengine.core.annotation.Param; 8 | import lombok.extern.slf4j.Slf4j; 9 | 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 获取JSON中指定的值返回STRING类型 15 | * 16 | * @author 丁乾文 17 | * @date 2020/12/13 18 | * @since 1.0.0 19 | */ 20 | @Slf4j 21 | @Function 22 | public class ParseJsonStringFunction implements JsonEval { 23 | 24 | @Executor 25 | public String executor(@Param(value = "jsonString", required = false) String jsonString, 26 | @Param(value = "jsonValuePath", required = false) String jsonValuePath) { 27 | Object value = this.eval(jsonString, jsonValuePath); 28 | // 返回null 而不是String.valueOf后的null字符 29 | if (Validator.isEmpty(value)) { 30 | return null; 31 | } 32 | return String.valueOf(value); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/listener/body/GeneralRuleMessageBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.listener.body; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/16 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class GeneralRuleMessageBody implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | private Type type; 21 | 22 | private String workspaceCode; 23 | 24 | private Integer workspaceId; 25 | 26 | private String ruleCode; 27 | 28 | public enum Type { 29 | /** 30 | * 规则加载,以及移除 31 | */ 32 | LOAD, UPDATE, REMOVE 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/listener/body/VariableMessageBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.listener.body; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/17 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class VariableMessageBody implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | private Type type; 21 | 22 | private Integer id; 23 | 24 | public enum Type { 25 | /** 26 | * 规则加载,以及移除 27 | */ 28 | LOAD, REMOVE, UPDATE 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/FunctionService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | import cn.ruleengine.compute.vo.ExecuteFunctionRequest; 4 | 5 | /** 6 | * 〈FunctionService〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/6/17 10:18 下午 10 | * @since 1.0.0 11 | */ 12 | public interface FunctionService { 13 | 14 | /** 15 | * 函数模拟测试 16 | * 17 | * @param executeTestRequest 函数入参值 18 | * @return result 19 | */ 20 | Object run(ExecuteFunctionRequest executeTestRequest); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/GeneralRulePublishService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | import cn.ruleengine.core.rule.GeneralRule; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/9/4 13 | * @since 1.0.0 14 | */ 15 | public interface GeneralRulePublishService { 16 | 17 | /** 18 | * 获取所有的线上规则 19 | * 20 | * @return rule 21 | */ 22 | List getAllPublishGeneralRule(); 23 | 24 | /** 25 | * 根据规则code,查询发布规则 26 | * 27 | * @param workspaceCode 工作空间code 28 | * @param ruleCode 规则code 29 | * @return 规则 30 | */ 31 | GeneralRule getPublishGeneralRule(String workspaceCode, String ruleCode); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/MonitorService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | /** 4 | * 〈MonitorService〉 5 | * 6 | * @author 丁乾文 7 | * @date 2021/9/9 8:49 下午 8 | * @since 1.0.0 9 | */ 10 | public interface MonitorService { 11 | } 12 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/RunTestService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | 4 | import cn.ruleengine.compute.vo.RunTestRequest; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/8/26 12 | * @since 1.0.0 13 | */ 14 | public interface RunTestService { 15 | 16 | /** 17 | * 模拟运行 18 | * 19 | * @param runTestRequest 参数信息 20 | * @return result 21 | */ 22 | Object run(RunTestRequest runTestRequest); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/VariableResolveService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | import cn.ruleengine.core.value.Value; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/17 13 | * @since 1.0.0 14 | */ 15 | public interface VariableResolveService { 16 | 17 | /** 18 | * 获取所有的变量/函数配置信息 19 | * 20 | * @return 变量 21 | */ 22 | Map getAllVariable(); 23 | 24 | /** 25 | * 根据变量获取变量/函数配置信息 26 | * 27 | * @param id 变量id 28 | * @return 变量 29 | */ 30 | Value getVarById(Integer id); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/WorkspaceService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.service; 2 | 3 | import cn.ruleengine.compute.vo.AccessKey; 4 | 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2020/11/21 12 | * @since 1.0.0 13 | */ 14 | public interface WorkspaceService { 15 | 16 | /** 17 | * 当前工作空间AccessKey 18 | * 19 | * @param code 工作空间code 20 | * @return accessKey 21 | */ 22 | AccessKey accessKey(String code); 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/entity/RuleEngineFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineFunction implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private String name; 30 | 31 | private String description; 32 | 33 | private String executor; 34 | 35 | private String returnValueType; 36 | 37 | @TableField(fill = FieldFill.INSERT) 38 | private Date createTime; 39 | 40 | @TableField(fill = FieldFill.INSERT_UPDATE) 41 | private Date updateTime; 42 | 43 | @TableLogic 44 | @TableField(fill = FieldFill.INSERT) 45 | private Integer deleted; 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/entity/RuleEngineFunctionParam.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineFunctionParam implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private Integer functionId; 30 | 31 | private String paramName; 32 | 33 | private String paramCode; 34 | 35 | private String valueType; 36 | 37 | @TableField(fill = FieldFill.INSERT) 38 | private Date createTime; 39 | 40 | @TableField(fill = FieldFill.INSERT_UPDATE) 41 | private Date updateTime; 42 | 43 | @TableLogic 44 | private Integer deleted; 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineFunctionManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineFunction; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineFunctionParamManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionParam; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionParamManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineFunctionValueManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionValue; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-16 14 | */ 15 | public interface RuleEngineFunctionValueManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineGeneralRulePublishManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineGeneralRulePublish; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-04 13 | */ 14 | public interface RuleEngineGeneralRulePublishManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineInputParameterManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineInputParameter; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineInputParameterManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineVariableManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineVariable; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineVariableManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/RuleEngineWorkspaceManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineWorkspace; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 工作空间 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-11-21 13 | */ 14 | public interface RuleEngineWorkspaceManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineFunctionManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | 5 | import cn.ruleengine.compute.store.entity.RuleEngineFunction; 6 | import cn.ruleengine.compute.store.manager.RuleEngineFunctionManager; 7 | import cn.ruleengine.compute.store.mapper.RuleEngineFunctionMapper; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | *

13 | * 服务实现类 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Service 20 | public class RuleEngineFunctionManagerImpl extends ServiceImpl implements RuleEngineFunctionManager { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineFunctionParamManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | 5 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionParam; 6 | import cn.ruleengine.compute.store.manager.RuleEngineFunctionParamManager; 7 | import cn.ruleengine.compute.store.mapper.RuleEngineFunctionParamMapper; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | *

13 | * 服务实现类 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Service 20 | public class RuleEngineFunctionParamManagerImpl extends ServiceImpl implements RuleEngineFunctionParamManager { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineFunctionValueManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | 5 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionValue; 6 | import cn.ruleengine.compute.store.manager.RuleEngineFunctionValueManager; 7 | import cn.ruleengine.compute.store.mapper.RuleEngineFunctionValueMapper; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | *

13 | * 服务实现类 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-16 18 | */ 19 | @Service 20 | public class RuleEngineFunctionValueManagerImpl extends ServiceImpl implements RuleEngineFunctionValueManager { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineGeneralRulePublishManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineGeneralRulePublish; 5 | import cn.ruleengine.compute.store.manager.RuleEngineGeneralRulePublishManager; 6 | import cn.ruleengine.compute.store.mapper.RuleEngineGeneralRulePublishMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-09-04 17 | */ 18 | @Service 19 | public class RuleEngineGeneralRulePublishManagerImpl extends ServiceImpl implements RuleEngineGeneralRulePublishManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineInputParameterManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | 5 | import cn.ruleengine.compute.store.entity.RuleEngineInputParameter; 6 | import cn.ruleengine.compute.store.manager.RuleEngineInputParameterManager; 7 | import cn.ruleengine.compute.store.mapper.RuleEngineInputParameterMapper; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | *

13 | * 服务实现类 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-14 18 | */ 19 | @Service 20 | public class RuleEngineInputParameterManagerImpl extends ServiceImpl implements RuleEngineInputParameterManager { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineVariableManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | 5 | import cn.ruleengine.compute.store.entity.RuleEngineVariable; 6 | import cn.ruleengine.compute.store.manager.RuleEngineVariableManager; 7 | import cn.ruleengine.compute.store.mapper.RuleEngineVariableMapper; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | *

13 | * 服务实现类 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-14 18 | */ 19 | @Service 20 | public class RuleEngineVariableManagerImpl extends ServiceImpl implements RuleEngineVariableManager { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/manager/impl/RuleEngineWorkspaceManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineWorkspace; 5 | import cn.ruleengine.compute.store.manager.RuleEngineWorkspaceManager; 6 | import cn.ruleengine.compute.store.mapper.RuleEngineWorkspaceMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 工作空间 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-11-21 17 | */ 18 | @Service 19 | public class RuleEngineWorkspaceManagerImpl extends ServiceImpl implements RuleEngineWorkspaceManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineFunctionMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineFunction; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-15 13 | */ 14 | public interface RuleEngineFunctionMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineFunctionParamMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionParam; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionParamMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineFunctionValueMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | 4 | import cn.ruleengine.compute.store.entity.RuleEngineFunctionValue; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-16 14 | */ 15 | public interface RuleEngineFunctionValueMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineGeneralRulePublishMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineGeneralRulePublish; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-04 13 | */ 14 | public interface RuleEngineGeneralRulePublishMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineInputParameterMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineInputParameter; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-14 13 | */ 14 | public interface RuleEngineInputParameterMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineVariableMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineVariable; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-14 13 | */ 14 | public interface RuleEngineVariableMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/mapper/RuleEngineWorkspaceMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.store.mapper; 2 | 3 | import cn.ruleengine.compute.store.entity.RuleEngineWorkspace; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | 7 | /** 8 | *

9 | * 工作空间 Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-11-21 14 | */ 15 | public interface RuleEngineWorkspaceMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/AccessKey.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2020/12/11 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class AccessKey { 16 | 17 | private Integer id; 18 | private String accessKeyId; 19 | private String accessKeySecret; 20 | 21 | /** 22 | * 对比AccessKey 23 | * 24 | * @param accessKeyId id 25 | * @param accessKeySecret Secret 26 | */ 27 | public boolean equals(String accessKeyId, String accessKeySecret) { 28 | if (accessKeyId == null || accessKeySecret == null) { 29 | return false; 30 | } 31 | if (!this.accessKeyId.equals(accessKeyId)) { 32 | return false; 33 | } 34 | return this.accessKeySecret.equals(accessKeySecret); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/BatchExecuteResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/8/22 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class BatchExecuteResponse { 16 | 17 | 18 | /** 19 | * 规则执行状态,是否执行成功,或者遇到了异常 20 | */ 21 | private Boolean isDone = true; 22 | /** 23 | * isDone=false规则执行错误消息 24 | */ 25 | private String message; 26 | 27 | /** 28 | * 标记规则使用,防止传入规则与规则输出结果顺序错误时 29 | * 通过此标记区分 30 | */ 31 | @Nullable 32 | private String symbol; 33 | 34 | /** 35 | * 规则执行结果 36 | */ 37 | private Object output; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/ExecuteFunctionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author 丁乾文 14 | * @date 2020/12/12 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class ExecuteFunctionRequest { 19 | 20 | @NotNull(message = "函数ID不能为空") 21 | private Integer id; 22 | 23 | /** 24 | * 运行入参 25 | */ 26 | private List paramValues = new ArrayList<>(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/ExecuteRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotEmpty; 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/7/16 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class ExecuteRequest { 19 | 20 | @NotEmpty(message = "工作空间编码不能为空") 21 | private String workspaceCode; 22 | 23 | @NotEmpty(message = "工作空间AccessKeyId不能为空") 24 | private String accessKeyId; 25 | 26 | @NotEmpty(message = "工作空间AccessKeySecret不能为空") 27 | private String accessKeySecret; 28 | 29 | @NotEmpty(message = "规则编码不能为空") 30 | private String code; 31 | 32 | private Map param = new HashMap<>(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/FunctionData.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 〈FunctionData〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/9 4:25 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class FunctionData { 16 | 17 | private Integer functionId; 18 | 19 | private String executor; 20 | 21 | private String returnValueType; 22 | 23 | private List values; 24 | 25 | @Data 26 | public static class Value { 27 | 28 | private String paramCode; 29 | 30 | private Integer type; 31 | 32 | private String valueType; 33 | 34 | private String value; 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/IsExistsRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020/12/13 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class IsExistsRequest { 17 | 18 | @NotBlank 19 | private String code; 20 | @NotBlank 21 | private String workspaceCode; 22 | @NotBlank 23 | private String accessKeyId; 24 | @NotBlank 25 | private String accessKeySecret; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/ParamValue.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/8/30 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ParamValue { 18 | 19 | private String name; 20 | 21 | @NotBlank 22 | private String code; 23 | 24 | /** 25 | * 规则参数/变量/固定值 26 | */ 27 | @NotNull 28 | private Integer type; 29 | 30 | @NotNull 31 | private String value; 32 | 33 | /** 34 | * STRING,BOOLEAN... 35 | */ 36 | @NotBlank 37 | private String valueType; 38 | 39 | private String valueName; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/RunTestRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.compute.vo; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 15 | * @author dingqianwen 16 | * @date 2020/7/16 17 | * @since 1.0.0 18 | */ 19 | @Data 20 | public class RunTestRequest { 21 | 22 | /** 23 | * 规则id 24 | */ 25 | @NotNull 26 | private Integer id; 27 | 28 | @NotBlank 29 | private String version; 30 | 31 | @NotEmpty 32 | private String workspaceCode; 33 | 34 | @NotEmpty 35 | private String code; 36 | 37 | private Map param = new HashMap<>(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: 3 | active: dev 4 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineFunctionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineFunctionParamMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineFunctionValueMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineGeneralRulePublishMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineInputParameterMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/main/resources/mapper/RuleEngineVariableMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-compute/src/test/java/cn/ruleengine/AppTest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine; 2 | 3 | import static org.junit.Assert.assertTrue; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | { 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() 17 | { 18 | assertTrue( true ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/Output.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com) 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.ruleengine.core; 17 | 18 | 19 | 20 | /** 21 | * 〈一句话功能简述〉
22 | * 〈〉 23 | * 24 | * @author dingqianwen 25 | * @date 2020/8/10 26 | * @since 1.0.0 27 | */ 28 | public interface Output { 29 | 30 | /** 31 | * 输出的参数值 32 | * 33 | * @return 输出值 34 | */ 35 | Object getValue(); 36 | 37 | /** 38 | * 规则输出值的classType 39 | * 40 | * @return 数据类型 41 | */ 42 | Class getClassType(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/Parameter.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author 丁乾文 10 | * @date 2020/12/28 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class Parameter { 15 | 16 | /** 17 | * 规则参数名称 18 | */ 19 | private String name; 20 | 21 | /** 22 | * 规则参数code 23 | */ 24 | private String code; 25 | 26 | /** 27 | * 规则参数类型 28 | */ 29 | private String valueType; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/condition/ConditionCompare.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.condition; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2020/12/13 12 | * @since 1.0.0 13 | */ 14 | public interface ConditionCompare { 15 | 16 | /** 17 | * 条件比较 18 | * 19 | * @param input 入参 20 | * @param configuration 引擎配置信息 21 | * @return 比较结果 22 | */ 23 | boolean compare(Input input, RuleEngineConfiguration configuration); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/event/Endurance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com) 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.ruleengine.core.event; 17 | 18 | /** 19 | * 〈一句话功能简述〉
20 | * 〈〉 21 | * 22 | * @author 丁乾文 23 | * @date 2020/12/12 24 | * @since 1.0.0 25 | */ 26 | public interface Endurance { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/exception/FormulaException.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.exception; 2 | 3 | import cn.hutool.core.text.StrFormatter; 4 | 5 | /** 6 | * 〈FormulaException〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/7/19 1:27 下午 10 | * @since 1.0.0 11 | */ 12 | public class FormulaException extends ValueException { 13 | 14 | private static final long serialVersionUID = -8751437968246403242L; 15 | 16 | public FormulaException(String message) { 17 | super(message); 18 | } 19 | 20 | public FormulaException(String message, Object... args) { 21 | super(StrFormatter.format(message, args)); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/listener/DefaultExecuteListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com) 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.ruleengine.core.listener; 17 | 18 | import cn.ruleengine.core.DataSupport; 19 | 20 | /** 21 | * 〈一句话功能简述〉
22 | * 〈〉 23 | * 24 | * @author dingqianwen 25 | * @date 2020/8/16 26 | * @since 1.0.0 27 | */ 28 | public class DefaultExecuteListener implements ExecuteListener { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/ScoreCardStrategyType.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard; 2 | 3 | import lombok.AllArgsConstructor; 4 | 5 | /** 6 | * 〈ScoreCardStrategyType〉 7 | * 8 | * @author 丁乾文 9 | * @date 2019/8/13 10 | * @since 1.0.0 11 | */ 12 | @AllArgsConstructor 13 | public enum ScoreCardStrategyType { 14 | 15 | /** 16 | * 求和 17 | *

18 | * 默认 19 | */ 20 | SUM, 21 | /** 22 | * 平均分值 23 | */ 24 | AVG, 25 | /** 26 | * 所有卡片中最大的那个分值 27 | */ 28 | MIN, 29 | /** 30 | * 所有卡片中最小的那个分值 31 | */ 32 | MAX; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/AvgStrategy.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | import cn.ruleengine.core.scorecard.Card; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈AvgStrategy〉 12 | * 13 | * @author 丁乾文 14 | * @date 2019/8/13 15 | * @since 1.0.0 16 | */ 17 | public class AvgStrategy implements ScoreCardStrategy { 18 | 19 | private static final AvgStrategy INSTANCE = new AvgStrategy(); 20 | 21 | public static AvgStrategy getInstance() { 22 | return INSTANCE; 23 | } 24 | 25 | @Override 26 | public BigDecimal compute(List cards, Input input, RuleEngineConfiguration configuration) { 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/MaxStrategy.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | import cn.ruleengine.core.scorecard.Card; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈MaxStrategy〉 12 | * 13 | * @author 丁乾文 14 | * @date 2019/8/13 15 | * @since 1.0.0 16 | */ 17 | public class MaxStrategy implements ScoreCardStrategy{ 18 | 19 | private static final MaxStrategy INSTANCE = new MaxStrategy(); 20 | 21 | public static MaxStrategy getInstance() { 22 | return INSTANCE; 23 | } 24 | 25 | @Override 26 | public BigDecimal compute(List cards, Input input, RuleEngineConfiguration configuration) { 27 | return null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/MinStrategy.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | import cn.ruleengine.core.scorecard.Card; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈MinStrategy〉 12 | * 13 | * @author 丁乾文 14 | * @date 2019/8/13 15 | * @since 1.0.0 16 | */ 17 | public class MinStrategy implements ScoreCardStrategy { 18 | 19 | private static final MinStrategy INSTANCE = new MinStrategy(); 20 | 21 | public static MinStrategy getInstance() { 22 | return INSTANCE; 23 | } 24 | 25 | @Override 26 | public BigDecimal compute(List cards, Input input, RuleEngineConfiguration configuration) { 27 | return null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/ScoreCardStrategy.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | import cn.ruleengine.core.scorecard.Card; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈ScoreCardStrategy〉 12 | * 13 | * @author 丁乾文 14 | * @date 2019/8/13 15 | * @since 1.0.0 16 | */ 17 | public interface ScoreCardStrategy { 18 | 19 | BigDecimal compute(List cards, Input input, RuleEngineConfiguration configuration); 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/ScoreCardStrategyFactory.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.scorecard.ScoreCardStrategyType; 4 | 5 | /** 6 | * 〈ScoreCardStrategyFactroy〉 7 | * 8 | * @author 丁乾文 9 | * @date 2019/8/13 10 | * @since 1.0.0 11 | */ 12 | public class ScoreCardStrategyFactory { 13 | 14 | public static ScoreCardStrategy getInstance(ScoreCardStrategyType scoreCardStrategyType) { 15 | switch (scoreCardStrategyType) { 16 | case SUM: 17 | return SumStrategy.getInstance(); 18 | case AVG: 19 | return AvgStrategy.getInstance(); 20 | case MIN: 21 | return MinStrategy.getInstance(); 22 | case MAX: 23 | return MaxStrategy.getInstance(); 24 | default: 25 | throw new IllegalStateException("Unexpected value: " + scoreCardStrategyType); 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/SumStrategy.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.scorecard.strategy; 2 | 3 | import cn.ruleengine.core.Input; 4 | import cn.ruleengine.core.RuleEngineConfiguration; 5 | import cn.ruleengine.core.scorecard.Card; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈SumStrategy〉 12 | * 13 | * @author 丁乾文 14 | * @date 2019/8/13 15 | * @since 1.0.0 16 | */ 17 | public class SumStrategy implements ScoreCardStrategy { 18 | 19 | private static final SumStrategy INSTANCE = new SumStrategy(); 20 | 21 | public static SumStrategy getInstance() { 22 | return INSTANCE; 23 | } 24 | 25 | @Override 26 | public BigDecimal compute(List cards, Input input, RuleEngineConfiguration configuration) { 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-core/src/main/java/cn/ruleengine/core/value/Assignment.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.core.value; 2 | 3 | 4 | /** 5 | * 〈Assignment〉 6 | *

7 | * 赋值操作,结果中使用 8 | *

9 | * action = 10 10 | * 11 | * @author 丁乾文 12 | * @date 2021/7/22 10:07 上午 13 | * @since 1.0.0 14 | */ 15 | public class Assignment { 16 | 17 | Assignment() { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/annotation/NoLogin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com) 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package cn.ruleengine.web.annotation; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 〈一句话功能简述〉
25 | * 〈〉 26 | * 27 | * @author 丁乾文 28 | * @date 2021/6/17 29 | * @since 1.0.0 30 | */ 31 | @Target(ElementType.METHOD) 32 | @Retention(RetentionPolicy.RUNTIME) 33 | public @interface NoLogin { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.config; 2 | 3 | import com.baomidou.mybatisplus.annotation.DbType; 4 | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; 5 | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * 〈MybatisPlusConfig〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/6/23 8:13 下午 14 | * @since 1.0.0 15 | */ 16 | @Component 17 | public class MybatisPlusConfig { 18 | 19 | @Bean 20 | public MybatisPlusInterceptor mybatisPlusInterceptor() { 21 | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); 22 | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); 23 | return interceptor; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/config/rabbit/RabbitQueueConfig.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.config.rabbit; 2 | 3 | import org.springframework.amqp.core.Queue; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈队列〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/6/17 14 | * @since 1.0.0 15 | */ 16 | @ConditionalOnBean(RabbitConfig.class) 17 | @Component 18 | public class RabbitQueueConfig { 19 | 20 | /** 21 | * 用于日志的队列 22 | */ 23 | public final static String SYSTEM_LOG_QUEUE = "boot_engine_system_log_queue"; 24 | 25 | /** 26 | * 用于日志的队列 27 | * 28 | * @return Queue 29 | */ 30 | @Bean 31 | public Queue systemLogQueue() { 32 | return new Queue(SYSTEM_LOG_QUEUE, true); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/DataStatus.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/8/26 12 | * @since 1.0.0 13 | */ 14 | @AllArgsConstructor 15 | public enum DataStatus { 16 | 17 | /** 18 | * 规则/决策表的各种状态 19 | */ 20 | DEV(0), TEST(1), PRD(2), 21 | /** 22 | * 历史的线上 23 | */ 24 | HISTORY(3); 25 | 26 | @Getter 27 | private final Integer status; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/DeletedEnum.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/7/14 11 | * @since 1.0.0 12 | */ 13 | public enum DeletedEnum { 14 | 15 | /** 16 | * ENABLE:未被删除 17 | */ 18 | ENABLE(0), DISABLE(1); 19 | 20 | @Getter 21 | private final Integer status; 22 | 23 | DeletedEnum(Integer status) { 24 | this.status = status; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/EnableEnum.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/7/14 11 | * @since 1.0.0 12 | */ 13 | public enum EnableEnum { 14 | 15 | /** 16 | * ENABLE 17 | */ 18 | ENABLE(0), DISABLE(1); 19 | 20 | @Getter 21 | private final Integer status; 22 | 23 | EnableEnum(Integer status) { 24 | this.status = status; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/FtlTemplatesEnum.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/17 12 | * @since 1.0.0 13 | */ 14 | @AllArgsConstructor 15 | public enum FtlTemplatesEnum { 16 | /** 17 | * 发送验证码的html模板 18 | */ 19 | EMAIL("VerifyCode.ftl", "验证码"), 20 | /** 21 | * 发送异常警告的html模板 22 | */ 23 | EXCEPTION("ExceptionMessage.ftl", "异常警告"); 24 | 25 | @Getter 26 | String value; 27 | @Getter 28 | String msg; 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/FunctionSource.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/9/11 12 | * @since 1.0.0 13 | */ 14 | @AllArgsConstructor 15 | public enum FunctionSource { 16 | /** 17 | * 18 | */ 19 | SYSTEM(0), JAVA_CODE(1); 20 | 21 | @Getter 22 | private final Integer value; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/OperationType.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | /** 4 | * 〈OperationType〉 5 | * 6 | * @author 丁乾文 7 | * @date 2021/6/24 11:00 上午 8 | * @since 1.0.0 9 | */ 10 | public enum OperationType { 11 | /** 12 | * 权限操作类型 13 | */ 14 | ADD, DELETE, UPDATE, SELECT, 15 | /** 16 | * 校验发布权限 17 | */ 18 | PUBLISH, 19 | /** 20 | * 修改数据权权限 21 | */ 22 | DATE_DATA_PERMISSION 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/RateLimitEnum.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | /** 4 | * 〈一句话功能简述〉
5 | * 〈〉 6 | * 7 | * @author 丁乾文 8 | * @date 2021/6/17 9 | * @since 1.0.0 10 | */ 11 | public enum RateLimitEnum { 12 | 13 | /** 14 | * 根据请求ip限流 15 | */ 16 | IP, 17 | /** 18 | * 根据请求url限流 19 | */ 20 | URL, 21 | /** 22 | * 根据用户限流,前提需要用户已经登录的情况下 23 | */ 24 | USER, 25 | /** 26 | * 解决的问题是,如果用户访问url1导致根据ip地址限流了,但是访问url2也会无法访问 27 | */ 28 | URL_IP 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/UserType.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈UserType〉 8 | * 9 | * @author 丁乾文 10 | * @date 2021/6/22 6:28 下午 11 | * @since 1.0.0 12 | */ 13 | @AllArgsConstructor 14 | public enum UserType { 15 | /** 16 | * 超级管理 17 | */ 18 | SUPER_ADMINISTRATOR(0), 19 | /** 20 | * 工作空间管理 21 | */ 22 | WORKSPACE_ADMINISTRATOR(1), 23 | /** 24 | * 普通用户 25 | */ 26 | GENERAL_USER(2); 27 | 28 | @Getter 29 | private final Integer type; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/VerifyCodeType.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.enums; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/9/24 12 | * @since 1.0.0 13 | */ 14 | @AllArgsConstructor 15 | public enum VerifyCodeType { 16 | /** 17 | * 忘记密码/注册 获取验证码 18 | */ 19 | FORGOT(0), REGISTER(1); 20 | 21 | @Getter 22 | private final Integer value; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/DataPermissionException.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.exception; 2 | 3 | /** 4 | * 〈一句话功能简述〉
5 | * 〈〉 6 | * 7 | * @author dingqianwen 8 | * @date 2020/8/31 9 | * @since 1.0.0 10 | */ 11 | public class DataPermissionException extends RuntimeException { 12 | 13 | private static final long serialVersionUID = -494678828864504957L; 14 | 15 | public DataPermissionException() { 16 | super(); 17 | } 18 | 19 | public DataPermissionException(String message) { 20 | super(message); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/LoginException.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.exception; 2 | 3 | /** 4 | * 〈一句话功能简述〉
5 | * 〈〉 6 | * 7 | * @author 丁乾文 8 | * @date 2020/1/10 9 | * @since 1.0.0 10 | */ 11 | public class LoginException extends RuntimeException { 12 | 13 | private static final long serialVersionUID = 6405345374923437770L; 14 | 15 | public LoginException(String message) { 16 | super(message); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/ReSubmitException.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.exception; 2 | 3 | import cn.ruleengine.web.enums.ErrorCodeEnum; 4 | import lombok.Getter; 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2020/1/10 12 | * @since 1.0.0 13 | */ 14 | public class ReSubmitException extends RuntimeException { 15 | 16 | private static final long serialVersionUID = 6405345374923437770L; 17 | 18 | @Getter 19 | private final int code; 20 | 21 | public ReSubmitException() { 22 | super(ErrorCodeEnum.RULE10011038.getMsg()); 23 | this.code = ErrorCodeEnum.RULE10011038.getCode(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/body/GeneralRuleMessageBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.listener.body; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/16 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class GeneralRuleMessageBody implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | private GeneralRuleMessageBody.Type type; 21 | 22 | private String workspaceCode; 23 | 24 | private Integer workspaceId; 25 | 26 | private String ruleCode; 27 | 28 | public enum Type { 29 | /** 30 | * 规则加载,以及移除 31 | */ 32 | LOAD, UPDATE, REMOVE 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/body/VariableMessageBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.listener.body; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/17 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class VariableMessageBody implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | private VariableMessageBody.Type type; 21 | 22 | private Integer id; 23 | 24 | public enum Type { 25 | /** 26 | * 规则加载,以及移除 27 | */ 28 | LOAD, REMOVE, UPDATE 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/GeneralRuleEvent.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.listener.event; 2 | 3 | import cn.ruleengine.web.listener.body.GeneralRuleMessageBody; 4 | import lombok.Getter; 5 | import org.springframework.context.ApplicationEvent; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020-12-23 17:55 13 | * @since 1.0.0 14 | */ 15 | public class GeneralRuleEvent extends ApplicationEvent { 16 | 17 | private static final long serialVersionUID = 1628296277627810450L; 18 | 19 | @Getter 20 | private final GeneralRuleMessageBody ruleMessageBody; 21 | 22 | public GeneralRuleEvent(GeneralRuleMessageBody ruleMessageBody) { 23 | super(ruleMessageBody); 24 | this.ruleMessageBody = ruleMessageBody; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/SystemLogEvent.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.listener.event; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineSystemLog; 4 | import lombok.Getter; 5 | import org.springframework.context.ApplicationEvent; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020-12-23 17:55 13 | * @since 1.0.0 14 | */ 15 | public class SystemLogEvent extends ApplicationEvent { 16 | 17 | private static final long serialVersionUID = 1628296277627810450L; 18 | 19 | @Getter 20 | private final RuleEngineSystemLog ruleEngineSystemLog; 21 | 22 | public SystemLogEvent(RuleEngineSystemLog log) { 23 | super(log); 24 | this.ruleEngineSystemLog = log; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/VariableEvent.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.listener.event; 2 | 3 | import cn.ruleengine.web.listener.body.VariableMessageBody; 4 | import lombok.Getter; 5 | import org.springframework.context.ApplicationEvent; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020-12-23 18:07 13 | * @since 1.0.0 14 | */ 15 | public class VariableEvent extends ApplicationEvent { 16 | 17 | private static final long serialVersionUID = 7277630131038817515L; 18 | 19 | @Getter 20 | private final VariableMessageBody variableMessageBody; 21 | 22 | public VariableEvent(VariableMessageBody variableMessageBody) { 23 | super(variableMessageBody); 24 | this.variableMessageBody = variableMessageBody; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/ConditionSetService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | 4 | import cn.ruleengine.core.condition.ConditionSet; 5 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig; 6 | 7 | import java.util.List; 8 | 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author 丁乾文 15 | * @date 2021/1/17 16 | * @since 1.0.0 17 | */ 18 | public interface ConditionSetService { 19 | 20 | 21 | /** 22 | * 获取规则配置条件集,懒得写的,待优化 23 | * 24 | * @param conditionGroup 条件组配置 25 | * @return 条件集 26 | */ 27 | ConditionSet loadConditionSet(List conditionGroup); 28 | 29 | /** 30 | * 获取规则配置条件集,懒得写的,待优化 31 | * 32 | * @param ruleId 规则id 33 | * @return 条件集 34 | */ 35 | ConditionSet loadConditionSet(Integer ruleId); 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/FunctionService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.common.vo.PageRequest; 4 | import cn.ruleengine.common.vo.PageResult; 5 | import cn.ruleengine.web.vo.function.GetFunctionResponse; 6 | import cn.ruleengine.web.vo.function.ListFunctionRequest; 7 | import cn.ruleengine.web.vo.function.ListFunctionResponse; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/27 15 | * @since 1.0.0 16 | */ 17 | public interface FunctionService { 18 | 19 | /** 20 | * 函数列表 21 | * 22 | * @param pageRequest param 23 | * @return list 24 | */ 25 | PageResult list(PageRequest pageRequest); 26 | 27 | /** 28 | * 查询函数详情 29 | * 30 | * @param id 函数id 31 | * @return 函数信息 32 | */ 33 | GetFunctionResponse get(Integer id); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/ImportExportService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.web.vo.data.file.ExportRequest; 4 | import cn.ruleengine.web.vo.data.file.ExportResponse; 5 | 6 | /** 7 | * 〈ImportExportService〉 8 | * 9 | * @author 丁乾文 10 | * @date 2021/7/13 5:40 下午 11 | * @since 1.0.0 12 | */ 13 | public interface ImportExportService { 14 | 15 | /** 16 | * 导出文件 可执行json文件 17 | *

18 | * *.r 为规则文件 19 | * *.dt 为决策表文件 20 | * *.rs 为规则集文件 21 | * 22 | * @param exportRequest e 23 | * @return e 24 | */ 25 | ExportResponse exportFile(ExportRequest exportRequest); 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/OperationRecordService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.common.vo.PageRequest; 4 | import cn.ruleengine.common.vo.PageResult; 5 | import cn.ruleengine.web.vo.operation.record.OperationRecordRequest; 6 | import cn.ruleengine.web.vo.operation.record.OperationRecordResponse; 7 | 8 | /** 9 | * 〈OperationRecordService〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/9/9 3:57 下午 13 | * @since 1.0.0 14 | */ 15 | public interface OperationRecordService { 16 | 17 | /** 18 | * 保存操作记录 19 | * 20 | * @param description 描述 21 | * @param dataId id 22 | * @param dataType type 23 | */ 24 | void save(String description, Integer dataId, Integer dataType); 25 | 26 | /** 27 | * 操作记录 28 | * 29 | * @param recordRequestPageRequest r 30 | * @return r 31 | */ 32 | PageResult operationRecord(PageRequest recordRequestPageRequest); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/RuleService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.web.vo.rule.general.SaveActionRequest; 4 | import cn.ruleengine.web.vo.rule.RuleBody; 5 | 6 | 7 | /** 8 | * 〈RuleService〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/28 1:08 下午 12 | * @since 1.0.0 13 | */ 14 | public interface RuleService { 15 | 16 | 17 | /** 18 | * 保存结果 19 | * 20 | * @param saveActionRequest 保存结果 21 | * @return 保存结果 22 | */ 23 | Boolean saveAction(SaveActionRequest saveActionRequest); 24 | 25 | /** 26 | * 保存规则并返回规则id 27 | * 28 | * @param ruleBody 规则体 29 | * @return 规则id 30 | */ 31 | Integer saveOrUpdateRule(RuleBody ruleBody); 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/SymbolService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | 4 | import cn.ruleengine.web.vo.symbol.SymbolResponse; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | public interface SymbolService { 17 | 18 | /** 19 | * 规则引擎运算符 20 | * 21 | * @param value 例如:CONTROLLER 22 | * @return >,<,=.. 23 | */ 24 | List getByType(String value); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/SystemLogService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.common.vo.PageRequest; 4 | import cn.ruleengine.common.vo.PageResult; 5 | import cn.ruleengine.web.vo.system.log.GetLogResponse; 6 | import cn.ruleengine.web.vo.system.log.ListLogRequest; 7 | import cn.ruleengine.web.vo.system.log.ListLogResponse; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2021/3/2 15 | * @since 1.0.0 16 | */ 17 | public interface SystemLogService { 18 | 19 | /** 20 | * 查询日志列表 21 | * 22 | * @param pageRequest 分页参数 23 | * @return list 24 | */ 25 | PageResult list(PageRequest pageRequest); 26 | 27 | /** 28 | * 根据id删除日志,只能由管理删除 29 | * 30 | * @param id 日志id 31 | * @return true 32 | */ 33 | Boolean delete(Integer id); 34 | 35 | /** 36 | * 根据id查询日志详情 37 | * 38 | * @param id 日志id 39 | * @return info 40 | */ 41 | GetLogResponse get(Integer id); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/service/WorkplaceService.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.service; 2 | 3 | import cn.ruleengine.web.vo.workplace.HeadInfoResponse; 4 | 5 | /** 6 | * 〈WorkplaceService〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 1:14 下午 10 | * @since 1.0.0 11 | */ 12 | public interface WorkplaceService { 13 | 14 | 15 | /** 16 | * HeadInfo 17 | * 18 | * @return r 19 | */ 20 | HeadInfoResponse headInfo(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/entity/RuleEngineConditionGroup.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineConditionGroup implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private String name; 30 | 31 | private Integer ruleId; 32 | 33 | private Integer orderNo; 34 | 35 | @TableField(fill = FieldFill.INSERT) 36 | private Date createTime; 37 | 38 | @TableField(fill = FieldFill.INSERT_UPDATE) 39 | private Date updateTime; 40 | 41 | @TableLogic 42 | @TableField(fill = FieldFill.INSERT) 43 | private Integer deleted; 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/entity/RuleEngineConditionGroupCondition.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-16 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineConditionGroupCondition implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private Integer conditionId; 30 | 31 | private Integer conditionGroupId; 32 | 33 | private Integer orderNo; 34 | 35 | @TableField(fill = FieldFill.INSERT) 36 | private Date createTime; 37 | 38 | @TableField(fill = FieldFill.INSERT_UPDATE) 39 | private Date updateTime; 40 | 41 | @TableLogic 42 | @TableField(fill = FieldFill.INSERT) 43 | private Integer deleted; 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/entity/RuleEngineFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineFunction implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private String name; 30 | 31 | private String description; 32 | 33 | private String executor; 34 | 35 | private String returnValueType; 36 | 37 | @TableField(fill = FieldFill.INSERT) 38 | private Date createTime; 39 | 40 | @TableField(fill = FieldFill.INSERT_UPDATE) 41 | private Date updateTime; 42 | 43 | @TableLogic 44 | @TableField(fill = FieldFill.INSERT) 45 | private Integer deleted; 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/entity/RuleEngineFunctionParam.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author dqw 17 | * @since 2020-07-15 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class RuleEngineFunctionParam implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.AUTO) 27 | private Integer id; 28 | 29 | private Integer functionId; 30 | 31 | private String paramName; 32 | 33 | private String paramCode; 34 | 35 | private String valueType; 36 | 37 | @TableField(fill = FieldFill.INSERT) 38 | private Date createTime; 39 | 40 | @TableField(fill = FieldFill.INSERT_UPDATE) 41 | private Date updateTime; 42 | 43 | @TableLogic 44 | private Integer deleted; 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/entity/RuleEngineOperationRecord.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.experimental.Accessors; 8 | 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | 12 | /** 13 | *

14 | * 15 | *

16 | * 17 | * @author dqw 18 | * @since 2021-09-09 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Accessors(chain = true) 23 | public class RuleEngineOperationRecord implements Serializable { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | @TableId(value = "id", type = IdType.AUTO) 28 | private Integer id; 29 | 30 | private Integer userId; 31 | 32 | private String username; 33 | 34 | private Integer workspaceId; 35 | 36 | private String workspaceCode; 37 | 38 | private String description; 39 | 40 | private Integer dataType; 41 | 42 | private Integer dataId; 43 | 44 | private Date operationTime; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineConditionGroupConditionManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineConditionGroupCondition; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-16 14 | */ 15 | public interface RuleEngineConditionGroupConditionManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineConditionGroupManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineConditionGroup; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineConditionGroupManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineConditionManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineCondition; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineConditionManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineDataPermissionManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataPermission; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 用户数据权限表 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2021-06-24 13 | */ 14 | public interface RuleEngineDataPermissionManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineDataReferenceManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataReference; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2021-07-27 13 | */ 14 | public interface RuleEngineDataReferenceManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineFunctionManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunction; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineFunctionParamManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionParam; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionParamManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineFunctionValueManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionValue; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-16 14 | */ 15 | public interface RuleEngineFunctionValueManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineGeneralRuleManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRule; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-12-29 13 | */ 14 | public interface RuleEngineGeneralRuleManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineGeneralRulePublishManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRulePublish; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-04 13 | */ 14 | public interface RuleEngineGeneralRulePublishManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineInputParameterManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineInputParameter; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineInputParameterManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineOperationRecordManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineOperationRecord; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2021-09-09 13 | */ 14 | public interface RuleEngineOperationRecordManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineRuleManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineRule; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-12-29 13 | */ 14 | public interface RuleEngineRuleManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineSystemLogManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineSystemLog; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-29 14 | */ 15 | public interface RuleEngineSystemLogManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineUserManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineUser; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 规则引擎用户表 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-24 13 | */ 14 | public interface RuleEngineUserManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineUserWorkspaceManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineUserWorkspace; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 用户工作空间 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2021-06-22 13 | */ 14 | public interface RuleEngineUserWorkspaceManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineVariableManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineVariable; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | /** 8 | *

9 | * 服务类 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineVariableManager extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/RuleEngineWorkspaceManager.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineWorkspace; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 工作空间 服务类 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-11-21 13 | */ 14 | public interface RuleEngineWorkspaceManager extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineConditionGroupConditionManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineConditionGroupCondition; 5 | import cn.ruleengine.web.store.manager.RuleEngineConditionGroupConditionManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineConditionGroupConditionMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-16 17 | */ 18 | @Service 19 | public class RuleEngineConditionGroupConditionManagerImpl extends ServiceImpl implements RuleEngineConditionGroupConditionManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineConditionGroupManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineConditionGroup; 5 | import cn.ruleengine.web.store.manager.RuleEngineConditionGroupManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineConditionGroupMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-15 17 | */ 18 | @Service 19 | public class RuleEngineConditionGroupManagerImpl extends ServiceImpl implements RuleEngineConditionGroupManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineConditionManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineCondition; 5 | import cn.ruleengine.web.store.manager.RuleEngineConditionManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineConditionMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-14 17 | */ 18 | @Service 19 | public class RuleEngineConditionManagerImpl extends ServiceImpl implements RuleEngineConditionManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineDataPermissionManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataPermission; 4 | import cn.ruleengine.web.store.manager.RuleEngineDataPermissionManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineDataPermissionMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 用户数据权限表 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2021-06-24 16 | */ 17 | @Service 18 | public class RuleEngineDataPermissionManagerImpl extends ServiceImpl implements RuleEngineDataPermissionManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineDataReferenceManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataReference; 4 | import cn.ruleengine.web.store.manager.RuleEngineDataReferenceManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineDataReferenceMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2021-07-27 16 | */ 17 | @Service 18 | public class RuleEngineDataReferenceManagerImpl extends ServiceImpl implements RuleEngineDataReferenceManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineFunctionManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunction; 5 | import cn.ruleengine.web.store.manager.RuleEngineFunctionManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineFunctionMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-15 17 | */ 18 | @Service 19 | public class RuleEngineFunctionManagerImpl extends ServiceImpl implements RuleEngineFunctionManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineFunctionParamManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionParam; 5 | import cn.ruleengine.web.store.manager.RuleEngineFunctionParamManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineFunctionParamMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-15 17 | */ 18 | @Service 19 | public class RuleEngineFunctionParamManagerImpl extends ServiceImpl implements RuleEngineFunctionParamManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineFunctionValueManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionValue; 5 | import cn.ruleengine.web.store.manager.RuleEngineFunctionValueManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineFunctionValueMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-16 17 | */ 18 | @Service 19 | public class RuleEngineFunctionValueManagerImpl extends ServiceImpl implements RuleEngineFunctionValueManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineGeneralRuleManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRule; 4 | import cn.ruleengine.web.store.manager.RuleEngineGeneralRuleManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineGeneralRuleMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-12-29 16 | */ 17 | @Service 18 | public class RuleEngineGeneralRuleManagerImpl extends ServiceImpl implements RuleEngineGeneralRuleManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineGeneralRulePublishManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRulePublish; 4 | import cn.ruleengine.web.store.manager.RuleEngineGeneralRulePublishManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineGeneralRulePublishMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-09-04 16 | */ 17 | @Service 18 | public class RuleEngineGeneralRulePublishManagerImpl extends ServiceImpl implements RuleEngineGeneralRulePublishManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineInputParameterManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineInputParameter; 5 | import cn.ruleengine.web.store.manager.RuleEngineInputParameterManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineInputParameterMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-14 17 | */ 18 | @Service 19 | public class RuleEngineInputParameterManagerImpl extends ServiceImpl implements RuleEngineInputParameterManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineOperationRecordManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineOperationRecord; 4 | import cn.ruleengine.web.store.manager.RuleEngineOperationRecordManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineOperationRecordMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2021-09-09 16 | */ 17 | @Service 18 | public class RuleEngineOperationRecordManagerImpl extends ServiceImpl implements RuleEngineOperationRecordManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineRuleManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineRule; 4 | import cn.ruleengine.web.store.manager.RuleEngineRuleManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineRuleMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-12-29 16 | */ 17 | @Service 18 | public class RuleEngineRuleManagerImpl extends ServiceImpl implements RuleEngineRuleManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineSystemLogManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineSystemLog; 4 | import cn.ruleengine.web.store.manager.RuleEngineSystemLogManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineSystemLogMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-07-29 16 | */ 17 | @Service 18 | public class RuleEngineSystemLogManagerImpl extends ServiceImpl implements RuleEngineSystemLogManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineUserManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineUser; 4 | import cn.ruleengine.web.store.manager.RuleEngineUserManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineUserMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 规则引擎用户表 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-09-24 16 | */ 17 | @Service 18 | public class RuleEngineUserManagerImpl extends ServiceImpl implements RuleEngineUserManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineUserWorkspaceManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineUserWorkspace; 4 | import cn.ruleengine.web.store.manager.RuleEngineUserWorkspaceManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineUserWorkspaceMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 用户工作空间 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2021-06-22 16 | */ 17 | @Service 18 | public class RuleEngineUserWorkspaceManagerImpl extends ServiceImpl implements RuleEngineUserWorkspaceManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineVariableManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineVariable; 5 | import cn.ruleengine.web.store.manager.RuleEngineVariableManager; 6 | import cn.ruleengine.web.store.mapper.RuleEngineVariableMapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 服务实现类 13 | *

14 | * 15 | * @author dqw 16 | * @since 2020-07-14 17 | */ 18 | @Service 19 | public class RuleEngineVariableManagerImpl extends ServiceImpl implements RuleEngineVariableManager { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/manager/impl/RuleEngineWorkspaceManagerImpl.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.manager.impl; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineWorkspace; 4 | import cn.ruleengine.web.store.manager.RuleEngineWorkspaceManager; 5 | import cn.ruleengine.web.store.mapper.RuleEngineWorkspaceMapper; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 工作空间 服务实现类 12 | *

13 | * 14 | * @author dqw 15 | * @since 2020-11-21 16 | */ 17 | @Service 18 | public class RuleEngineWorkspaceManagerImpl extends ServiceImpl implements RuleEngineWorkspaceManager { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineConditionGroupMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineConditionGroup; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-15 13 | */ 14 | public interface RuleEngineConditionGroupMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineConditionMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineCondition; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-14 14 | */ 15 | public interface RuleEngineConditionMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineDataPermissionMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataPermission; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | 7 | /** 8 | *

9 | * 用户数据权限表 Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2021-06-24 14 | */ 15 | public interface RuleEngineDataPermissionMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineDataReferenceMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineDataReference; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2021-07-27 14 | */ 15 | public interface RuleEngineDataReferenceMapper extends BaseMapper { 16 | 17 | /** 18 | * 是否有引用这个数据 19 | * 20 | * @param type 元素、变量、条件、规则等 21 | * @param refDataId 元素id... 22 | * @return r 23 | */ 24 | RuleEngineDataReference dataReference(@Param("type") Integer type, @Param("refDataId") Integer refDataId); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineFunctionMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineFunction; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-15 13 | */ 14 | public interface RuleEngineFunctionMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineFunctionParamMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionParam; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineFunctionParamMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineFunctionValueMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | 4 | import cn.ruleengine.web.store.entity.RuleEngineFunctionValue; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-16 14 | */ 15 | public interface RuleEngineFunctionValueMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineGeneralRuleMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRule; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-12-29 13 | */ 14 | public interface RuleEngineGeneralRuleMapper extends BaseMapper { 15 | 16 | /** 17 | * 根据id更新 18 | * 19 | * @param ruleEngineGeneralRule 规则信息 20 | */ 21 | void updateRuleById(RuleEngineGeneralRule ruleEngineGeneralRule); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineGeneralRulePublishMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineGeneralRulePublish; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-04 13 | */ 14 | public interface RuleEngineGeneralRulePublishMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineInputParameterMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineInputParameter; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-14 13 | */ 14 | public interface RuleEngineInputParameterMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineOperationRecordMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineOperationRecord; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2021-09-09 13 | */ 14 | public interface RuleEngineOperationRecordMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineRuleMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineRule; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author dqw 13 | * @since 2020-07-15 14 | */ 15 | public interface RuleEngineRuleMapper extends BaseMapper { 16 | 17 | /** 18 | * 根据id更新 19 | * 20 | * @param ruleEngineRule 规则信息 21 | * @return int 22 | */ 23 | int updateRuleById(RuleEngineRule ruleEngineRule); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineSystemLogMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineSystemLog; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-29 13 | */ 14 | public interface RuleEngineSystemLogMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineUserMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineUser; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * 规则引擎用户表 Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-09-24 13 | */ 14 | public interface RuleEngineUserMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/store/mapper/RuleEngineVariableMapper.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.store.mapper; 2 | 3 | import cn.ruleengine.web.store.entity.RuleEngineVariable; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author dqw 12 | * @since 2020-07-14 13 | */ 14 | public interface RuleEngineVariableMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/common/DownloadListResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.common; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Administrator 10 | */ 11 | @Data 12 | public class DownloadListResponse { 13 | 14 | private Integer id; 15 | 16 | private Integer dataId; 17 | 18 | private String code; 19 | 20 | private String name; 21 | 22 | private String version; 23 | 24 | private Integer status; 25 | 26 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 27 | private Date createTime; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/common/GoBackRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.common; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotEmpty; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * @author Administrator 10 | */ 11 | @Data 12 | public class GoBackRequest { 13 | 14 | /** 15 | * 规则、决策表、规则集 16 | */ 17 | @NotNull 18 | private Integer dataId; 19 | 20 | /** 21 | * 回退到哪个版本 22 | */ 23 | @NotEmpty 24 | private String version; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/common/HistoryListResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.common; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Administrator 10 | */ 11 | @Data 12 | public class HistoryListResponse { 13 | 14 | private Integer id; 15 | 16 | private Integer dataId; 17 | 18 | private String code; 19 | 20 | private String name; 21 | 22 | private String version; 23 | 24 | private Integer status; 25 | 26 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 27 | private Date createTime; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/common/RearrangeRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.common; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | 8 | /** 9 | * @author Administrator 10 | */ 11 | @Data 12 | public class RearrangeRequest { 13 | 14 | @NotNull 15 | private Integer id; 16 | @NotNull 17 | private Integer orderNo; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/common/ViewRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.common; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/1/30 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class ViewRequest { 17 | 18 | @NotNull 19 | private Integer id; 20 | 21 | /** 22 | * DataStatus 23 | */ 24 | @NotNull 25 | private Integer status; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/AddConditionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/7/14 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class AddConditionRequest { 19 | 20 | @Length(min = 1, max = 25, message = "条件名称长度在 1 到 25 个字符") 21 | @NotBlank(message = "条件名称不能为空") 22 | private String name; 23 | 24 | private String description; 25 | 26 | @NotNull(message = "条件配置不能为空") 27 | private ConfigBean config; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotBlank; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ConditionBody { 18 | 19 | private Integer id; 20 | 21 | @NotBlank 22 | private String name; 23 | 24 | private String description; 25 | 26 | @Valid 27 | private ConfigBean config; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionGroupCondition.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/9/7 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ConditionGroupCondition { 18 | 19 | private Integer id; 20 | 21 | @NotNull 22 | private Integer orderNo; 23 | 24 | @Valid 25 | private ConditionBody condition; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionGroupConfig.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 15 | * @author dingqianwen 16 | * @date 2020/8/28 17 | * @since 1.0.0 18 | */ 19 | @Data 20 | public class ConditionGroupConfig { 21 | 22 | private Integer id; 23 | 24 | @NotBlank(message = "条件组名称不能为空") 25 | private String name; 26 | 27 | @NotNull 28 | private Integer orderNo; 29 | 30 | /** 31 | * 条件组与条件关系 32 | */ 33 | @Valid 34 | private List conditionGroupCondition = new ArrayList<>(1); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConfigBean.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotBlank; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ConfigBean { 18 | 19 | @Valid 20 | private ConfigValue leftValue; 21 | 22 | @NotBlank 23 | private String symbol; 24 | 25 | @Valid 26 | private ConfigValue rightValue; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConfigValue.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/1/1 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ConfigValue { 18 | 19 | @NotNull 20 | private Integer type; 21 | 22 | @NotBlank 23 | private String value; 24 | 25 | private String valueName; 26 | 27 | /** 28 | * 固定值变量 值 29 | * value为变量的id 30 | */ 31 | private String variableValue; 32 | 33 | 34 | /** 35 | * 变量的类型 36 | */ 37 | private Integer variableType; 38 | 39 | @NotBlank 40 | private String valueType; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ExecuteConditionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author 丁乾文 14 | * @date 2020/12/12 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class ExecuteConditionRequest { 19 | 20 | /** 21 | * 条件id 22 | */ 23 | @NotNull(message = "条件ID不能为空") 24 | private Integer id; 25 | 26 | /** 27 | * 运行入参 28 | */ 29 | private Map params = new HashMap<>(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ListConditionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/7/14 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class ListConditionRequest { 15 | private String name; 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ListConditionResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ListConditionResponse { 18 | 19 | private Integer id; 20 | 21 | private String name; 22 | 23 | private String description; 24 | 25 | private String configInfo; 26 | 27 | private ConfigBean config; 28 | 29 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 30 | private Date createTime; 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/SwitchConditionOrderRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | /*** 9 | * 交换条件顺序 10 | * @author niuxiangqian 11 | * @version 1.0 12 | * @since 2021/7/17 5:53 下午 13 | **/ 14 | @Data 15 | public class SwitchConditionOrderRequest { 16 | 17 | public static final Integer TOP = 0; 18 | 19 | public static final Integer BOTTOM = 1; 20 | 21 | @NotNull 22 | @ApiModelProperty(value = "原来的id", required = true) 23 | private Integer fromId; 24 | 25 | @NotNull 26 | private Integer fromConditionGroupId; 27 | 28 | /** 29 | * 可以不传,只有当跨条件组拖拽时候 目前条件组没有任何条件时 30 | */ 31 | @ApiModelProperty(value = "目标id", required = true) 32 | private Integer toId; 33 | 34 | /** 35 | * 0 是 toId的上面 1是toId的下面 36 | */ 37 | private Integer toType = 1; 38 | 39 | @NotNull 40 | private Integer toConditionGroupId; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/UpdateConditionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.Valid; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/8/25 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | public class UpdateConditionRequest { 20 | @NotNull 21 | private Integer id; 22 | 23 | @Length(min = 1, max = 25, message = "条件名称长度在 1 到 25 个字符") 24 | @NotBlank(message = "条件名称不能为空") 25 | private String name; 26 | 27 | private String description; 28 | 29 | @NotNull(message = "条件配置不能为空") 30 | @Valid 31 | private ConfigBean config; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/DeleteConditionGroupRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈DeleteConditionGroupRequest〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 4:49 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class DeleteConditionGroupRequest { 14 | 15 | private Integer id; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/SaveOrUpdateConditionGroup.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group; 2 | 3 | 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/8/28 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class SaveOrUpdateConditionGroup { 18 | 19 | private Integer id; 20 | 21 | private String name; 22 | 23 | @NotNull 24 | private Integer ruleId; 25 | 26 | private Integer orderNo; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/DeleteConditionAndBindGroupRefRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group.condition; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈SaveConditionAndBindGroupRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/12 1:42 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class DeleteConditionAndBindGroupRefRequest { 16 | 17 | /** 18 | * 属于哪一个规则,用来拦截器取参数 19 | */ 20 | @NotNull 21 | private Integer conditionId; 22 | 23 | /** 24 | * 条件组关系id 25 | */ 26 | @NotNull 27 | private Integer conditionGroupRefId; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveConditionAndBindGroupRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group.condition; 2 | 3 | import cn.ruleengine.web.vo.condition.AddConditionRequest; 4 | import lombok.Data; 5 | 6 | import javax.validation.Valid; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈SaveConditionAndBindGroupRequest〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/7/12 1:42 下午 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class SaveConditionAndBindGroupRequest { 18 | 19 | /** 20 | * 与addConditionRequest绑定 21 | */ 22 | @NotNull 23 | private Integer conditionGroupId; 24 | 25 | @NotNull 26 | private Integer orderNo; 27 | 28 | /** 29 | * 条件信息 30 | */ 31 | @NotNull 32 | @Valid 33 | private AddConditionRequest addConditionRequest; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveConditionAndBindGroupResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group.condition; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈SaveConditionAndBindGroupResponse〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/7/12 2:17 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class SaveConditionAndBindGroupResponse { 14 | 15 | private Integer conditionId; 16 | 17 | private Integer conditionGroupConditionId; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveOrUpdateConditionGroupCondition.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.condition.group.condition; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/8/28 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class SaveOrUpdateConditionGroupCondition { 15 | private Integer id; 16 | 17 | private Integer conditionId; 18 | 19 | private Integer conditionGroupId; 20 | 21 | private Integer orderNo; 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/data/file/ExportRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.data.file; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈ExportRequest〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/7/13 5:55 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class ExportRequest { 14 | 15 | private Integer dataType; 16 | 17 | /** 18 | * 数据库id 19 | * 如果data_type=0 则此data_id为规则的id 20 | */ 21 | private Integer dataId; 22 | 23 | private String version; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/data/file/ExportResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.data.file; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈ExportResponse〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/7/13 5:35 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class ExportResponse { 14 | 15 | private String data; 16 | 17 | private String code; 18 | 19 | private Integer id; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/AddFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import java.util.List; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/9/11 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class AddFunction { 18 | 19 | /** 20 | * 函数java代码 21 | */ 22 | @NotBlank 23 | private String javaCode; 24 | /** 25 | * 类名称 26 | */ 27 | @NotBlank 28 | private String className; 29 | 30 | @NotBlank 31 | private String name; 32 | 33 | private String description; 34 | 35 | private List param; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/ExecuteFunctionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import cn.ruleengine.web.vo.variable.ParamValue; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotNull; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author 丁乾文 15 | * @date 2020/12/12 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | public class ExecuteFunctionRequest { 20 | 21 | @NotNull(message = "函数ID不能为空") 22 | private Integer id; 23 | 24 | /** 25 | * 运行入参 26 | */ 27 | private List paramValues = new ArrayList<>(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/FunctionParam.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/8/27 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class FunctionParam { 15 | private String name; 16 | 17 | private String code; 18 | 19 | /** 20 | * STRING,BOOLEAN... 21 | */ 22 | private String valueType; 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/GetFunctionResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/8/27 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class GetFunctionResponse { 17 | 18 | private Integer id; 19 | 20 | private String name; 21 | 22 | private String executor; 23 | 24 | private String description; 25 | 26 | /** 27 | * 函数返回值 28 | */ 29 | private String returnValueType; 30 | 31 | /** 32 | * 函数中所有的参数 33 | */ 34 | private List params; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/ListFunctionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/8/27 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class ListFunctionRequest { 15 | 16 | private String name; 17 | 18 | private String valueType; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/ListFunctionResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/27 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class ListFunctionResponse { 19 | 20 | private Integer id; 21 | 22 | private String name; 23 | 24 | private String executor; 25 | 26 | private String returnValueType; 27 | 28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 29 | private Date createTime; 30 | 31 | /** 32 | * 函数中所有的参数 33 | */ 34 | private List params; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/UpdateFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.function; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/9/11 14 | * @since 1.0.0 15 | */ 16 | @EqualsAndHashCode(callSuper = true) 17 | @Data 18 | public class UpdateFunction extends AddFunction{ 19 | 20 | @NotNull 21 | private Integer id; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.operation.record; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈OperationRecordBody〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/7/13 6:25 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class OperationRecordBody implements Serializable { 17 | 18 | private static final long serialVersionUID = 376107396179241194L; 19 | 20 | /** 21 | * 修改人 22 | */ 23 | private Integer userId; 24 | 25 | /** 26 | * 修改人头像 27 | */ 28 | private String avatar; 29 | 30 | 31 | /** 32 | * 修改描述 33 | */ 34 | private String description; 35 | 36 | /** 37 | * 操作时间 38 | */ 39 | private Date operationTime; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.operation.record; 2 | 3 | /** 4 | * 〈OperationRecordRequest〉 5 | * 6 | * @author 丁乾文 7 | * @date 2021/9/9 5:26 下午 8 | * @since 1.0.0 9 | */ 10 | public class OperationRecordRequest { 11 | } 12 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.operation.record; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * 〈OperationRecordResponse〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/9/9 5:26 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class OperationRecordResponse { 16 | private Integer id; 17 | 18 | private Integer userId; 19 | 20 | private String username; 21 | 22 | private String userAvatar; 23 | 24 | private Integer workspaceId; 25 | 26 | private String workspaceCode; 27 | 28 | private String description; 29 | 30 | private Integer dataType; 31 | 32 | private Integer dataId; 33 | 34 | private Date operationTime; 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/AddInputParameterRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/7/14 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class AddInputParameterRequest { 19 | 20 | @Length(min = 1, max = 25, message = "规则参数名称长度在 1 到 25 个字符") 21 | @NotBlank(message = "规则参数名称不能为空") 22 | private String name; 23 | 24 | @Length(min = 1, max = 25, message = "规则参数Code长度在 1 到 25 个字符") 25 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_&#\\-]*$", message = "规则参数Code只能字母开头,以及字母数字_&#-组成") 26 | @NotBlank(message = "规则参数编码不能为空") 27 | private String code; 28 | 29 | @NotBlank(message = "规则参数类型不能为空") 30 | private String valueType; 31 | 32 | private String description; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/GetInputParameterResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/8/25 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class GetInputParameterResponse { 15 | 16 | private Integer id; 17 | 18 | private String name; 19 | 20 | private String code; 21 | 22 | private String valueType; 23 | 24 | private String description; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/ListInputParameterRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/7/14 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class ListInputParameterRequest { 17 | private String name; 18 | private String code; 19 | 20 | private List valueType; 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/ListInputParameterResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ListInputParameterResponse { 18 | private Integer id; 19 | 20 | private String name; 21 | 22 | private String code; 23 | 24 | private String valueType; 25 | 26 | private String description; 27 | 28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 29 | private Date createTime; 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/UpdateInputParameterRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/25 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class UpdateInputParameterRequest { 19 | 20 | @NotNull 21 | private Integer id; 22 | 23 | @NotBlank(message = "规则参数名称不能为空") 24 | @Length(min = 1, max = 25, message = "规则参数名称长度在 1 到 25 个字符") 25 | private String name; 26 | 27 | private String description; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/VerifyInputParameterCodeRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.parameter; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | 9 | /*** 10 | * 验证参数code 11 | * @author niuxiangqian 12 | * @version 1.0 13 | * @since 2021/7/15 4:11 下午 14 | **/ 15 | @Data 16 | public class VerifyInputParameterCodeRequest { 17 | 18 | @Length(min = 1, max = 25, message = "规则参数Code长度在 1 到 25 个字符") 19 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_&#\\-]*$", message = "规则参数Code只能字母开头,以及字母数字_&#-组成") 20 | @NotBlank(message = "规则参数编码不能为空") 21 | private String code; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/ListDataPermissionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.permission.data; 2 | 3 | import lombok.Data; 4 | 5 | /*** 6 | * 数据权限请求参数 7 | * @author niuxiangqian 8 | * @version 1.0 9 | * @since 2021/6/25 7:55 下午 10 | **/ 11 | @Data 12 | public class ListDataPermissionRequest { 13 | 14 | private Integer dataType; 15 | 16 | /** 17 | * 数据库id 18 | * 如果data_type=0 则此data_id为规则的id 19 | */ 20 | private Integer dataId; 21 | 22 | private String username; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/ListDataPermissionResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.permission.data; 2 | 3 | import lombok.Data; 4 | 5 | /*** 6 | * 数据权限请求参数 7 | * @author niuxiangqian 8 | * @version 1.0 9 | * @since 2021/6/25 7:55 下午 10 | **/ 11 | @Data 12 | public class ListDataPermissionResponse { 13 | 14 | private String username; 15 | 16 | private String email; 17 | 18 | private String avatar; 19 | 20 | private Integer userId; 21 | 22 | 23 | /** 24 | * 0有写权限 25 | */ 26 | private Integer writeAuthority; 27 | 28 | /** 29 | * 0有发布规则权限 30 | */ 31 | private Integer publishAuthority; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/UpdateDataPermissionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.permission.data; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /*** 8 | * 更新数据权限请求参数 9 | * 10 | * @author niuxiangqian 11 | * @version 1.0 12 | * @since 2021/6/26 4:11 下午 13 | **/ 14 | @Data 15 | public class UpdateDataPermissionRequest { 16 | 17 | private Integer dataType; 18 | 19 | /** 20 | * 数据库id 21 | * 如果data_type=0 则此data_id为规则的id 22 | */ 23 | private Integer dataId; 24 | 25 | /** 26 | * 0有写权限 27 | */ 28 | @NotNull 29 | private Integer writeAuthority; 30 | 31 | /** 32 | * 0有发布规则权限 33 | */ 34 | @NotNull 35 | private Integer publishAuthority; 36 | 37 | /** 38 | * 用户id 39 | */ 40 | @NotNull 41 | private Integer userId; 42 | } 43 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/RuleBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule; 2 | 3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig; 4 | import cn.ruleengine.web.vo.condition.ConfigValue; 5 | import lombok.Data; 6 | 7 | import javax.validation.Valid; 8 | import javax.validation.constraints.NotBlank; 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | /** 13 | * 〈一句话功能简述〉
14 | * 〈〉 15 | * 16 | * @author liqian 17 | * @date 2021/1/15 18 | */ 19 | @Data 20 | public class RuleBody { 21 | /** 22 | * 规则id 23 | */ 24 | private Integer id; 25 | /** 26 | * 规则名称 27 | */ 28 | @NotBlank 29 | private String name; 30 | /** 31 | * 规则集是有序的,默认循序执行规则集 32 | */ 33 | private Integer orderNo; 34 | 35 | /** 36 | * 规则条件组 37 | */ 38 | @Valid 39 | private List conditionGroup = new ArrayList<>(); 40 | 41 | /** 42 | * 规则结果 43 | */ 44 | @Valid 45 | private ConfigValue action = new ConfigValue(); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/SaveRuleAndBindRuleSetRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈SaveRuleAndBindRuleSetRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/28 1:03 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class SaveRuleAndBindRuleSetRequest { 16 | 17 | @NotNull 18 | private Integer ruleSetId; 19 | 20 | @NotNull 21 | private RuleBody ruleBody; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/DefaultAction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | 4 | import cn.ruleengine.web.vo.condition.ConfigValue; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | import javax.validation.constraints.NotNull; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/9/3 16 | * @since 1.0.0 17 | */ 18 | @EqualsAndHashCode(callSuper = true) 19 | @Data 20 | public class DefaultAction extends ConfigValue { 21 | 22 | public DefaultAction() { 23 | 24 | } 25 | 26 | public DefaultAction(ConfigValue configValue) { 27 | this.setValue(configValue.getValue()); 28 | this.setType(configValue.getType()); 29 | this.setValueName(configValue.getValueName()); 30 | this.setVariableValue(configValue.getVariableValue()); 31 | this.setValueType(configValue.getValueType()); 32 | } 33 | 34 | /** 35 | * 0启用 1不启用 36 | */ 37 | @NotNull 38 | private Integer enableDefaultAction; 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/DefaultActionSwitchRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈DefaultActionSwitchRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/15 11:16 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class DefaultActionSwitchRequest { 16 | 17 | @NotNull 18 | private Integer generalRuleId; 19 | 20 | @NotNull 21 | private Integer enableDefaultAction; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/GeneralRuleBody.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig; 4 | import cn.ruleengine.web.vo.condition.ConfigValue; 5 | import lombok.Data; 6 | 7 | import javax.validation.Valid; 8 | import javax.validation.constraints.NotNull; 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | /** 13 | * 〈一句话功能简述〉
14 | * 〈〉 15 | * 16 | * @author 丁乾文 17 | * @date 2021/1/23 18 | * @since 1.0.0 19 | */ 20 | @Data 21 | public class GeneralRuleBody { 22 | 23 | @NotNull 24 | private Integer id; 25 | 26 | @Valid 27 | private List conditionGroup = new ArrayList<>(1); 28 | 29 | @NotNull 30 | @Valid 31 | private ConfigValue action; 32 | 33 | private DefaultAction defaultAction; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/GeneralRuleDefinition.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/28 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class GeneralRuleDefinition { 19 | 20 | private Integer id; 21 | 22 | @NotBlank 23 | @Length(min = 1, max = 25, message = "规则名称长度在 1 到 25 个字符") 24 | private String name; 25 | 26 | @NotBlank 27 | @Length(min = 1, max = 25, message = "规则编码长度在 1 到 25 个字符") 28 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_&#\\-]*$", message = "规则Code只能字母开头,以及字母数字_&#-组成") 29 | private String code; 30 | 31 | private String description; 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/GetGeneralRuleResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig; 4 | import cn.ruleengine.web.vo.condition.ConfigValue; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/24 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class GetGeneralRuleResponse { 19 | 20 | private Integer id; 21 | 22 | private String name; 23 | 24 | private String code; 25 | 26 | private String currentVersion; 27 | 28 | private String publishVersion; 29 | 30 | private String description; 31 | 32 | private Integer workspaceId; 33 | 34 | private String workspaceCode; 35 | 36 | private Integer ruleId; 37 | 38 | private List conditionGroup; 39 | 40 | private ConfigValue action; 41 | 42 | private DefaultAction defaultAction; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/ListGeneralRuleRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/8/24 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class ListGeneralRuleRequest { 15 | private String name; 16 | private String code; 17 | private Integer status; 18 | } 19 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/ListGeneralRuleResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/8/24 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ListGeneralRuleResponse { 18 | 19 | private Integer id; 20 | 21 | private String name; 22 | 23 | private String code; 24 | 25 | private Integer createUserId; 26 | 27 | private String createUserName; 28 | 29 | private String createUserAvatar; 30 | 31 | private String currentVersion; 32 | 33 | private String publishVersion; 34 | 35 | private Integer status; 36 | 37 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 38 | private Date createTime; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/PublishListRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 〈PublishListRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/7/28 9:04 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class PublishListRequest{ 16 | 17 | private String name; 18 | private String code; 19 | 20 | private List valueType; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/PublishListResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈PublishListRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/7/28 9:04 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class PublishListResponse { 17 | 18 | /** 19 | * 普通规则id 20 | */ 21 | private Integer id; 22 | 23 | private String name; 24 | 25 | private String code; 26 | 27 | private String valueType; 28 | 29 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 30 | private Date createTime; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/RunTestRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotEmpty; 6 | import javax.validation.constraints.NotNull; 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/7/16 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | public class RunTestRequest { 20 | 21 | /** 22 | * 规则id 23 | */ 24 | @NotNull 25 | private Integer id; 26 | 27 | /** 28 | * DataStatus 29 | */ 30 | @NotNull 31 | private Integer status; 32 | 33 | @NotEmpty 34 | private String workspaceCode; 35 | 36 | @NotEmpty 37 | private String code; 38 | 39 | private Map param = new HashMap<>(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/SaveActionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import cn.ruleengine.web.vo.condition.ConfigValue; 4 | import lombok.Data; 5 | 6 | import javax.validation.Valid; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈SaveActionRequest〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/7/12 5:34 下午 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class SaveActionRequest { 18 | 19 | @NotNull 20 | private Integer ruleId; 21 | 22 | /** 23 | * 结果配置信息 24 | */ 25 | @NotNull 26 | @Valid 27 | private ConfigValue configValue; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/SaveDefaultActionRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import cn.ruleengine.web.vo.condition.ConfigValue; 4 | import lombok.Data; 5 | 6 | import javax.validation.Valid; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈SaveActionRequest〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/7/12 5:34 下午 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class SaveDefaultActionRequest { 18 | 19 | @NotNull 20 | private Integer generalRuleId; 21 | 22 | /** 23 | * 结果配置信息 24 | */ 25 | @NotNull 26 | @Valid 27 | private ConfigValue configValue; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/ViewGeneralRuleResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.rule.general; 2 | 3 | import cn.ruleengine.core.Parameter; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.util.Collection; 8 | 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/8/24 16 | * @since 1.0.0 17 | */ 18 | @EqualsAndHashCode(callSuper = true) 19 | @Data 20 | public class ViewGeneralRuleResponse extends GetGeneralRuleResponse { 21 | 22 | /** 23 | * 规则入参 24 | */ 25 | private Collection parameters; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/symbol/SymbolResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.symbol; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/7/14 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class SymbolResponse { 15 | 16 | public String explanation; 17 | public String name; 18 | public String symbol; 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/system/log/GetLogResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.system.log; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2021/3/2 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class GetLogResponse { 18 | 19 | private Integer id; 20 | 21 | private Integer userId; 22 | 23 | private String username; 24 | 25 | private String tag; 26 | 27 | private String description; 28 | 29 | /** 30 | * 请求ip 31 | */ 32 | private String ip; 33 | 34 | /** 35 | * 浏览器 36 | */ 37 | private String browser; 38 | 39 | /** 40 | * 浏览器版本 41 | */ 42 | private String browserVersion; 43 | 44 | /** 45 | * 请求者系统 46 | */ 47 | private String system; 48 | 49 | 50 | /** 51 | * 请求url 52 | */ 53 | private String requestUrl; 54 | 55 | /** 56 | * 请求id 57 | */ 58 | private String requestId; 59 | 60 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 61 | private Date createTime; 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/system/log/ListLogRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.system.log; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2021/3/2 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class ListLogRequest { 15 | 16 | 17 | private String tag; 18 | 19 | /** 20 | * 精确 21 | */ 22 | private String requestId; 23 | 24 | /** 25 | * 模糊 26 | */ 27 | private String requestUrl; 28 | 29 | /** 30 | * 模糊 31 | */ 32 | private String username; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/template/ExceptionMessage.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.template; 2 | 3 | import cn.ruleengine.web.interceptor.TraceInterceptor; 4 | import lombok.Data; 5 | 6 | import java.time.LocalDateTime; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2024/9/18 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ExceptionMessage { 18 | 19 | private String type; 20 | 21 | private LocalDateTime time = LocalDateTime.now(); 22 | 23 | private String message; 24 | 25 | private String requestId = TraceInterceptor.getRequestId(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/template/VerifyCode.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.template; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2024/9/18 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class VerifyCode { 15 | private String code; 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/AddUserRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.Email; 6 | import javax.validation.constraints.NotBlank; 7 | 8 | /** 9 | * 〈AddUserRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/6/23 3:53 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class AddUserRequest { 17 | 18 | @NotBlank 19 | private String username; 20 | 21 | @NotBlank 22 | private String password; 23 | 24 | @Email 25 | private String email; 26 | 27 | private String phone; 28 | 29 | private String sex; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/DeleteUserRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 删除用户 10 | * 11 | * @author : zhj 12 | * @date : 2021/6/23 21:46 13 | **/ 14 | @Data 15 | public class DeleteUserRequest { 16 | 17 | @ApiModelProperty("用户id") 18 | @NotNull 19 | private Integer id; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ForgotRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import javax.validation.constraints.Email; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | import javax.validation.constraints.Size; 11 | 12 | /** 13 | * 〈一句话功能简述〉
14 | * 〈〉 15 | * 16 | * @author 丁乾文 17 | * @date 2019/8/23 18 | * @since 1.0.0 19 | */ 20 | @Data 21 | @ApiModel("用户修改密码请求参数") 22 | public class ForgotRequest { 23 | 24 | @Size(min = 6, max = 16, message = "密码需要6到16位") 25 | @NotBlank(message = "密码不能为空") 26 | @ApiModelProperty("密码") 27 | private String password; 28 | 29 | @NotBlank(message = "邮箱不能为空") 30 | @Email(message = "邮箱格式错误") 31 | @ApiModelProperty("邮箱") 32 | private String email; 33 | 34 | @NotNull(message = "邮箱验证码不能为空") 35 | @ApiModelProperty("邮箱验证码") 36 | private Integer code; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/GetVerifyCodeByEmailRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import javax.validation.constraints.Email; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 15 | * @author 丁乾文 16 | * @date 2019/8/23 17 | * @since 1.0.0 18 | */ 19 | @Data 20 | @ApiModel("获取验证码请求参数") 21 | public class GetVerifyCodeByEmailRequest { 22 | 23 | @NotNull 24 | @ApiModelProperty("获取验证码用途类型") 25 | private Integer type; 26 | 27 | @NotBlank(message = "邮箱不能为空") 28 | @Email(message = "邮箱格式错误") 29 | @ApiModelProperty("邮箱") 30 | private String email; 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ListUserRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈ListUserRequest〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/6/23 3:16 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class ListUserRequest { 14 | 15 | private String username; 16 | 17 | private String email; 18 | 19 | private String sex; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ListUserResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈ListUserRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/6/23 3:16 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class ListUserResponse { 17 | 18 | private Integer id; 19 | 20 | private String username; 21 | 22 | private String email; 23 | 24 | private String sex; 25 | 26 | private String avatar; 27 | 28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 29 | private Date createTime; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/LoginRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author dingqianwen 12 | * @date 2020/8/31 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class LoginRequest { 17 | 18 | @NotBlank(message = "用户名不能为空") 19 | private String username; 20 | 21 | @NotBlank(message = "密码不能为空") 22 | private String password; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/RegisterRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Email; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | import javax.validation.constraints.Size; 10 | 11 | /** 12 | * 〈一句话功能简述〉
13 | * 〈〉 14 | * 15 | * @author liqian 16 | * @date 2020/9/24 17 | */ 18 | @Data 19 | public class RegisterRequest { 20 | 21 | @Size(min = 2, max = 10, message = "用户名需要2到10位") 22 | @NotBlank(message = "用户名不能为空") 23 | @ApiModelProperty("用户名") 24 | private String username; 25 | 26 | @Size(min = 6, max = 16, message = "密码需要6到16位") 27 | @NotBlank(message = "密码不能为空") 28 | @ApiModelProperty("密码") 29 | private String password; 30 | 31 | @NotBlank(message = "邮箱不能为空") 32 | @Email(message = "邮箱格式错误") 33 | @ApiModelProperty("邮箱") 34 | private String email; 35 | 36 | @NotNull(message = "邮箱验证码不能为空") 37 | @ApiModelProperty("邮箱验证码") 38 | private Integer code; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/SelectUserRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 删除用户 10 | * 11 | * @author : zhj 12 | * @date : 2021/6/23 21:46 13 | **/ 14 | @Data 15 | public class SelectUserRequest { 16 | 17 | @ApiModelProperty("用户id") 18 | @NotNull 19 | private Integer id; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/SelectUserResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | 6 | /** 7 | * @author dqw 8 | */ 9 | @Data 10 | public class SelectUserResponse { 11 | 12 | private Integer id; 13 | 14 | private String username; 15 | 16 | private String email; 17 | 18 | private Long phone; 19 | 20 | private String avatar; 21 | 22 | private String sex; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UpdateUserInfoRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Email; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/4/5 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class UpdateUserInfoRequest { 19 | 20 | @NotNull 21 | @ApiModelProperty("用户id") 22 | private Integer id; 23 | 24 | @ApiModelProperty("用户性别") 25 | private String sex; 26 | 27 | 28 | @ApiModelProperty("用户头像") 29 | private String avatar; 30 | 31 | @ApiModelProperty("用户手机号") 32 | private Long phone; 33 | 34 | @Email 35 | @ApiModelProperty("用户邮箱") 36 | private String email; 37 | 38 | @ApiModelProperty("个人描述") 39 | private String description; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UserData.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020/11/22 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class UserData implements Serializable { 17 | 18 | private static final long serialVersionUID = -5944149026431724373L; 19 | /** 20 | * admin = 0 21 | */ 22 | public static final int ADMIN = 0; 23 | 24 | private Integer id; 25 | 26 | private String username; 27 | 28 | private String email; 29 | 30 | private Long phone; 31 | 32 | private String avatar; 33 | 34 | private String sex; 35 | 36 | private Integer isAdmin; 37 | 38 | private String description; 39 | 40 | public Boolean getIsAdmin() { 41 | if (this.isAdmin == null) { 42 | return false; 43 | } 44 | return this.isAdmin == 0; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UserResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author liqian 10 | * @date 2020/9/24 11 | */ 12 | @Data 13 | public class UserResponse { 14 | 15 | private Integer id; 16 | 17 | private String username; 18 | 19 | private String email; 20 | 21 | private Long phone; 22 | 23 | private String avatar; 24 | 25 | private String sex; 26 | 27 | private Boolean isAdmin; 28 | 29 | private String description; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyEmailRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import javax.validation.constraints.Email; 8 | import javax.validation.constraints.NotBlank; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author 丁乾文 15 | * @date 2019/8/23 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | @ApiModel("验证邮箱是否重复请求参数") 20 | public class VerifyEmailRequest { 21 | 22 | @NotBlank(message = "邮箱不能为空") 23 | @Email(message = "邮箱格式错误") 24 | @ApiModelProperty("邮箱") 25 | private String email; 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyNameRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.Size; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author 丁乾文 15 | * @date 2019/8/23 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | @ApiModel("验证用户名是否重复请求参数") 20 | public class VerifyNameRequest { 21 | 22 | @Size(min = 2, max = 10, message = "用户名需要2到10位") 23 | @NotBlank(message = "用户名不能为空") 24 | @ApiModelProperty("用户名") 25 | private String username; 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyUserEmailRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Email; 7 | import javax.validation.constraints.NotBlank; 8 | 9 | /*** 10 | * 注册邮箱检查 11 | * @author niuxiangqian 12 | * @version 1.0 13 | * @since 2021/7/14 3:08 下午 14 | **/ 15 | @Data 16 | public class VerifyUserEmailRequest { 17 | 18 | @NotBlank(message = "邮箱不能为空") 19 | @Email(message = "邮箱格式错误") 20 | @ApiModelProperty(value = "邮箱",required = true) 21 | private String email; 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyUserNameRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.user; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Size; 8 | 9 | /*** 10 | * 验证用户是否可用request 11 | * @author niuxiangqian 12 | * @version 1.0 13 | * @since 2021/7/14 2:54 下午 14 | **/ 15 | @Data 16 | public class VerifyUserNameRequest { 17 | @Size(min = 2, max = 10, message = "用户名需要2到10位") 18 | @NotBlank(message = "用户名不能为空") 19 | @ApiModelProperty(value = "用户名",required = true) 20 | private String username; 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/AddVariableRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import org.hibernate.validator.constraints.Length; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/7/14 16 | * @since 1.0.0 17 | */ 18 | @Data 19 | public class AddVariableRequest { 20 | 21 | @NotBlank 22 | @Length(min = 1, max = 25, message = "变量名称长度在 1 到 25 个字符") 23 | private String name; 24 | 25 | @NotNull 26 | private Integer type; 27 | 28 | private String description; 29 | 30 | @NotBlank 31 | private String valueType; 32 | 33 | @NotNull 34 | private String value; 35 | 36 | /** 37 | * 函数 38 | */ 39 | @NotNull 40 | private VariableFunction function; 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/GetVariableResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author dingqianwen 11 | * @date 2020/8/25 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class GetVariableResponse { 16 | 17 | private Integer id; 18 | 19 | private String name; 20 | 21 | private String description; 22 | 23 | private Integer type; 24 | 25 | private String valueType; 26 | 27 | private String value; 28 | 29 | private VariableFunction function; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/ListVariableRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ListVariableRequest { 18 | 19 | private String name; 20 | private List valueType; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/ListVariableResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/7/14 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ListVariableResponse { 18 | private Integer id; 19 | 20 | private String name; 21 | 22 | private String description; 23 | 24 | private String valueType; 25 | 26 | private String functionName; 27 | 28 | private Integer type; 29 | 30 | private String value; 31 | 32 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 33 | private Date createTime; 34 | } 35 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/ParamValue.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈一句话功能简述〉
10 | * 〈〉 11 | * 12 | * @author dingqianwen 13 | * @date 2020/8/30 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class ParamValue { 18 | 19 | private String name; 20 | 21 | @NotBlank 22 | private String code; 23 | 24 | /** 25 | * 规则参数/变量/固定值 26 | */ 27 | @NotNull 28 | private Integer type; 29 | 30 | @NotNull 31 | private String value; 32 | 33 | /** 34 | * STRING,BOOLEAN... 35 | */ 36 | @NotBlank 37 | private String valueType; 38 | 39 | private String valueName; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/UpdateVariableRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | import org.hibernate.validator.constraints.Length; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | /** 10 | * 〈一句话功能简述〉
11 | * 〈〉 12 | * 13 | * @author dingqianwen 14 | * @date 2020/8/25 15 | * @since 1.0.0 16 | */ 17 | @Data 18 | public class UpdateVariableRequest { 19 | 20 | @NotNull 21 | private Integer id; 22 | 23 | @Length(min = 1, max = 25, message = "变量名称长度在 1 到 25 个字符") 24 | @NotBlank 25 | private String name; 26 | 27 | @NotNull 28 | private Integer type; 29 | 30 | private String description; 31 | 32 | @NotNull 33 | private String value; 34 | 35 | /** 36 | * 函数 37 | */ 38 | @NotNull 39 | private VariableFunction function; 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/VariableFunction.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotNull; 7 | import java.util.List; 8 | 9 | /** 10 | * 〈VariableFunction〉 11 | * 12 | * @author 丁乾文 13 | * @date 2021/8/2 7:07 下午 14 | * @since 1.0.0 15 | */ 16 | @Data 17 | public class VariableFunction { 18 | 19 | private Integer id; 20 | 21 | private String name; 22 | /** 23 | * 函数中所有的参数 24 | */ 25 | @Valid 26 | @NotNull 27 | private List paramValues; 28 | 29 | private String returnValueType; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/VerifyVariableNameRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.variable; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import org.hibernate.validator.constraints.Length; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | 9 | /*** 10 | * 验证变量名字 11 | * @author niuxiangqian 12 | * @version 1.0 13 | * @since 2021/7/15 4:11 下午 14 | **/ 15 | @Data 16 | public class VerifyVariableNameRequest { 17 | 18 | @NotBlank 19 | @Length(min = 1, max = 25, message = "变量名称长度在 1 到 25 个字符") 20 | private String name; 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workplace/DynamicRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workplace; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈DynamicRequest〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 5:24 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class DynamicRequest { 14 | } 15 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workplace/DynamicResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workplace; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈DynamicResponse〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 5:24 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class DynamicResponse { 14 | } 15 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workplace/HeadInfoResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workplace; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈HeadInfoResponse〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 2:00 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class HeadInfoResponse { 14 | 15 | private Integer workspaceMemberNumber; 16 | 17 | private Integer publishedGeneralRuleNumber; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workplace/NumberOfCreationsRankingResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workplace; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈NumberOfCreationsRankingResponse〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/9/9 2:23 下午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class NumberOfCreationsRankingResponse { 14 | 15 | private Integer ruleSetNumber; 16 | 17 | private Integer generalRuleNumber; 18 | 19 | private String createUsername; 20 | 21 | private Integer createUserId; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workplace/ProjectInProgressResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workplace; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * 〈ProjectInProgressResponse〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/9/9 1:15 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class ProjectInProgressResponse { 16 | 17 | private Integer id; 18 | 19 | private Integer dataType; 20 | 21 | private String createUsername; 22 | 23 | private String name; 24 | 25 | private String code; 26 | 27 | private String currentVersion; 28 | 29 | private Integer status; 30 | 31 | private Date updateTime; 32 | 33 | private String description; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/AccessKey.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | 6 | /** 7 | * 〈一句话功能简述〉
8 | * 〈〉 9 | * 10 | * @author 丁乾文 11 | * @date 2020/12/11 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class AccessKey { 16 | 17 | private Integer id; 18 | private String accessKeyId; 19 | private String accessKeySecret; 20 | 21 | /** 22 | * 对比AccessKey 23 | * 24 | * @param accessKeyId id 25 | * @param accessKeySecret Secret 26 | */ 27 | public boolean equals(String accessKeyId, String accessKeySecret) { 28 | if (accessKeyId == null || accessKeySecret == null) { 29 | return false; 30 | } 31 | if (!this.accessKeyId.equals(accessKeyId)) { 32 | return false; 33 | } 34 | return this.accessKeySecret.equals(accessKeySecret); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/AddWorkspaceRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | /** 8 | * 〈AddWorkspaceRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/23 5:58 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class AddWorkspaceRequest { 16 | 17 | @NotBlank 18 | private String code; 19 | 20 | @NotBlank 21 | private String name; 22 | 23 | private String description; 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/CurrentWorkspaceInfoResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | /** 7 | * @author Administrator 8 | */ 9 | @EqualsAndHashCode(callSuper = true) 10 | @Data 11 | public class CurrentWorkspaceInfoResponse extends Workspace { 12 | 13 | 14 | private Boolean isAdmin; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/EditWorkspaceRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈AddWorkspaceRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/6/23 5:58 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class EditWorkspaceRequest { 17 | 18 | @NotNull 19 | private Integer id; 20 | @NotBlank 21 | private String name; 22 | 23 | private String description; 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/ListWorkspaceRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈一句话功能简述〉
7 | * 〈〉 8 | * 9 | * @author dingqianwen 10 | * @date 2020/12/19 11 | * @since 1.0.0 12 | */ 13 | @Data 14 | public class ListWorkspaceRequest { 15 | private String name; 16 | 17 | private String code; 18 | } 19 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/ListWorkspaceResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | /** 11 | * 〈一句话功能简述〉
12 | * 〈〉 13 | * 14 | * @author dingqianwen 15 | * @date 2020/12/19 16 | * @since 1.0.0 17 | */ 18 | @EqualsAndHashCode(callSuper = true) 19 | @Data 20 | public class ListWorkspaceResponse extends Workspace { 21 | 22 | private String description; 23 | 24 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 25 | private Date createTime; 26 | 27 | /** 28 | * 工作空间管理员列表 29 | */ 30 | private List workspaceAdminList; 31 | 32 | @Data 33 | public static class AdminUser { 34 | 35 | private Integer id; 36 | 37 | private String username; 38 | 39 | private String avatar; 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/SelectWorkspaceResponse.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | 6 | /** 7 | * @author dqw 8 | */ 9 | @Data 10 | public class SelectWorkspaceResponse { 11 | 12 | private Integer id; 13 | 14 | private String code; 15 | 16 | private String name; 17 | 18 | private String description; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/UpdateAccessKeyRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotNull; 7 | 8 | /** 9 | * 〈UpdateAccessKeyRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/6/25 4:43 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class UpdateAccessKeyRequest { 17 | 18 | @NotNull 19 | private Integer id; 20 | 21 | @NotBlank 22 | private String accessKeyId; 23 | 24 | @NotBlank 25 | private String accessKeySecret; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/VerifyWorkspaceRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | /*** 9 | * 验证工作空间code 10 | * @author niuxiangqian 11 | * @version 1.0 12 | * @since 2021/7/14 4:26 下午 13 | **/ 14 | @Data 15 | public class VerifyWorkspaceRequest { 16 | @NotBlank 17 | @ApiModelProperty(value = "工作空间code", required = true) 18 | private String code; 19 | } 20 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/Workspace.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 〈一句话功能简述〉
9 | * 〈〉 10 | * 11 | * @author 丁乾文 12 | * @date 2020/11/21 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class Workspace implements Serializable { 17 | 18 | private static final long serialVersionUID = 8313752582019183771L; 19 | 20 | private Integer id; 21 | 22 | private String name; 23 | 24 | private String code; 25 | 26 | /** 27 | * 当前登陆用户是否为工作空间管理 28 | */ 29 | private boolean isAdministration; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/BindMemberRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | import java.util.List; 7 | 8 | /** 9 | * 〈BindMemberRequest〉 10 | * 11 | * @author 丁乾文 12 | * @date 2021/6/23 4:30 下午 13 | * @since 1.0.0 14 | */ 15 | @Data 16 | public class BindMemberRequest { 17 | 18 | /** 19 | * 绑定的用户列表 20 | */ 21 | @NotNull 22 | private List userList; 23 | 24 | @NotNull 25 | private Integer workspaceId; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/DeleteMemberRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈DeleteMemberRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/23 5:30 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class DeleteMemberRequest { 16 | 17 | @NotNull 18 | private Integer workspaceId; 19 | 20 | @NotNull 21 | private Integer userId; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/ListWorkspaceMemberRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈WorkspaceMemberRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/23 10:43 上午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class ListWorkspaceMemberRequest { 16 | 17 | @NotNull 18 | private Integer workspaceId; 19 | 20 | /** 21 | * 查询管理,还是普通成员 22 | */ 23 | @NotNull 24 | private Integer type; 25 | 26 | /** 27 | * 用户名称 模糊查询 28 | */ 29 | private String userName; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/OptionalPersonnelRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈OptionalPersonnelRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/23 5:08 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class OptionalPersonnelRequest { 16 | 17 | private String username; 18 | 19 | /** 20 | * 排除掉此工作空间的用户 21 | */ 22 | @NotNull 23 | private Integer workspaceId; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/PermissionTransferRequest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | 7 | /** 8 | * 〈PermissionTransferRequest〉 9 | * 10 | * @author 丁乾文 11 | * @date 2021/6/23 7:43 下午 12 | * @since 1.0.0 13 | */ 14 | @Data 15 | public class PermissionTransferRequest { 16 | 17 | @NotNull 18 | private Integer workspaceId; 19 | 20 | @NotNull 21 | private Integer userId; 22 | 23 | @NotNull 24 | private Integer type; 25 | } 26 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/WorkspaceMember.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine.web.vo.workspace.member; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 〈WorkspaceMember〉 7 | * 8 | * @author 丁乾文 9 | * @date 2021/6/23 10:42 上午 10 | * @since 1.0.0 11 | */ 12 | @Data 13 | public class WorkspaceMember { 14 | 15 | private Integer userId; 16 | 17 | private String username; 18 | 19 | private String avatar; 20 | 21 | private String email; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: 3 | active: dev 4 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineConditionGroupConditionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | update rule_engine_condition_group_condition set order_no=order_no + 1 7 | where condition_group_id=#{toConditionGroupId} 8 | and order_no >= #{toOrderNo} 9 | 10 | 11 | 12 | update rule_engine_condition_group_condition set order_no=order_no - 1 13 | where condition_group_id=#{toConditionGroupId} 14 | and order_no <= #{toOrderNo} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineConditionGroupMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineConditionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineDataPermissionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineFunctionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineFunctionParamMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineFunctionValueMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineGeneralRuleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | update rule_engine_general_rule 7 | set abnormal_alarm=#{abnormalAlarm}, 8 | status=#{status}, 9 | default_action_type=#{defaultActionType}, 10 | default_action_value=#{defaultActionValue}, 11 | default_action_value_type=#{defaultActionValueType}, 12 | enable_default_action=#{enableDefaultAction}, 13 | current_version=#{currentVersion} 14 | where id=#{id} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineGeneralRulePublishMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineInputParameterMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineOperationRecordMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineRuleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | update rule_engine_rule 7 | set action_value=#{actionValue}, 8 | action_type=#{actionType}, 9 | action_value_type=#{actionValueType} 10 | where id=#{id} 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineSystemLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/main/resources/mapper/RuleEngineVariableMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rule-engine-open-web/src/test/java/cn/ruleengine/AppTest.java: -------------------------------------------------------------------------------- 1 | package cn.ruleengine; 2 | 3 | import static org.junit.Assert.assertTrue; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | { 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() 17 | { 18 | assertTrue( true ); 19 | } 20 | } 21 | --------------------------------------------------------------------------------