Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
be18f5c3
Commit
be18f5c3
authored
Aug 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改定时任务传参
parent
05bb962f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
DeviceTask.java
share-quartz/src/main/java/share/quartz/task/DeviceTask.java
+8
-5
logback.xml
share-quartz/src/main/resources/logback.xml
+1
-1
No files found.
share-quartz/src/main/java/share/quartz/task/DeviceTask.java
View file @
be18f5c3
package
share
.
quartz
.
task
;
import
com.xxl.job.core.context.XxlJobHelper
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
share.system.domain.DeviceGateway
;
...
...
@@ -19,6 +22,7 @@ import java.util.List;
@Component
public
class
DeviceTask
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeviceTask
.
class
);
@Autowired
private
DeviceStatusLogService
deviceStatusLogService
;
@Autowired
...
...
@@ -49,12 +53,11 @@ public class DeviceTask {
}
}
/**
* 定期修改门锁设备的开锁密码
* @param validTime 有效时长
*/
@XxlJob
(
"updateDeviceDoorLockPassword"
)
public
void
updateDeviceDoorLockPassword
(
Integer
validTime
)
{
public
void
updateDeviceDoorLockPassword
()
{
String
jobParam
=
XxlJobHelper
.
getJobParam
();
Integer
validTime
=
Integer
.
getInteger
(
jobParam
);
log
.
debug
(
"jobParam:"
+
jobParam
);
if
(
validTime
==
null
)
{
validTime
=
15
;
}
...
...
share-quartz/src/main/resources/logback.xml
View file @
be18f5c3
...
...
@@ -27,7 +27,7 @@
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<level>
INFO
</level>
<level>
DEBUG
</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>
ACCEPT
</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
...
...
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