记得上下班打卡 | 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
88d15771
Commit
88d15771
authored
Nov 26, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交定时任务
parent
93ea1afb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
4 deletions
+67
-4
KylinTimePerformanceVo.java
...iquidnet/service/kylin/dto/vo/KylinTimePerformanceVo.java
+1
-1
FeignPlatformTaskClient.java
...net/service/feign/kylin/task/FeignPlatformTaskClient.java
+4
-0
KylinTaskHandler.java
...idnet/service/executor/main/handler/KylinTaskHandler.java
+14
-0
KylinPerformancesPartnerServiceImpl.java
...ant/service/impl/KylinPerformancesPartnerServiceImpl.java
+2
-2
KylinPerformancesController.java
...latform/controller/kylin/KylinPerformancesController.java
+44
-1
PerformancePartnerController.java
...form/controller/partner/PerformancePartnerController.java
+2
-0
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/KylinTimePerformanceVo.java
View file @
88d15771
...
@@ -22,7 +22,7 @@ public class KylinTimePerformanceVo implements Serializable, Cloneable {
...
@@ -22,7 +22,7 @@ public class KylinTimePerformanceVo implements Serializable, Cloneable {
@ApiModelProperty
(
value
=
"演出Id"
)
@ApiModelProperty
(
value
=
"演出Id"
)
private
String
performanceId
;
private
String
performanceId
;
@ApiModelProperty
(
value
=
"定时上下线时间"
)
@ApiModelProperty
(
value
=
"定时上下线时间
[]
"
)
private
String
time
;
private
String
time
;
@ApiModelProperty
(
value
=
"任务类型 [0|无状态|1-上线|2下线]"
)
@ApiModelProperty
(
value
=
"任务类型 [0|无状态|1-上线|2下线]"
)
...
...
liquidnet-bus-feign/liquidnet-api-feign-kylin/src/main/java/com/liquidnet/service/feign/kylin/task/FeignPlatformTaskClient.java
View file @
88d15771
...
@@ -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.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Component
@Component
...
@@ -23,4 +24,7 @@ public interface FeignPlatformTaskClient {
...
@@ -23,4 +24,7 @@ public interface FeignPlatformTaskClient {
@PostMapping
(
"platform/order/checkTransferOrder"
)
@PostMapping
(
"platform/order/checkTransferOrder"
)
ResponseDto
<
Boolean
>
checkTransferOrder
(
@RequestParam
(
"minute"
)
Integer
minute
);
ResponseDto
<
Boolean
>
checkTransferOrder
(
@RequestParam
(
"minute"
)
Integer
minute
);
@PutMapping
(
"platform/performance/line"
)
ResponseDto
<
Boolean
>
performanceLine
();
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/KylinTaskHandler.java
View file @
88d15771
...
@@ -62,6 +62,20 @@ public class KylinTaskHandler {
...
@@ -62,6 +62,20 @@ public class KylinTaskHandler {
}
}
}
}
@XxlJob
(
value
=
"sev-platform:performanceLine"
)
public
ReturnT
<
String
>
performanceLine
()
{
try
{
String
minute
=
XxlJobHelper
.
getJobParam
();
//执行参数
log
.
debug
(
"minute = "
+
Integer
.
parseInt
(
minute
));
boolean
result
=
feignPlatformTaskClient
.
performanceLine
().
getData
();
log
.
info
(
"checkTransferOrderHandler:结果:"
+
result
);
return
ReturnT
.
SUCCESS
;
}
catch
(
Exception
e
)
{
log
.
info
(
"exception = "
,
e
);
return
ReturnT
.
FAIL
;
}
}
// @Autowired
// @Autowired
// private FeignSequenceClient feignSequenceClient;
// private FeignSequenceClient feignSequenceClient;
//
//
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/KylinPerformancesPartnerServiceImpl.java
View file @
88d15771
...
@@ -615,7 +615,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
...
@@ -615,7 +615,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
vo
.
setTime
(
time
);
vo
.
setTime
(
time
);
vo
.
setTaskType
(
2
);
vo
.
setTaskType
(
2
);
mongoMerchantUtils
.
insertTimeLine
(
vo
);
mongoMerchantUtils
.
insertTimeLine
(
vo
);
log
.
info
(
"[ OUT LINE TASK ] performanceId = "
+
performancesId
+
" time = "
+
time
);
log
.
info
(
"[
PRE
OUT LINE TASK ] performanceId = "
+
performancesId
+
" time = "
+
time
);
return
null
;
return
null
;
}
}
...
@@ -627,7 +627,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
...
@@ -627,7 +627,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
vo
.
setTime
(
time
);
vo
.
setTime
(
time
);
vo
.
setTaskType
(
1
);
vo
.
setTaskType
(
1
);
mongoMerchantUtils
.
insertTimeLine
(
vo
);
mongoMerchantUtils
.
insertTimeLine
(
vo
);
log
.
info
(
"[ ON LINE TASK ] performanceId = "
+
performancesId
+
" time = "
+
time
);
log
.
info
(
"[
PRE
ON LINE TASK ] performanceId = "
+
performancesId
+
" time = "
+
time
);
return
null
;
return
null
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/kylin/KylinPerformancesController.java
View file @
88d15771
...
@@ -2,12 +2,26 @@ package com.liquidnet.service.platform.controller.kylin;
...
@@ -2,12 +2,26 @@ package com.liquidnet.service.platform.controller.kylin;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.KylinTimePerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.PerformanceOrderStatisticalVo
;
import
com.liquidnet.service.kylin.service.partner.IKylinPerformancesPartnerService
;
import
com.liquidnet.service.platform.utils.PerformanceVoTask
;
import
com.liquidnet.service.platform.utils.PerformanceVoTask
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotNull
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
/**
/**
* <p>
* <p>
* 演出 前端控制器
* 演出 前端控制器
...
@@ -19,14 +33,19 @@ import org.springframework.web.bind.annotation.*;
...
@@ -19,14 +33,19 @@ import org.springframework.web.bind.annotation.*;
@Api
(
tags
=
"前端-演出"
)
@Api
(
tags
=
"前端-演出"
)
@RestController
@RestController
@RequestMapping
(
"performance"
)
@RequestMapping
(
"performance"
)
@Slf4j
public
class
KylinPerformancesController
{
public
class
KylinPerformancesController
{
@Autowired
@Autowired
private
PerformanceVoTask
performanceVoTask
;
private
PerformanceVoTask
performanceVoTask
;
@Autowired
private
IKylinPerformancesPartnerService
performancesPartnerService
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@PostMapping
(
"/checkPerformanceTime"
)
@PostMapping
(
"/checkPerformanceTime"
)
@ApiOperation
(
"演出脚本"
)
@ApiOperation
(
"演出脚本"
)
public
ResponseDto
<
String
>
checkPerformanceTime
(
@RequestParam
(
value
=
"performancesId"
,
required
=
false
)
String
performancesId
)
{
public
ResponseDto
<
String
>
checkPerformanceTime
(
@RequestParam
(
value
=
"performancesId"
,
required
=
false
)
String
performancesId
)
{
try
{
try
{
performanceVoTask
.
performanceVoStatus
(
performancesId
);
performanceVoTask
.
performanceVoStatus
(
performancesId
);
return
ResponseDto
.
success
(
"成功"
);
return
ResponseDto
.
success
(
"成功"
);
...
@@ -35,4 +54,28 @@ public class KylinPerformancesController {
...
@@ -35,4 +54,28 @@ public class KylinPerformancesController {
return
ResponseDto
.
success
(
"失败"
);
return
ResponseDto
.
success
(
"失败"
);
}
}
}
}
@GetMapping
(
value
=
"line"
)
@ApiOperation
(
value
=
"演出状态管理"
,
position
=
9
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
Boolean
>
performanceLine
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
try
{
List
<
KylinTimePerformanceVo
>
voList
=
mongoTemplate
.
findAll
(
KylinTimePerformanceVo
.
class
,
KylinTimePerformanceVo
.
class
.
getSimpleName
());
for
(
KylinTimePerformanceVo
item
:
voList
)
{
if
(
LocalDateTime
.
now
().
isAfter
(
LocalDateTime
.
parse
(
item
.
getTime
(),
DTF_YMD_HMS
).
plusSeconds
(
2
)))
{
if
(
item
.
getTaskType
()
==
1
)
{
performancesPartnerService
.
onLinePerformance
(
item
.
getPerformanceId
());
log
.
info
(
"[FINISH ON LINE TASK] performanceId = "
+
item
.
getPerformanceId
()
+
" time = "
+
item
.
getTime
());
}
else
if
(
item
.
getTaskType
()
==
2
)
{
performancesPartnerService
.
outLinePerformance
(
item
.
getPerformanceId
());
log
.
info
(
"[FINISH OUT LINE TASK] performanceId = "
+
item
.
getPerformanceId
()
+
" time = "
+
item
.
getTime
());
}
}
}
return
ResponseDto
.
success
(
true
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
success
(
false
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/partner/PerformancePartnerController.java
View file @
88d15771
...
@@ -112,6 +112,8 @@ public class PerformancePartnerController {
...
@@ -112,6 +112,8 @@ public class PerformancePartnerController {
// return performancesPartnerService.withdraw(performancesId);
// return performancesPartnerService.withdraw(performancesId);
// }
// }
//
//
@GetMapping
(
value
=
"orderStatistical"
)
@GetMapping
(
value
=
"orderStatistical"
)
@ApiOperation
(
value
=
"演出订单统计"
,
position
=
9
)
@ApiOperation
(
value
=
"演出订单统计"
,
position
=
9
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
...
...
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