Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c638a358
authored
Sep 21, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]执行器处理
1 parent
677699eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
331 additions
and
69 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/sop/CustomerInfo.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/SopExecutorResult.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/SopHelper.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/JavaExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerDisTasksDemo.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerFoundInsDemo.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerHttpDemo.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerRopHttpDemo.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerScreenPersonDemo.java
platform-process/src/test/java/cn/com/glsx/test/JavaNodeTestApplication.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/CustomerInfo.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
CustomerInfo
{
private
String
orgId
;
private
String
oneId
;
private
String
customerName
;
private
String
customerPhone
;
private
String
sopJourneyId
;
private
Date
sopJourneyEnterTime
;
private
String
sop_journey_stage
;
private
Date
sopJourneyStageEnterTime
;
private
String
followStaffUuid
;
private
String
messageContent
;
private
String
messageId
;
private
String
talkId
;
private
String
vin
;
}
platform-process/src/main/java/cn/com/glsx/process/modules/sop/SopExecutorResult.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
lombok.Data
;
import
java.util.Map
;
@Data
public
class
SopExecutorResult
{
private
SopInst
sopInst
;
private
SopInstNode
sopInstNode
;
private
Map
<
String
,
Object
>
resultData
;
public
SopExecutorResult
(
SopInst
sopInst
,
SopInstNode
sopInstNode
,
Map
<
String
,
Object
>
resultData
)
{
this
.
sopInst
=
sopInst
;
this
.
sopInstNode
=
sopInstNode
;
this
.
resultData
=
resultData
;
}
public
SopExecutorResult
()
{
}
}
platform-process/src/main/java/cn/com/glsx/process/modules/sop/SopHelper.java
View file @
c638a35
This diff is collapsed.
Click to expand it.
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/executor/JavaExecutor.java
View file @
c638a35
...
@@ -33,26 +33,20 @@ public class JavaExecutor implements SopNodeExecutor {
...
@@ -33,26 +33,20 @@ public class JavaExecutor implements SopNodeExecutor {
// 获取实例快照,传给处理器
// 获取实例快照,传给处理器
SopInst
inst
=
sop
.
getInst
();
SopInst
inst
=
sop
.
getInst
();
String
instSnapshot
=
inst
.
getInstSnapshot
();
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
// 实例信息
jsonObject
.
put
(
"sopInst"
,
inst
);
// 节点信息
// 节点信息
jsonObject
.
put
(
"sopId"
,
inst
.
getInstId
());
jsonObject
.
put
(
"sopInstNode"
,
node
);
jsonObject
.
put
(
"sopName"
,
inst
.
getInstName
());
jsonObject
.
put
(
"nodeId"
,
node
.
getNodeId
());
jsonObject
.
put
(
"nodeName"
,
node
.
getNodeName
());
// 节点入参
jsonObject
.
put
(
"nodeData"
,
node
.
getNodeParam
());
// 实例快照
// 实例快照
jsonObject
.
put
(
"instSnapshot"
,
instSnapshot
);
jsonObject
.
put
(
"instSnapshot"
,
executeStruct
.
getResultMap
()
);
Object
instance
=
de
.
execute
(
"Controller"
,
javacode
,
"execute"
,
new
Class
[]
{
JSON
.
class
},
new
Object
[]
{
jsonObject
});
Object
instance
=
de
.
execute
(
"Controller"
,
javacode
,
"execute"
,
new
Class
[]
{
JSON
.
class
},
new
Object
[]
{
jsonObject
});
// 处理返回结果
// 处理返回结果
return
instance
;
return
instance
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
null
;
return
null
;
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerDisTasksDemo.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
java
.
example
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.sop.CustomerInfo
;
import
cn.com.glsx.process.modules.sop.SopExecutorResult
;
import
cn.com.glsx.process.modules.sop.SopHelper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* java执行器使用demo,rop请求,类名Controller,方法名execute
* 1.下发门店助手任务
*/
public
class
ControllerDisTasksDemo
{
private
final
static
String
baseurl
=
"http://scrm.dev.glsx.com.cn/rop-scrm-stoassistant/router"
;
private
final
static
String
method
=
"scrm.api.sop.marketing.task.customer"
;
public
static
JSON
execute
(
JSON
param
)
{
// 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中
Object
post
=
null
;
MultiValueMap
<
String
,
String
>
multiValueMap
=
new
LinkedMultiValueMap
<>();
SopExecutorResult
excustorParam
=
SopHelper
.
getExcustorParam
(
param
);
Map
<
String
,
Object
>
resultData
=
excustorParam
.
getResultData
();
SopInst
sopInst
=
excustorParam
.
getSopInst
();
SopInstNode
sopInstNode
=
excustorParam
.
getSopInstNode
();
String
nodeParam
=
sopInstNode
.
getNodeParam
();
List
<
CustomerInfo
>
customerInfoList
=
SopHelper
.
getMeetWithCustomer
(
sopInstNode
,
resultData
);
// 营销的客户存在执行任务下发
if
(
CollectionUtils
.
isNotEmpty
(
customerInfoList
))
{
String
instSnapshot
=
sopInst
.
getInstSnapshot
();
multiValueMap
.
add
(
"requestList[0].activityId"
,
SopHelper
.
getValueFromJsonString
(
instSnapshot
,
"activityId"
));
multiValueMap
.
add
(
"requestList[0].nodeId"
,
sopInstNode
.
getNodeId
()
+
""
);
multiValueMap
.
add
(
"requestList[0].nodeName"
,
sopInstNode
.
getNodeName
());
multiValueMap
.
add
(
"requestList[0].stageId"
,
SopHelper
.
getValueFromJsonString
(
nodeParam
,
"stage"
));
multiValueMap
.
add
(
"requestList[0].stageName"
,
SopHelper
.
getValueFromJsonString
(
nodeParam
,
"stage"
));
multiValueMap
.
add
(
"requestList[0].taskId"
,
sopInst
.
getInstId
());
multiValueMap
.
add
(
"requestList[0].taskName"
,
sopInst
.
getInstName
());
multiValueMap
.
add
(
"requestList[0].taskType"
,
SopHelper
.
getValueFromJsonString
(
nodeParam
,
"taskType"
));
for
(
int
i
=
0
;
i
<
customerInfoList
.
size
();
i
++)
{
CustomerInfo
customerInfo
=
customerInfoList
.
get
(
i
);
multiValueMap
.
add
(
"requestList["
+
i
+
"].customerId"
,
customerInfo
.
getOneId
());
multiValueMap
.
add
(
"requestList["
+
i
+
"].followStaffUuid"
,
customerInfo
.
getFollowStaffUuid
());
multiValueMap
.
add
(
"requestList["
+
i
+
"].messageContent"
,
customerInfo
.
getMessageContent
());
multiValueMap
.
add
(
"requestList["
+
i
+
"].messageId"
,
customerInfo
.
getMessageId
());
multiValueMap
.
add
(
"requestList["
+
i
+
"].talkId"
,
customerInfo
.
getTalkId
());
}
try
{
post
=
SopHelper
.
post
(
multiValueMap
,
Object
.
class
,
baseurl
,
method
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
return
(
JSONObject
)
JSONObject
.
toJSON
(
post
);
}
return
null
;
}
}
\ No newline at end of file
\ No newline at end of file
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerFoundInsDemo.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
java
.
example
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.sop.CustomerInfo
;
import
cn.com.glsx.process.modules.sop.SopExecutorResult
;
import
cn.com.glsx.process.modules.sop.SopHelper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* java执行器使用demo,rop请求,类名Controller,方法名execute
* 查询到保日期
*/
public
class
ControllerFoundInsDemo
{
private
final
static
String
baseurl
=
"http://scrm.dev.glsx.com.cn/rop-scrm-stoassistant/router"
;
private
final
static
String
method
=
"marketing.api.supermarket.customers.page"
;
public
static
JSON
execute
(
JSON
param
)
{
// 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中
Object
post
=
null
;
MultiValueMap
<
String
,
String
>
multiValueMap
=
new
LinkedMultiValueMap
<>();
SopExecutorResult
excustorParam
=
SopHelper
.
getExcustorParam
(
param
);
Map
<
String
,
Object
>
resultData
=
excustorParam
.
getResultData
();
SopInstNode
sopInstNode
=
excustorParam
.
getSopInstNode
();
List
<
CustomerInfo
>
customerInfoList
=
SopHelper
.
getMeetWithCustomer
(
sopInstNode
,
resultData
);
if
(
CollectionUtils
.
isNotEmpty
(
customerInfoList
))
{
List
<
String
>
collect
=
customerInfoList
.
stream
().
filter
(
index
->
StringUtils
.
isNotEmpty
(
index
.
getVin
())).
map
(
CustomerInfo:
:
getVin
).
collect
(
Collectors
.
toList
());
try
{
multiValueMap
.
put
(
"vins"
,
collect
);
post
=
SopHelper
.
post
(
multiValueMap
,
Object
.
class
,
baseurl
,
method
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
return
(
JSONObject
)
JSONObject
.
toJSON
(
post
);
}
}
\ No newline at end of file
\ No newline at end of file
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerHttpDemo.java
View file @
c638a35
...
@@ -7,7 +7,8 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -7,7 +7,8 @@ import com.alibaba.fastjson.JSONObject;
/**
/**
* java执行器使用demo,http请求,类名Controller,方法名execute
* java执行器使用demo,http请求,类名Controller,方法名execute
* TODO 1.推送客户行为数据
* 隐藏任务跑sql
*
*/
*/
public
class
ControllerHttpDemo
{
public
class
ControllerHttpDemo
{
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerRopHttpDemo.java
deleted
100644 → 0
View file @
677699e
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
java
.
example
;
import
cn.com.glsx.process.modules.sop.SopHelper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
/**
* java执行器使用demo,rop请求,类名Controller,方法名execute
* TODO 1.下发门店助手任务
* TODO 2.查询到保日期
*/
public
class
ControllerRopHttpDemo
{
private
final
static
String
baseurl
=
"http://rop-merchant.test.glsx.com.cn/rop-merchants/router"
;
private
final
static
String
method
=
"merchants.api.open.findStaffListByMerchantNo"
;
public
static
JSON
execute
(
JSON
param
)
{
// 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中
Object
post
=
null
;
JSONObject
jsonObject
=
(
JSONObject
)
param
;
String
nodeData
=
jsonObject
.
get
(
"nodeData"
)
+
""
;
String
instSnapshot
=
jsonObject
.
get
(
"instSnapshot"
)
+
""
;
String
sopId
=
jsonObject
.
get
(
"sopId"
)
+
""
;
String
sopName
=
jsonObject
.
get
(
"sopName"
)
+
""
;
String
nodeId
=
jsonObject
.
get
(
"nodeId"
)
+
""
;
String
nodeName
=
jsonObject
.
get
(
"nodeName"
)
+
""
;
// TODO 组装任务需要的参数
JSONObject
instSnapshotData
=
JSONObject
.
parseObject
(
instSnapshot
);
//
MultiValueMap
<
String
,
String
>
multiValueMap
=
new
LinkedMultiValueMap
<>();
for
(
Object
key
:
jsonObject
.
keySet
())
{
String
keyString
=
(
String
)
key
;
String
value
=
(
String
)
jsonObject
.
get
(
key
);
multiValueMap
.
add
(
keyString
,
value
);
}
try
{
post
=
SopHelper
.
post
(
multiValueMap
,
Object
.
class
,
baseurl
,
method
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
return
(
JSONObject
)
JSONObject
.
toJSON
(
post
);
}
}
\ No newline at end of file
\ No newline at end of file
platform-process/src/main/java/cn/com/glsx/process/modules/sop/java/example/ControllerScreenPersonDemo.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
process
.
modules
.
sop
.
java
.
example
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.sop.CustomerInfo
;
import
cn.com.glsx.process.modules.sop.SopExecutorResult
;
import
cn.com.glsx.process.modules.sop.SopHelper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* java执行器使用demo,http请求,类名Controller,方法名execute
* 筛选客户
*/
public
class
ControllerScreenPersonDemo
{
public
static
JSON
execute
(
JSON
param
)
{
SopExecutorResult
excustorParam
=
SopHelper
.
getExcustorParam
(
param
);
SopInstNode
sopInstNode
=
excustorParam
.
getSopInstNode
();
String
nodeParam
=
sopInstNode
.
getNodeParam
();
String
stage
=
SopHelper
.
getValueFromJsonString
(
nodeParam
,
"stage"
);
Map
<
String
,
Object
>
resultData
=
excustorParam
.
getResultData
();
List
<
CustomerInfo
>
customerInfoList
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
resultData
.
get
(
"users"
)),
CustomerInfo
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
customerInfoList
))
{
List
<
CustomerInfo
>
collect
=
customerInfoList
.
stream
().
filter
(
index
->
stage
.
equals
(
index
.
getSop_journey_stage
())).
collect
(
Collectors
.
toList
());
return
(
JSONArray
)
JSONObject
.
toJSON
(
collect
);
}
return
null
;
}
}
\ No newline at end of file
\ No newline at end of file
platform-process/src/test/java/cn/com/glsx/test/JavaNodeTestApplication.java
0 → 100644
View file @
c638a35
package
cn
.
com
.
glsx
.
test
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.process.job.xxljob.impl.SopInstNodeExecuteJobHandler
;
import
cn.com.glsx.process.modules.entity.SopDataSource
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.entity.User
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.service.SopDataSourceService
;
import
cn.com.glsx.process.modules.service.SopService
;
import
cn.com.glsx.process.modules.service.UserDemoService
;
import
cn.com.glsx.process.modules.sop.CustomerInfo
;
import
cn.com.glsx.process.modules.sop.execute.plugin.dbconn.FlowDataAdapterImpl
;
import
cn.com.glsx.process.modules.sop.execute.plugin.dbconn.SopBizAdapter
;
import
cn.com.glsx.process.modules.sop.execute.plugin.java.DynamicEngine
;
import
cn.com.glsx.process.modules.sop.java.example.ControllerDisTasksDemo
;
import
cn.com.glsx.process.modules.sop.java.example.ControllerHttpDemo
;
import
cn.com.glsx.process.modules.sop.java.example.ControllerScreenPersonDemo
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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.SpringJUnit4ClassRunner
;
import
javax.annotation.Resource
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.concurrent.CyclicBarrier
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
* 测试spring cloud 服务调用方式
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
(
classes
=
Application
.
class
)
public
class
JavaNodeTestApplication
{
@Resource
private
SopService
sopService
;
@Test
public
void
testJava
()
{
Map
<
String
,
Object
>
resultData
=
new
HashMap
<>();
CustomerInfo
customerInfo
=
new
CustomerInfo
();
customerInfo
.
setOneId
(
"123456"
);
customerInfo
.
setCustomerPhone
(
"13476670746"
);
customerInfo
.
setOrgId
(
"123456"
);
customerInfo
.
setVin
(
"ceshi"
);
customerInfo
.
setMessageId
(
"ceshi"
);
customerInfo
.
setMessageContent
(
"ceshi"
);
customerInfo
.
setSopJourneyId
(
"xblc7"
);
customerInfo
.
setSopJourneyEnterTime
(
new
Date
());
customerInfo
.
setCustomerPhone
(
"13476670746"
);
customerInfo
.
setSop_journey_stage
(
"潜客"
);
customerInfo
.
setSopJourneyStageEnterTime
(
new
Date
());
resultData
.
put
(
"users"
,
Arrays
.
asList
(
customerInfo
));
SopStruct
sopStruct
=
sopService
.
loadSop
(
"xblc7"
);
SopInstNode
sopInstNode
=
sopStruct
.
getInstNodeMap
().
get
(
2
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"sopInst"
,
sopStruct
.
getInst
());
jsonObject
.
put
(
"sopInstNode"
,
sopInstNode
);
jsonObject
.
put
(
"instSnapshot"
,
resultData
);
JSON
execute
=
ControllerScreenPersonDemo
.
execute
(
jsonObject
);
System
.
out
.
println
(
execute
);
}
@Test
public
void
ControllerDisTasksDemotestJava
()
{
Map
<
String
,
Object
>
resultData
=
new
HashMap
<>();
CustomerInfo
customerInfo
=
new
CustomerInfo
();
customerInfo
.
setOneId
(
"123456"
);
customerInfo
.
setCustomerPhone
(
"13476670746"
);
customerInfo
.
setOrgId
(
"123456"
);
customerInfo
.
setVin
(
"ceshi"
);
customerInfo
.
setMessageId
(
"ceshi"
);
customerInfo
.
setMessageContent
(
"ceshi"
);
customerInfo
.
setSopJourneyId
(
"xblc7"
);
customerInfo
.
setSopJourneyEnterTime
(
new
Date
());
customerInfo
.
setCustomerPhone
(
"13476670746"
);
customerInfo
.
setSop_journey_stage
(
"潜客"
);
customerInfo
.
setSopJourneyStageEnterTime
(
new
Date
());
resultData
.
put
(
"user1"
,
Arrays
.
asList
(
customerInfo
));
SopStruct
sopStruct
=
sopService
.
loadSop
(
"xblc7"
);
SopInstNode
sopInstNode
=
sopStruct
.
getInstNodeMap
().
get
(
3
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"sopInst"
,
sopStruct
.
getInst
());
jsonObject
.
put
(
"sopInstNode"
,
sopInstNode
);
jsonObject
.
put
(
"instSnapshot"
,
resultData
);
JSON
execute
=
ControllerDisTasksDemo
.
execute
(
jsonObject
);
System
.
out
.
println
(
execute
);
}
String
aa
=
"\timport cn.com.glsx.process.modules.entity.SopInstNode;\n"
+
"import cn.com.glsx.process.modules.sop.CustomerInfo;\n"
+
"import cn.com.glsx.process.modules.sop.SopExecutorResult;\n"
+
"import cn.com.glsx.process.modules.sop.SopHelper;\n"
+
"import com.alibaba.fastjson.JSON;\n"
+
"import com.alibaba.fastjson.JSONArray;\n"
+
"import com.alibaba.fastjson.JSONObject;\n"
+
"import org.apache.commons.collections.CollectionUtils;\n"
+
"\n"
+
"import java.util.List;\n"
+
"import java.util.Map;\n"
+
"import java.util.stream.Collectors;\n"
+
"\n"
+
"/**\n"
+
" * java执行器使用demo,http请求,类名Controller,方法名execute\n"
+
" * 筛选客户\n"
+
" */\n"
+
"public class ControllerScreenPersonDemo {\n"
+
"\n"
+
"\n"
+
" public static JSON execute(JSON param) {\n"
+
"\n"
+
" SopExecutorResult excustorParam = SopHelper.getExcustorParam(param);\n"
+
" SopInstNode sopInstNode = excustorParam.getSopInstNode();\n"
+
" String nodeParam = sopInstNode.getNodeParam();\n"
+
" String stage = SopHelper.getValueFromJsonString(nodeParam, \"stage\");\n"
+
"\n"
+
" Map<String, Object> resultData = excustorParam.getResultData();\n"
+
"\n"
+
" List<CustomerInfo> customerInfoList = JSON.parseArray(JSON.toJSONString(resultData.get(\"users\")), CustomerInfo.class);\n"
+
" if (CollectionUtils.isNotEmpty(customerInfoList)) {\n"
+
" List<CustomerInfo> collect = customerInfoList.stream().filter(index -> stage.equals(index.getSop_journey_stage())).collect(Collectors.toList());\n"
+
" return (JSONArray) JSONObject.toJSON(collect);\n"
+
" }\n"
+
" return null;\n"
+
" }\n"
+
"}"
;
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment