Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
task3.0
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
首航-临时账号
task3.0
Commits
2a1b40ca
Commit
2a1b40ca
authored
May 06, 2019
by
zt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
50337bb3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
DbSoundsMonitorTask.java
src/main/java/com/foc/DbSoundsMonitorTask.java
+6
-3
No files found.
src/main/java/com/foc/DbSoundsMonitorTask.java
View file @
2a1b40ca
...
...
@@ -4,6 +4,8 @@ import com.foc.entity.AccessInfo;
import
com.foc.service.Sms
;
import
com.foc.service.SoundMonitorService
;
import
com.foc.util.PropertiesUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Properties
;
...
...
@@ -17,6 +19,8 @@ import java.util.Properties;
*/
public
class
DbSoundsMonitorTask
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DbSoundsMonitorTask
.
class
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
if
(
args
==
null
||
args
.
length
==
0
){
loadConf
(
Thread
.
currentThread
().
getContextClassLoader
().
getResource
(
"global.properties"
).
getPath
());
...
...
@@ -29,15 +33,14 @@ public class DbSoundsMonitorTask {
//查看定时任务最后同步时间
SoundMonitorService
.
init
();
Integer
i
=
SoundMonitorService
.
test
();
if
(
i
==
2
){
if
(
i
==
1
){
//发送短信
AccessInfo
accessInfo
=
new
AccessInfo
();
accessInfo
.
setAicc
(
"5"
);
accessInfo
.
setAicp
(
"10.68.26.52"
);
Properties
properties
=
PropertiesUtil
.
getProperties
(
path
);
String
result
=
Sms
.
sendSms
(
accessInfo
,
properties
.
getProperty
(
"mobile"
),
"警告"
);
System
.
out
.
println
(
result
);
logger
.
info
(
result
);
}
}
}
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