记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
9e4cd135
Commit
9e4cd135
authored
Jan 14, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人体检测-获取设备列表写成task
parent
51adf01c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
FeignPlatformApiClient.java
...et/service/feign/platform/api/FeignPlatformApiClient.java
+7
-0
PlatformTaskHandler.java
...et/service/executor/main/handler/PlatformTaskHandler.java
+25
-3
No files found.
liquidnet-bus-feign/liquidnet-api-feign-platform/src/main/java/com/liquidnet/service/feign/platform/api/FeignPlatformApiClient.java
View file @
9e4cd135
...
@@ -5,6 +5,7 @@ import feign.hystrix.FallbackFactory;
...
@@ -5,6 +5,7 @@ import feign.hystrix.FallbackFactory;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Component
@Component
@FeignClient
(
@FeignClient
(
...
@@ -22,4 +23,10 @@ public interface FeignPlatformApiClient {
...
@@ -22,4 +23,10 @@ public interface FeignPlatformApiClient {
@GetMapping
(
"camera/detectPedestrian"
)
@GetMapping
(
"camera/detectPedestrian"
)
ResponseDto
<
String
>
detectPedestrian
();
ResponseDto
<
String
>
detectPedestrian
();
@GetMapping
(
"camera/describeDevices"
)
ResponseDto
<
String
>
describeDevices
(
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
);
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/PlatformTaskHandler.java
View file @
9e4cd135
...
@@ -7,6 +7,7 @@ import com.liquidnet.service.feign.platform.api.FeignPlatformApiClient;
...
@@ -7,6 +7,7 @@ import com.liquidnet.service.feign.platform.api.FeignPlatformApiClient;
import
com.liquidnet.service.feign.platform.kylin.FeignPlatformFreightClient
;
import
com.liquidnet.service.feign.platform.kylin.FeignPlatformFreightClient
;
import
com.liquidnet.service.feign.platform.task.FeignPlatformCandyTaskClient
;
import
com.liquidnet.service.feign.platform.task.FeignPlatformCandyTaskClient
;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.context.XxlJobHelper
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -30,11 +31,31 @@ public class PlatformTaskHandler {
...
@@ -30,11 +31,31 @@ public class PlatformTaskHandler {
@Autowired
@Autowired
FeignPlatformApiClient
feignPlatformApiClient
;
FeignPlatformApiClient
feignPlatformApiClient
;
@XxlJob
(
value
=
"sev-platform:describeDevices"
)
public
ReturnT
<
String
>
describeDevices
()
{
try
{
String
jobParam
=
XxlJobHelper
.
getJobParam
();
//执行参数
log
.
info
(
"jobParam = "
+
jobParam
);
String
[]
paramArray
=
jobParam
.
split
(
","
);
String
result
=
feignPlatformApiClient
.
describeDevices
(
Integer
.
parseInt
(
paramArray
[
0
]),
Integer
.
parseInt
(
paramArray
[
1
])).
getData
();
log
.
info
(
"describeDevices:结果:"
+
result
);
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
success
.
setMsg
(
result
);
return
success
;
}
catch
(
Exception
e
)
{
log
.
error
(
"exception of handler:{}"
,
e
.
getMessage
(),
e
);
ReturnT
<
String
>
fail
=
ReturnT
.
FAIL
;
fail
.
setMsg
(
e
.
getLocalizedMessage
());
return
fail
;
}
}
@XxlJob
(
value
=
"sev-platform:detectPedestrian"
)
@XxlJob
(
value
=
"sev-platform:detectPedestrian"
)
public
ReturnT
<
String
>
detectPedestrian
()
{
public
ReturnT
<
String
>
detectPedestrian
()
{
try
{
try
{
String
result
=
feignPlatformApiClient
.
detectPedestrian
().
getData
();
String
result
=
feignPlatformApiClient
.
detectPedestrian
().
getData
();
log
.
info
(
"detectPedestrian:结果:"
+
result
);
log
.
info
(
"detectPedestrian:结果:"
+
result
);
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
success
.
setMsg
(
result
);
success
.
setMsg
(
result
);
return
success
;
return
success
;
...
@@ -50,7 +71,7 @@ public class PlatformTaskHandler {
...
@@ -50,7 +71,7 @@ public class PlatformTaskHandler {
public
ReturnT
<
String
>
overtimeRefund
()
{
public
ReturnT
<
String
>
overtimeRefund
()
{
try
{
try
{
String
result
=
feignPlatformApiClient
.
overtimeRefund
().
getData
();
String
result
=
feignPlatformApiClient
.
overtimeRefund
().
getData
();
log
.
info
(
"overtimeRefund:结果:"
+
result
);
log
.
info
(
"overtimeRefund:结果:"
+
result
);
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
success
.
setMsg
(
result
);
success
.
setMsg
(
result
);
return
success
;
return
success
;
...
@@ -66,7 +87,7 @@ public class PlatformTaskHandler {
...
@@ -66,7 +87,7 @@ public class PlatformTaskHandler {
public
ReturnT
<
String
>
alipayActiveCallbackHandler
()
{
public
ReturnT
<
String
>
alipayActiveCallbackHandler
()
{
try
{
try
{
String
result
=
feignPlatformAlipayBackClient
.
alipayActiveCallback
().
getData
();
String
result
=
feignPlatformAlipayBackClient
.
alipayActiveCallback
().
getData
();
log
.
info
(
"alipayActiveCallback:结果:"
+
result
);
log
.
info
(
"alipayActiveCallback:结果:"
+
result
);
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
success
.
setMsg
(
result
);
success
.
setMsg
(
result
);
return
success
;
return
success
;
...
@@ -149,6 +170,7 @@ public class PlatformTaskHandler {
...
@@ -149,6 +170,7 @@ public class PlatformTaskHandler {
return
fail
;
return
fail
;
}
}
}
}
//运费
//运费
@XxlJob
(
value
=
"sev-platform:getFreightChargeHandler"
)
@XxlJob
(
value
=
"sev-platform:getFreightChargeHandler"
)
public
ReturnT
<
String
>
getFreightChargeHandler
()
{
public
ReturnT
<
String
>
getFreightChargeHandler
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment