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 0d46bfb4
authored
Sep 26, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]ceshi
1 parent
67114fea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/api/UserApiController.java
platform-process/src/test/java/cn/com/glsx/test/TestApplication.java
platform-process/src/main/java/cn/com/glsx/process/modules/api/UserApiController.java
View file @
0d46bfb
...
@@ -2,6 +2,11 @@ package cn.com.glsx.process.modules.api;
...
@@ -2,6 +2,11 @@ package cn.com.glsx.process.modules.api;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
cn.com.glsx.cdp.api.customer.CustomerSopJourneyFeignClient
;
import
cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO
;
import
cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -39,13 +44,19 @@ public class UserApiController implements UserCenterFeignClient {
...
@@ -39,13 +44,19 @@ public class UserApiController implements UserCenterFeignClient {
@Resource
@Resource
private
EchoCenterFeignClient
echoCenterFeignClient
;
private
EchoCenterFeignClient
echoCenterFeignClient
;
@Resource
private
CustomerSopJourneyFeignClient
customerSopJourneyFeignClient
;
@Operation
(
summary
=
"FeignClient调用"
)
@Operation
(
summary
=
"FeignClient调用"
)
@Override
@Override
@GetMapping
(
"/echo"
)
@GetMapping
(
"/echo"
)
public
String
echo
(
@RequestParam
String
message
)
{
public
String
echo
(
@RequestParam
String
message
)
{
String
echo
=
echoCenterFeignClient
.
echo
(
message
);
CustomerSopJourneySearch
customerSopJourneySearch
=
new
CustomerSopJourneySearch
();
return
echo
;
customerSopJourneySearch
.
setPageNum
(
1
);
customerSopJourneySearch
.
setPageSize
(
10
);
Result
<
PageInfo
<
CustomerSopJourneyDTO
>>
pageInfoResult
=
customerSopJourneyFeignClient
.
pageCustomerSopJourney
(
customerSopJourneySearch
);
return
JSONObject
.
toJSONString
(
pageInfoResult
);
}
}
@Operation
(
summary
=
"本地调用"
)
@Operation
(
summary
=
"本地调用"
)
...
...
platform-process/src/test/java/cn/com/glsx/test/TestApplication.java
View file @
0d46bfb
...
@@ -7,9 +7,14 @@ import java.util.concurrent.CyclicBarrier;
...
@@ -7,9 +7,14 @@ import java.util.concurrent.CyclicBarrier;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
cn.com.glsx.cdp.api.customer.CustomerSopJourneyFeignClient
;
import
cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO
;
import
cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch
;
import
cn.com.glsx.process.modules.service.SopInstLinkService
;
import
cn.com.glsx.process.modules.service.SopInstLinkService
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.plat.core.web.Result
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -32,6 +37,8 @@ import cn.com.glsx.process.modules.sop.execute.plugin.dbconn.SopBizAdapter;
...
@@ -32,6 +37,8 @@ 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.execute.plugin.java.DynamicEngine
;
import
cn.com.glsx.process.modules.sop.java.example.ControllerHttpDemo
;
import
cn.com.glsx.process.modules.sop.java.example.ControllerHttpDemo
;
import
javax.annotation.Resource
;
/**
/**
* 测试spring cloud 服务调用方式
* 测试spring cloud 服务调用方式
*/
*/
...
@@ -51,6 +58,9 @@ public class TestApplication {
...
@@ -51,6 +58,9 @@ public class TestApplication {
@Autowired
@Autowired
private
SopInstLinkService
sopInstLinkService
;
private
SopInstLinkService
sopInstLinkService
;
@Resource
private
CustomerSopJourneyFeignClient
customerSopJourneyFeignClient
;
@Test
@Test
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
SopDataSource
byId
=
sopDataSourceService
.
findByDataSourceId
(
"SOP_CDP"
);
SopDataSource
byId
=
sopDataSourceService
.
findByDataSourceId
(
"SOP_CDP"
);
...
@@ -149,5 +159,13 @@ public class TestApplication {
...
@@ -149,5 +159,13 @@ public class TestApplication {
String
listString
=
JSON
.
toJSONString
(
xblc7
,
SerializerFeature
.
DisableCircularReferenceDetect
);
String
listString
=
JSON
.
toJSONString
(
xblc7
,
SerializerFeature
.
DisableCircularReferenceDetect
);
System
.
out
.
println
(
listString
);
System
.
out
.
println
(
listString
);
}
}
@Test
public
void
pageCustomerSopJourney
()
{
CustomerSopJourneySearch
customerSopJourneySearch
=
new
CustomerSopJourneySearch
();
customerSopJourneySearch
.
setPageNum
(
1
);
customerSopJourneySearch
.
setPageSize
(
10
);
Result
<
PageInfo
<
CustomerSopJourneyDTO
>>
pageInfoResult
=
customerSopJourneyFeignClient
.
pageCustomerSopJourney
(
customerSopJourneySearch
);
System
.
out
.
println
(
pageInfoResult
);
}
}
}
\ 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