Browse Source

Merge pull request #86 from qiaozhanwei/dev-20190415

viewVariables api update
pull/2/head
乔占卫 6 years ago committed by GitHub
parent
commit
7692b06246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessInstanceService.java
  2. 2
      escheduler-dao/src/main/java/cn/escheduler/dao/mapper/AccessTokenMapperProvider.java

7
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessInstanceService.java

@ -509,7 +509,7 @@ public class ProcessInstanceService extends BaseDAGService {
} }
// local params // local params
Map<String, List<Property>> localUserDefParams = new HashMap<>(); Map<String, Map<String,Object>> localUserDefParams = new HashMap<>();
for (TaskNode taskNode : taskNodeList) { for (TaskNode taskNode : taskNodeList) {
String parameter = taskNode.getParams(); String parameter = taskNode.getParams();
Map<String, String> map = JSONUtils.toMap(parameter); Map<String, String> map = JSONUtils.toMap(parameter);
@ -517,8 +517,11 @@ public class ProcessInstanceService extends BaseDAGService {
if (localParams != null && !localParams.isEmpty()) { if (localParams != null && !localParams.isEmpty()) {
localParams = ParameterUtils.convertParameterPlaceholders(localParams, timeParams); localParams = ParameterUtils.convertParameterPlaceholders(localParams, timeParams);
List<Property> localParamsList = JSON.parseArray(localParams, Property.class); List<Property> localParamsList = JSON.parseArray(localParams, Property.class);
Map<String,Object> localParamsMap = new HashMap<>();
localParamsMap.put("taskType",taskNode.getType());
localParamsMap.put("localParamsList",localParamsList);
if (localParamsList.size() > 0) { if (localParamsList.size() > 0) {
localUserDefParams.put(taskNode.getName(), localParamsList); localUserDefParams.put(taskNode.getName(), localParamsMap);
} }
} }

2
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/AccessTokenMapperProvider.java

@ -80,7 +80,7 @@ public class AccessTokenMapperProvider {
SET("`expire_time`=#{accessToken.expireTime}"); SET("`expire_time`=#{accessToken.expireTime}");
SET("`update_time`=#{accessToken.updateTime}"); SET("`update_time`=#{accessToken.updateTime}");
WHERE("`id`=#{user.id}"); WHERE("`id`=#{accessToken.id}");
} }
}.toString(); }.toString();
} }

Loading…
Cancel
Save