Commit 0d46bfb4 by zhouhaibao

[+]ceshi

1 parent 67114fea
...@@ -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 = "本地调用")
......
...@@ -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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!