diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java index efc379e35b..605daef00b 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java @@ -27,6 +27,7 @@ import cn.escheduler.common.enums.UserType; import cn.escheduler.common.queue.ITaskQueue; import cn.escheduler.common.queue.TaskQueueFactory; import cn.escheduler.common.utils.DateUtils; +import cn.escheduler.dao.ProcessDao; import cn.escheduler.dao.entity.*; import cn.escheduler.dao.mapper.*; import org.apache.commons.lang3.StringUtils; @@ -67,6 +68,9 @@ public class DataAnalysisService { @Autowired TaskInstanceMapper taskInstanceMapper; + @Autowired + ProcessDao processDao; + /** * statistical task instance status data * @@ -179,8 +183,11 @@ public class DataAnalysisService { public Map countDefinitionByUser(User loginUser, int projectId) { Map result = new HashMap<>(); + + Integer[] projectIdArray = new Integer[1]; + projectIdArray[0] = projectId; List defineGroupByUsers = processDefinitionMapper.countDefinitionGroupByUser( - loginUser.getId(), loginUser.getUserType(), String.valueOf(projectId)); + loginUser.getId(), projectIdArray); DefineUserDto dto = new DefineUserDto(defineGroupByUsers); result.put(Constants.DATA_LIST, dto); @@ -252,8 +259,8 @@ public class DataAnalysisService { if(projectId !=0){ projectIds.add(projectId); }else if(loginUser.getUserType() == UserType.GENERAL_USER){ - List authedProjectList = projectMapper.queryAuthedProjectListByUserId(loginUser.getId()); - for(Project project : authedProjectList){ + List projects = processDao.getProjectListHavePerm(loginUser.getId()); + for(Project project : projects){ projectIds.add(project.getId()); } } @@ -385,9 +392,7 @@ public class DataAnalysisService { } if (tasksKillIds.length != 0){ - taskKillCount = taskInstanceMapper.countTask( - loginUser.getId(),loginUser.getUserType(),String.valueOf(projectId), - StringUtils.join(tasksKillIds, ",")); + taskKillCount = taskInstanceMapper.countTask(loginUser.getId(),loginUser.getUserType(),projectId, tasksKillIds); } diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java index dc03e4921c..4096e96f73 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/ProjectService.java @@ -368,7 +368,7 @@ public class ProjectService extends BaseService{ } /** - * query all project list + * query all project list that have one or more process definitions. * @return */ public Map queryAllProjectList() { diff --git a/escheduler-common/src/main/resources/zookeeper.properties b/escheduler-common/src/main/resources/zookeeper.properties index d69aa63dd7..a906c63766 100644 --- a/escheduler-common/src/main/resources/zookeeper.properties +++ b/escheduler-common/src/main/resources/zookeeper.properties @@ -1,5 +1,5 @@ #zookeeper cluster. multiple are separated by commas. eg. 192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181 -zookeeper.quorum=localhost:2181 +zookeeper.quorum=192.168.220.188:2181 #escheduler root directory zookeeper.escheduler.root=/escheduler diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/App.java b/escheduler-dao/src/main/java/cn/escheduler/dao/App.java new file mode 100644 index 0000000000..9534041ae6 --- /dev/null +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/App.java @@ -0,0 +1,11 @@ +package cn.escheduler.dao; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class App { + public static void main(String[] args){ + SpringApplication.run(App.class); + } +} diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java b/escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java index b46e5dada1..b88145687f 100644 --- a/escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java @@ -101,6 +101,9 @@ public class ProcessDao extends AbstractBaseDao { @Autowired private TenantMapper tenantMapper; + @Autowired + private ProjectMapper projectMapper; + /** * task queue impl */ @@ -1760,5 +1763,14 @@ public class ProcessDao extends AbstractBaseDao { return taskWorkerGroupId; } + public List getProjectListHavePerm(int userId){ + List createProjects = projectMapper.queryProjectCreatedByUser(userId); + List authedProjects = projectMapper.queryAuthedProjectListByUserId(userId); + + createProjects.addAll(authedProjects); + return createProjects; + + } + } diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/config/MybatisPlusConfig.java b/escheduler-dao/src/main/java/cn/escheduler/dao/config/MybatisPlusConfig.java new file mode 100644 index 0000000000..fa5723ba9d --- /dev/null +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/config/MybatisPlusConfig.java @@ -0,0 +1,17 @@ +package cn.escheduler.dao.config; + +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + + +@Configuration +@MapperScan("cn.escheduler.*.mapper") +public class MybatisPlusConfig { + @Bean + public PaginationInterceptor paginationInterceptor() { + return new PaginationInterceptor(); + } + +} \ No newline at end of file diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/config/YmlConfig.java b/escheduler-dao/src/main/java/cn/escheduler/dao/config/YmlConfig.java new file mode 100755 index 0000000000..c650fc2fe0 --- /dev/null +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/config/YmlConfig.java @@ -0,0 +1,59 @@ +package cn.escheduler.dao.config; + + + +import org.yaml.snakeyaml.*; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Created by qiaozhanwei on 2019/9/17. + */ +public class YmlConfig { + + private static Map allMap=new HashMap(); + static { + Yaml yaml = new Yaml(); + InputStream inputStream = YmlConfig.class.getResourceAsStream("/application.yml"); + Iterator result = yaml.loadAll(inputStream).iterator(); + while(result.hasNext()){ + Map map=(Map)result.next(); + iteratorYml( map,null); + } + } + + public static void main(String[] args) { + String ss = allMap.get("spring.datasource.url"); + System.out.println(ss); + } + + public static void iteratorYml(Map map,String key){ + Iterator iterator = map.entrySet().iterator(); + while(iterator.hasNext()){ + Map.Entry entry = (Map.Entry) iterator.next(); + Object key2 = entry.getKey(); + Object value = entry.getValue(); + if(value instanceof LinkedHashMap){ + if(key==null){ + iteratorYml((Map)value,key2.toString()); + }else{ + iteratorYml((Map)value,key+"."+key2.toString()); + } + } + if(value instanceof String){ + if(key==null){ + allMap.put(key2.toString(), value.toString()); + } + if(key!=null){ + allMap.put(key+"."+key2.toString(), value.toString()); + } + } + } + + } + +} diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProcessDefinitionMapper.java b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProcessDefinitionMapper.java index be9b04e443..58ea6da3fe 100644 --- a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProcessDefinitionMapper.java +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProcessDefinitionMapper.java @@ -44,7 +44,39 @@ public interface ProcessDefinitionMapper extends BaseMapper { List countDefinitionGroupByUser( @Param("userId") Integer userId, - @Param("userType") UserType userType, - @Param("projectIds") String projectIds); + @Param("projectIds") Integer[] projectIds); + /** + * update receivers and cc by definition id + * @param receivers + * @param receiversCc + * @param processDefinitionId + * @return + */ + @UpdateProvider(type = ProcessDefinitionMapperProvider.class, method = "updateReceiversAndCcById") + int updateReceiversAndCcById(@Param("receivers") String receivers, + @Param("receiversCc") String receiversCc, + @Param("processDefinitionId") int processDefinitionId); + + /** + * query all + * @return + */ + @Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER), + @Result(property = "name", column = "name", javaType = String.class, jdbcType = JdbcType.VARCHAR), + @Result(property = "version", column = "version", javaType = Integer.class, jdbcType = JdbcType.TINYINT), + @Result(property = "releaseState", column = "release_state", typeHandler = EnumOrdinalTypeHandler.class, javaType = ReleaseState.class, jdbcType = JdbcType.TINYINT), + @Result(property = "projectId", column = "project_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER), + @Result(property = "userId", column = "user_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER), + @Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR), + @Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE), + @Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE), + @Result(property = "flag", column = "flag", typeHandler = EnumOrdinalTypeHandler.class, javaType = Flag.class, jdbcType = JdbcType.TINYINT), + @Result(property = "userName", column = "user_name", javaType = String.class, jdbcType = JdbcType.VARCHAR), + @Result(property = "timeout", column = "timeout", javaType = Integer.class, jdbcType = JdbcType.INTEGER), + @Result(property = "tenantId", column = "tenant_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER), + @Result(property = "projectName", column = "project_name", javaType = String.class, jdbcType = JdbcType.VARCHAR) + }) + @SelectProvider(type = ProcessDefinitionMapperProvider.class, method = "queryAll") + List queryAll(); } diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProjectMapper.java b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProjectMapper.java index 0659e2e353..bd069f789e 100644 --- a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProjectMapper.java +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ProjectMapper.java @@ -17,6 +17,7 @@ package cn.escheduler.dao.mapper; import cn.escheduler.dao.entity.Project; +import com.amazonaws.services.dynamodbv2.model.transform.ProjectionJsonUnmarshaller; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Param; @@ -36,7 +37,7 @@ public interface ProjectMapper extends BaseMapper { IPage queryAllProjectListPaging(IPage page, @Param("searchName") String searchName); - List queryProjectCreatedByUser(@Param("userId") int userId); + List queryProjectCreatedByUser(@Param("userId") int userId); List queryAuthedProjectListByUserId(@Param("userId") int userId); diff --git a/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ResourceUserMapper.java b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ResourceUserMapper.java new file mode 100644 index 0000000000..bf74bda905 --- /dev/null +++ b/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ResourceUserMapper.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + +import cn.escheduler.dao.entity.ResourcesUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +public interface ResourceUserMapper extends BaseMapper { + + int deleteResourceUser(@Param("userId") int userId, + @Param("resourceId") int resourceId); + +} diff --git a/escheduler-dao/src/main/resources/application.yml b/escheduler-dao/src/main/resources/application.yml new file mode 100644 index 0000000000..1b8cd8f794 --- /dev/null +++ b/escheduler-dao/src/main/resources/application.yml @@ -0,0 +1,44 @@ +# mysql +spring: + datasource: + driver-class-name: org.postgresql.Driver +# driver-class-name: com.mysql.jdbc.Driver + url: jdbc:postgresql://192.168.220.154:5432/escheduler +# url: jdbc:mysql://192.168.220.188:3306/escheduler_new?useUnicode=true&characterEncoding=UTF-8 + username: root + password: root@123 +# platform: + continue-on-error: true + + +#mybatis +mybatis-plus: + mapper-locations: classpath*:/cn.escheduler.dao.mapper/*.xml + typeEnumsPackage: cn.escheduler.*.enums + #实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: cn.escheduler.dao.entity + global-config: + #数据库相关配置 + db-config: + #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; + id-type: AUTO + #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" + field-strategy: NOT_NULL + #驼峰下划线转换 + column-underline: true + logic-delete-value: -1 + logic-not-delete-value: 0 + banner: false + #原生配置 + configuration: + map-underscore-to-camel-case: true + cache-enabled: false + call-setters-on-nulls: true + jdbc-type-for-null: 'null' + + +# Logger Config +logging: + level: + cn.escheduler.dao: debug + diff --git a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ErrorCommandMapper.xml b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ErrorCommandMapper.xml index 775df6304c..70cbefc65a 100644 --- a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ErrorCommandMapper.xml +++ b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ErrorCommandMapper.xml @@ -5,7 +5,7 @@ select cmd.command_type as commandType, count(1) as count from t_escheduler_error_command cmd, t_escheduler_process_definition process where cmd.process_definition_id = process.id - + and process.project_id in #{i} diff --git a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessDefinitionMapper.xml b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessDefinitionMapper.xml index b187587205..5c4237115b 100644 --- a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessDefinitionMapper.xml +++ b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessDefinitionMapper.xml @@ -43,10 +43,13 @@ FROM t_escheduler_process_definition td JOIN t_escheduler_user tu on tu.id=td.user_id where 1 = 1 - - and td.project_id in (#{projectIds}) + + and td.project_id in + + #{i} + - group by td.user_id + group by td.user_id,tu.user_name diff --git a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml index fe605a7c93..49c71230ec 100644 --- a/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml +++ b/escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml @@ -56,7 +56,7 @@ from t_escheduler_project where flag=1 and user_id ]]> #{userId} - select * from t_escheduler_project where user_id = #{userId} diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/DataSourceUserMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/DataSourceUserMapperTest.java new file mode 100644 index 0000000000..e18854b254 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/DataSourceUserMapperTest.java @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import cn.escheduler.dao.entity.DatasourceUser; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.Date; +import java.util.List; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class DataSourceUserMapperTest { + + @Autowired + DataSourceUserMapper dataSourceUserMapper; + + + private DatasourceUser insertOne(){ + //insertOne + DatasourceUser dataSourceUser = new DatasourceUser(); + dataSourceUser.setUserId(4); + dataSourceUser.setDatasourceId(1010); + dataSourceUser.setPerm(7); + dataSourceUser.setUpdateTime(new Date()); + dataSourceUser.setCreateTime(new Date()); + return dataSourceUser; + } + + @Test + public void testUpdate(){ + //insertOne + DatasourceUser dataSourceUser = insertOne(); + //update + dataSourceUser.setUpdateTime(new Date()); + int update = dataSourceUserMapper.updateById(dataSourceUser); + Assert.assertEquals(update, 1); + dataSourceUserMapper.deleteById(dataSourceUser.getId()); + } + + @Test + public void testDelete(){ + + DatasourceUser dataSourceUser = insertOne(); + int delete = dataSourceUserMapper.deleteById(dataSourceUser.getId()); + Assert.assertEquals(delete, 1); + } + + @Test + public void testQuery() { + DatasourceUser dataSourceUser = insertOne(); + //query + List dataSources = dataSourceUserMapper.selectList(null); + Assert.assertNotEquals(dataSources.size(), 0); + dataSourceUserMapper.deleteById(dataSourceUser.getId()); + } + + @Test + public void testDeleteByUserId() { + DatasourceUser dataSourceUser = insertOne(); + int delete = dataSourceUserMapper.deleteByUserId(dataSourceUser.getUserId()); + Assert.assertNotEquals(delete, 0); + } + + @Test + public void testDeleteByDatasourceId() { + DatasourceUser dataSourceUser = insertOne(); + int delete = dataSourceUserMapper.deleteByDatasourceId(dataSourceUser.getDatasourceId()); + Assert.assertNotEquals(delete, 0); + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ErrorCommandMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ErrorCommandMapperTest.java new file mode 100644 index 0000000000..9bd9aba125 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ErrorCommandMapperTest.java @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import cn.escheduler.common.enums.CommandType; +import cn.escheduler.dao.entity.CommandCount; +import cn.escheduler.dao.entity.ErrorCommand; +import cn.escheduler.dao.entity.ProcessDefinition; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.Date; +import java.util.List; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ErrorCommandMapperTest { + + @Autowired + ErrorCommandMapper errorCommandMapper; + + @Autowired + ProcessDefinitionMapper processDefinitionMapper; + + + private ErrorCommand insertOne(){ + //insertOne + ErrorCommand errorCommand = new ErrorCommand(); + errorCommand.setId(10101); + errorCommand.setCommandType(CommandType.START_PROCESS); + errorCommand.setUpdateTime(new Date()); + errorCommand.setStartTime(new Date()); + errorCommandMapper.insert(errorCommand); + return errorCommand; + } + + @Test + public void testUpdate(){ + //insertOne + ErrorCommand errorCommand = insertOne(); + //update + errorCommand.setUpdateTime(new Date()); + int update = errorCommandMapper.updateById(errorCommand); + Assert.assertEquals(update, 1); + errorCommandMapper.deleteById(errorCommand.getId()); + } + + @Test + public void testDelete(){ + + ErrorCommand errorCommand = insertOne(); + int delete = errorCommandMapper.deleteById(errorCommand.getId()); + Assert.assertEquals(delete, 1); + } + + @Test + public void testQuery() { + errorCommandMapper.delete(null); + + ErrorCommand errorCommand = insertOne(); + + ProcessDefinition processDefinition = new ProcessDefinition(); + processDefinition.setName("def 1"); + processDefinition.setProjectId(1010); + processDefinition.setUserId(101); + processDefinition.setUpdateTime(new Date()); + processDefinition.setCreateTime(new Date()); + processDefinitionMapper.insert(processDefinition); + + errorCommand.setProcessDefinitionId(processDefinition.getId()); + errorCommandMapper.updateById(errorCommand); + + + List commandCounts = errorCommandMapper.countCommandState( + null, + null, + new Integer[0] + ); + + Integer[] projectIdArray = new Integer[2]; + projectIdArray[0] = processDefinition.getProjectId(); + projectIdArray[1] = 200; + List commandCounts2 = errorCommandMapper.countCommandState( + null, + null, + projectIdArray + ); + + errorCommandMapper.deleteById(errorCommand.getId()); + processDefinitionMapper.deleteById(processDefinition.getId()); + Assert.assertNotEquals(commandCounts.size(), 0); + Assert.assertNotEquals(commandCounts2.size(), 0); + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessDefinitionMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessDefinitionMapperTest.java index cf3c989c2a..221adde707 100644 --- a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessDefinitionMapperTest.java +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessDefinitionMapperTest.java @@ -172,5 +172,28 @@ public class ProcessDefinitionMapperTest { @Test public void testCountDefinitionGroupByUser() { + + User user= new User(); + user.setUserName("user1"); + user.setUserPassword("1"); + user.setEmail("xx@123.com"); + user.setUserType(UserType.GENERAL_USER); + user.setCreateTime(new Date()); + user.setTenantId(1); + user.setUpdateTime(new Date()); + userMapper.insert(user); + + ProcessDefinition processDefinition = insertOne(); + processDefinition.setUserId(user.getId()); + processDefinitionMapper.updateById(processDefinition); + + Integer[] projectIds = new Integer[1]; + projectIds[0] = processDefinition.getProjectId(); + List processDefinitions = processDefinitionMapper.countDefinitionGroupByUser( + processDefinition.getUserId(), + projectIds + ); + processDefinitionMapper.deleteById(processDefinition.getId()); + Assert.assertNotEquals(processDefinitions.size(), 0); } } \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapMapperTest.java new file mode 100644 index 0000000000..962e5b60f1 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapMapperTest.java @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import cn.escheduler.dao.entity.ProcessDefinition; +import cn.escheduler.dao.entity.ProcessInstanceMap; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.Date; +import java.util.List; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ProcessInstanceMapMapperTest { + + + @Autowired + ProcessInstanceMapMapper processInstanceMapMapper; + + + private ProcessInstanceMap insertOne(){ + //insertOne + ProcessInstanceMap processInstanceMap = new ProcessInstanceMap(); + processInstanceMap.setProcessInstanceId(0); + processInstanceMap.setParentTaskInstanceId(0); + processInstanceMap.setParentProcessInstanceId(0); + processInstanceMapMapper.insert(processInstanceMap); + return processInstanceMap; + } + + @Test + public void testUpdate(){ + //insertOne + ProcessInstanceMap processInstanceMap = insertOne(); + //update + processInstanceMap.setParentProcessInstanceId(1); + int update = processInstanceMapMapper.updateById(processInstanceMap); + Assert.assertEquals(update, 1); + processInstanceMapMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testDelete(){ + ProcessInstanceMap processInstanceMap = insertOne(); + int delete = processInstanceMapMapper.deleteById(processInstanceMap.getId()); + Assert.assertEquals(delete, 1); + } + + @Test + public void testQuery() { + ProcessInstanceMap processInstanceMap = insertOne(); + //query + List dataSources = processInstanceMapMapper.selectList(null); + Assert.assertNotEquals(dataSources.size(), 0); + processInstanceMapMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testQueryByParentId() { + ProcessInstanceMap processInstanceMap = insertOne(); + + processInstanceMap.setParentProcessInstanceId(100); + processInstanceMapMapper.updateById(processInstanceMap); + ProcessInstanceMap map = + processInstanceMapMapper.queryByParentId(processInstanceMap.getParentProcessInstanceId(), processInstanceMap.getParentTaskInstanceId()); + Assert.assertNotEquals(map, null); + + + processInstanceMapMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testQueryBySubProcessId() { + ProcessInstanceMap processInstanceMap = insertOne(); + + processInstanceMap.setProcessInstanceId(100); + processInstanceMapMapper.updateById(processInstanceMap); + ProcessInstanceMap map = + processInstanceMapMapper.queryBySubProcessId( + processInstanceMap.getProcessInstanceId() ); + Assert.assertNotEquals(map, null); + + processInstanceMapMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testDeleteByParentProcessId() { + ProcessInstanceMap processInstanceMap = insertOne(); + + processInstanceMap.setParentProcessInstanceId(100); + processInstanceMapMapper.updateById(processInstanceMap); + int delete = processInstanceMapMapper.deleteByParentProcessId( + processInstanceMap.getParentProcessInstanceId() + ); + Assert.assertEquals(delete, 1); + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapperTest.java new file mode 100644 index 0000000000..b79157f357 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapperTest.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import cn.escheduler.dao.entity.ProcessInstance; +import cn.escheduler.dao.entity.ProcessInstanceMap; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ProcessInstanceMapperTest { + + + @Autowired + ProcessInstanceMapper processInstanceMapper; + + + private ProcessInstance insertOne(){ + //insertOne + ProcessInstance processInstanceMap = new ProcessInstance(); + processInstanceMapper.insert(processInstanceMap); + return processInstanceMap; + } + + @Test + public void testUpdate(){ + //insertOne + ProcessInstance processInstanceMap = insertOne(); + //update + int update = processInstanceMapper.updateById(processInstanceMap); + Assert.assertEquals(update, 1); + processInstanceMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testDelete(){ + ProcessInstance processInstanceMap = insertOne(); + int delete = processInstanceMapper.deleteById(processInstanceMap.getId()); + Assert.assertEquals(delete, 1); + } + + @Test + public void testQuery() { + ProcessInstance processInstanceMap = insertOne(); + //query + List dataSources = processInstanceMapper.selectList(null); + Assert.assertNotEquals(dataSources.size(), 0); + processInstanceMapper.deleteById(processInstanceMap.getId()); + } + + @Test + public void testQueryDetailById() { + } + + @Test + public void testQueryByHostAndStatus() { + } + + @Test + public void testQueryProcessInstanceListPaging() { + } + + @Test + public void testSetFailoverByHostAndStateArray() { + } + + @Test + public void testUpdateProcessInstanceByState() { + } + + @Test + public void testQueryByTaskId() { + } + + @Test + public void testCountInstanceStateByUser() { + } + + @Test + public void testQuerySubIdListByParentId() { + } + + @Test + public void testQueryByProcessDefineId() { + } + + @Test + public void testQueryByScheduleTime() { + } + + @Test + public void testQueryLastSchedulerProcess() { + } + + @Test + public void testQueryLastRunningProcess() { + } + + @Test + public void testQueryLastManualProcess() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectMapperTest.java new file mode 100644 index 0000000000..cf23e8101c --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectMapperTest.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ProjectMapperTest { + + @Test + public void testQueryDetailById() { + } + + @Test + public void testQueryProjectByName() { + } + + @Test + public void testQueryProjectListPaging() { + } + + @Test + public void testQueryAllProjectListPaging() { + } + + @Test + public void testQueryProjectCreatedByUser() { + } + + @Test + public void testQueryAuthedProjectListByUserId() { + } + + @Test + public void testQueryProjectExceptUserId() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectUserMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectUserMapperTest.java new file mode 100644 index 0000000000..c3bb03cfc4 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectUserMapperTest.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ProjectUserMapperTest { + + @Test + public void testDeleteProjectRelation() { + } + + @Test + public void testQueryProjectRelation() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/QueueMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/QueueMapperTest.java new file mode 100644 index 0000000000..4f05b2da5b --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/QueueMapperTest.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class QueueMapperTest { + + @Test + public void testQueryQueuePaging() { + } + + @Test + public void testQueryByQueue() { + } + + @Test + public void testQueryByQueueName() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceMapperTest.java new file mode 100644 index 0000000000..34c0e26918 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceMapperTest.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ResourceMapperTest { + + @Test + public void testQueryResourceList() { + } + + @Test + public void testQueryResourcePaging() { + } + + @Test + public void testQueryResourceListAuthored() { + } + + @Test + public void testQueryAuthorizedResourceList() { + } + + @Test + public void testQueryResourceExceptUserId() { + } + + @Test + public void testQueryTenantCodeByResourceName() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceUserMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceUserMapperTest.java new file mode 100644 index 0000000000..33aa922f1c --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceUserMapperTest.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ResourceUserMapperTest { + + @Test + public void testDeleteResourceUser() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ScheduleMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ScheduleMapperTest.java new file mode 100644 index 0000000000..3f7dbd9c8c --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ScheduleMapperTest.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ScheduleMapperTest { + + @Test + public void testQueryByProcessDefineIdPaging() { + } + + @Test + public void testQuerySchedulerListByProjectName() { + } + + @Test + public void testSelectAllByProcessDefineArray() { + } + + @Test + public void testQueryByProcessDefinitionId() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/SessionMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/SessionMapperTest.java new file mode 100644 index 0000000000..7732235c1f --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/SessionMapperTest.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class SessionMapperTest { + + @Test + public void testQueryByUserId() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/TaskInstanceMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/TaskInstanceMapperTest.java new file mode 100644 index 0000000000..b227c1194e --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/TaskInstanceMapperTest.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class TaskInstanceMapperTest { + + @Test + public void testQueryTaskByProcessIdAndState() { + } + + @Test + public void testQueryById() { + } + + @Test + public void testFindValidTaskListByProcessId() { + } + + @Test + public void testQueryByHostAndStatus() { + } + + @Test + public void testSetFailoverByHostAndStateArray() { + } + + @Test + public void testQueryByInstanceIdAndName() { + } + + @Test + public void testCountTask() { + } + + @Test + public void testCountTaskInstanceStateByUser() { + } + + @Test + public void testQueryTaskInstanceListPaging() { + } +} \ No newline at end of file diff --git a/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/UDFUserMapperTest.java b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/UDFUserMapperTest.java new file mode 100644 index 0000000000..a49a5913f3 --- /dev/null +++ b/escheduler-dao/src/test/java/cn/escheduler/dao/mapper/UDFUserMapperTest.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.escheduler.dao.mapper; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class UDFUserMapperTest { + + @Test + public void testDeleteByUserId() { + } + + @Test + public void testDeleteByUdfFuncId() { + } +} \ No newline at end of file