Commit 785a3662 by tiger

解决冲突

1 parent 072eb612
...@@ -109,10 +109,8 @@ public class SopInstNodeExecuteJobHandler { ...@@ -109,10 +109,8 @@ public class SopInstNodeExecuteJobHandler {
// 执行sop节点 // 执行sop节点
ExecuteStruct result = instance.execute(sop, node); ExecuteStruct result = instance.execute(sop, node);
//更新节点批次快照信息
updateBatch(sop, node, result); updateBatch(sop, node, result);
// 更新下个节点信息
updateNextNodes(sop, node); updateNextNodes(sop, node);
} catch (Exception e) { } catch (Exception e) {
...@@ -133,7 +131,7 @@ public class SopInstNodeExecuteJobHandler { ...@@ -133,7 +131,7 @@ public class SopInstNodeExecuteJobHandler {
private void updateBatch(SopStruct sop, SopInstNode node, ExecuteStruct result) { private void updateBatch(SopStruct sop, SopInstNode node, ExecuteStruct result) {
SopInstNodeBatch nodeBatch = sop.getNodeBatch(); SopInstNodeBatch nodeBatch = sop.getNodeBatch();
nodeBatch.setSnapshot(JSONUtil.toJsonStr(result)); nodeBatch.setSnapshot(JSONUtil.toJsonStr(result));// TODO 这里需要考虑合并结果
nodeBatch.setUpdateTime(new Date()); nodeBatch.setUpdateTime(new Date());
sopService.updateInstNodeBatch(nodeBatch); sopService.updateInstNodeBatch(nodeBatch);
} }
......
...@@ -3,7 +3,6 @@ package cn.com.glsx.process.modules.sop.execute.executor; ...@@ -3,7 +3,6 @@ package cn.com.glsx.process.modules.sop.execute.executor;
import javax.annotation.Resource; import javax.annotation.Resource;
import cn.com.glsx.process.common.constant.Constants;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.com.glsx.process.modules.entity.SopInstNode; import cn.com.glsx.process.modules.entity.SopInstNode;
...@@ -15,8 +14,6 @@ import cn.hutool.json.JSONObject; ...@@ -15,8 +14,6 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Map;
/** /**
* 开始节点: * 开始节点:
* 1.从SopInst提取初始化参数; * 1.从SopInst提取初始化参数;
...@@ -35,14 +32,16 @@ public class StartExecutor implements SopNodeExecutor { ...@@ -35,14 +32,16 @@ public class StartExecutor implements SopNodeExecutor {
@Override @Override
public ExecuteStruct execute(SopStruct sop, SopInstNode node) throws Exception { public ExecuteStruct execute(SopStruct sop, SopInstNode node) throws Exception {
ExecuteStruct executeStruct = prepare(sop, node);
Map<String, Object> resultMap = executeStruct.getResultMap(); ExecuteStruct executeStruct = prepare(sop, node);
resultMap.put(Constants.RES_KEY, Constants.RES_SUCCESS);
return executeStruct; return executeStruct;
} }
public void updateBatch() {
}
public static void main(String[] args) { public static void main(String[] args) {
String json = "{\"merchantId\":{\"paramName\":\"merchantId\",\"paramDesc\":\"门店id,分配给门店时需要赋值\",\"valueType\":\"String\",\"defaultValue\":\"\",\"required\":true},\"stages\":{\"paramName\":\"stages\",\"paramDesc\":\"旅程阶段,值类型为Json\",\"valueType\":\"Json\",\"defaultValue\":{\"stage1\":{\"value\":\"潜客\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage2\":{\"value\":\"高意向\",\"editable\":true,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage3\":{\"value\":\"下单\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage4\":{\"value\":\"战败\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]}},\"required\":true},\"users\":{\"paramName\":\"users\",\"paramDesc\":\"通过膨胀金活动导入的用户信息\",\"valueType\":\"Json\",\"defaultValue\":{\"u0001\":{\"userId\":\"u0001\",\"userName\":\"张三\",\"followId\":\"跟进人id1\",\"textContent\":\"文案内容:尊敬的${userName},优惠券领取url.cn/dE32C1Ab7\"},\"u0002\":{\"userId\":\"u0002\",\"userName\":\"李四\",\"followId\":\"跟进人id2\",\"textContent\":\"文案内容:尊敬的${userName},优惠券领取url.cn/dE32C1Ab7\"}},\"required\":true}}"; String json = "{\"merchantId\":{\"paramName\":\"merchantId\",\"paramDesc\":\"门店id,分配给门店时需要赋值\",\"valueType\":\"String\",\"defaultValue\":\"\",\"required\":true},\"stages\":{\"paramName\":\"stages\",\"paramDesc\":\"旅程阶段,值类型为Json\",\"valueType\":\"Json\",\"defaultValue\":{\"stage1\":{\"value\":\"潜客\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage2\":{\"value\":\"高意向\",\"editable\":true,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage3\":{\"value\":\"下单\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]},\"stage4\":{\"value\":\"战败\",\"editable\":false,\"conditions\":[\"链接(#膨胀金活动名称#) 反馈\",\"链接(#膨胀金活动名称#) 反馈\"]}},\"required\":true},\"users\":{\"paramName\":\"users\",\"paramDesc\":\"通过膨胀金活动导入的用户信息\",\"valueType\":\"Json\",\"defaultValue\":{\"u0001\":{\"userId\":\"u0001\",\"userName\":\"张三\",\"followId\":\"跟进人id1\",\"textContent\":\"文案内容:尊敬的${userName},优惠券领取url.cn/dE32C1Ab7\"},\"u0002\":{\"userId\":\"u0002\",\"userName\":\"李四\",\"followId\":\"跟进人id2\",\"textContent\":\"文案内容:尊敬的${userName},优惠券领取url.cn/dE32C1Ab7\"}},\"required\":true}}";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!