Browse Source

fix update udf database not change and create time is changed (#1076)

* rename from DatasourceUserMapper to DataSourceUserMapper

* add unit test in UserMapper and WorkerGroupMapper

* change cn.escheduler to org.apache.dolphinscheduler

* add unit test in UdfFuncMapperTest

* add unit test in UdfFuncMapperTest

* remove DatabaseConfiguration

* add ConnectionFactoryTest

* cal duration in processInstancesList

* change desc to description

* change table name in mysql ddl

* change table name in mysql ddl

* change escheduler to dolphinscheduler

* change escheduler to dolphinscheduler

* change escheduler to dolphinscheduler

* remove log4j-1.2-api and modify AlertMapperTest

* remove log4j-1.2-api

* Add alertDao to spring management

* Add alertDao to spring management

* get SqlSessionFactory from MybatisSqlSessionFactoryBean

* get processDao by DaoFactory

* read druid properties in ConneciontFactory

* read druid properties in ConneciontFactory

* change get alertDao by spring to DaoFactory

* add log4j to resolve #967

* resole verify udf name error and delete udf error

* Determine if principal is empty

* Determine whether the logon user has the right to delete the project

* Fixed an issue that produced attatch file named such as ATT00002.bin

* fix too many connection in upgrade or create

* fix NEED_FAULT_TOLERANCE and WAITTING_THREAD count fail

* Added a judgment on whether the currently login user is an administrator

* fix update udf database not change and create time is changed
pull/2/head
lgcareer 5 years ago committed by bao liang
parent
commit
006fad4e55
  1. 8
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java
  2. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java

8
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java

@ -112,7 +112,7 @@ public class UdfFuncService extends BaseService{
if (StringUtils.isNotEmpty(argTypes)) {
udf.setArgTypes(argTypes);
}
if (StringUtils.isNotEmpty(argTypes)) {
if (StringUtils.isNotEmpty(database)) {
udf.setDatabase(database);
}
udf.setDescription(desc);
@ -214,19 +214,13 @@ public class UdfFuncService extends BaseService{
Date now = new Date();
udf.setFuncName(funcName);
udf.setClassName(className);
if (StringUtils.isNotEmpty(argTypes)) {
udf.setArgTypes(argTypes);
}
if (StringUtils.isNotEmpty(argTypes)) {
udf.setDatabase(database);
}
udf.setDescription(desc);
udf.setResourceId(resourceId);
udf.setResourceName(resource.getAlias());
udf.setType(type);
udf.setCreateTime(now);
udf.setUpdateTime(now);
udfFuncMapper.updateById(udf);

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java

@ -623,7 +623,7 @@ public class UsersService extends BaseService {
return result;
}
List<User> userList = userMapper.selectList(null);
List<User> userList = userMapper.queryAllGeneralUser();
List<User> resultUsers = new ArrayList<>();
Set<User> userSet = null;
if (userList != null && userList.size() > 0) {

Loading…
Cancel
Save