Browse Source

fix Property or field 'all' cannot be found (#7246)

3.0.0/version-upgrade
Kerwin 3 years ago committed by GitHub
parent
commit
4e6265df11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
  2. 10
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/WorkerGroupMapper.java

3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java

@ -771,4 +771,7 @@ public final class Constants {
*/
public static final int DRY_RUN_FLAG_NO = 0;
public static final int DRY_RUN_FLAG_YES = 1;
public static final String CACHE_KEY_VALUE_ALL = "'all'";
}

10
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/WorkerGroupMapper.java

@ -17,6 +17,8 @@
package org.apache.dolphinscheduler.dao.mapper;
import static org.apache.dolphinscheduler.common.Constants.CACHE_KEY_VALUE_ALL;
import org.apache.dolphinscheduler.dao.entity.WorkerGroup;
import org.apache.ibatis.annotations.Param;
@ -40,16 +42,16 @@ public interface WorkerGroupMapper extends BaseMapper<WorkerGroup> {
*
* @return worker group list
*/
@Cacheable(sync = true, key = "all")
@Cacheable(sync = true, key = CACHE_KEY_VALUE_ALL)
List<WorkerGroup> queryAllWorkerGroup();
@CacheEvict(key = "all")
@CacheEvict(key = CACHE_KEY_VALUE_ALL)
int deleteById(Integer id);
@CacheEvict(key = "all")
@CacheEvict(key = CACHE_KEY_VALUE_ALL)
int insert(WorkerGroup entity);
@CacheEvict(key = "all")
@CacheEvict(key = CACHE_KEY_VALUE_ALL)
int updateById(@Param("et") WorkerGroup entity);
/**

Loading…
Cancel
Save