Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
bltdc
DataCenter_Core2.1_20190520
Commits
30b63a09
Commit
30b63a09
authored
Oct 29, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同上
parent
bf5a8270
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Services.cs
Bailun.DC.SyncLogisticInfo/Services.cs
+4
-4
No files found.
Bailun.DC.SyncLogisticInfo/Services.cs
View file @
30b63a09
...
@@ -28,7 +28,7 @@ namespace Bailun.DC.SyncLogisticInfo
...
@@ -28,7 +28,7 @@ namespace Bailun.DC.SyncLogisticInfo
{
{
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
if
(
now
.
Hour
%
3
==
0
&&
now
.
Minute
==
1
)
//每3小时
同步一次
if
(
now
.
Minute
%
30
==
0
)
//每30分钟
同步一次
{
{
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Init
();
Init
();
...
@@ -63,8 +63,8 @@ namespace Bailun.DC.SyncLogisticInfo
...
@@ -63,8 +63,8 @@ namespace Bailun.DC.SyncLogisticInfo
var
m
=
cn
.
QueryFirstOrDefault
<
DateTime
?>(
"select end_time from job_point_log where job_name='dc-base-logisticinfo'"
);
var
m
=
cn
.
QueryFirstOrDefault
<
DateTime
?>(
"select end_time from job_point_log where job_name='dc-base-logisticinfo'"
);
if
(
m
!=
null
&&
m
.
HasValue
)
if
(
m
!=
null
&&
m
.
HasValue
)
{
{
starttime
=
m
.
Value
;
starttime
=
m
.
Value
.
AddMinutes
(-
3
)
;
endtime
=
starttime
.
Add
Day
s
(
1
);
endtime
=
starttime
.
Add
Hour
s
(
1
);
}
}
}
}
...
@@ -95,7 +95,7 @@ namespace Bailun.DC.SyncLogisticInfo
...
@@ -95,7 +95,7 @@ namespace Bailun.DC.SyncLogisticInfo
if
(
json
!=
null
&&
json
.
success
&&
json
.
result
.
result
.
Count
>
0
)
if
(
json
!=
null
&&
json
.
success
&&
json
.
result
.
result
.
Count
>
0
)
{
{
Save
(
json
.
result
.
result
);
Save
(
json
.
result
.
result
);
Console
.
WriteLine
(
"总记录数:"
+
json
.
result
.
total
+
",当前页记录数:"
+
json
.
result
.
result
.
Count
+
"条记录。"
);
Console
.
WriteLine
(
"总记录数:"
+
json
.
result
.
total
+
",当前页记录数:"
+
json
.
result
.
result
.
Count
+
"条记录。"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
);
total
=
json
.
result
.
total
;
total
=
json
.
result
.
total
;
page
++;
page
++;
}
}
...
...
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