Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
52a663a1
Commit
52a663a1
authored
Jun 18, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8df549a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
TimersHelper.cs
Mall.WindowsService/Helper/TimersHelper.cs
+10
-6
FreightRulesHelper.cs
Test/Helper/FreightRulesHelper.cs
+1
-1
No files found.
Mall.WindowsService/Helper/TimersHelper.cs
View file @
52a663a1
...
@@ -10,6 +10,10 @@ namespace Mall.WindowsService.Helper
...
@@ -10,6 +10,10 @@ namespace Mall.WindowsService.Helper
{
{
private
static
int
inTimer
=
0
;
private
static
int
inTimer
=
0
;
private
static
int
inTimer1
=
0
;
private
static
int
inTimer2
=
0
;
private
static
int
inTimer3
=
0
;
/// <summary>
/// <summary>
/// 收入单子服务开始执行方法
/// 收入单子服务开始执行方法
/// </summary>
/// </summary>
...
@@ -35,12 +39,12 @@ namespace Mall.WindowsService.Helper
...
@@ -35,12 +39,12 @@ namespace Mall.WindowsService.Helper
/// <param name="sender"></param>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <param name="e"></param>
public
void
AutoCancelOrder
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
public
void
AutoCancelOrder
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
if
(
Interlocked
.
Exchange
(
ref
inTimer
,
1
)
==
0
)
if
(
Interlocked
.
Exchange
(
ref
inTimer
1
,
1
)
==
0
)
{
{
LogHelper
.
Write
(
"AutoCancelOrder=====Start"
);
LogHelper
.
Write
(
"AutoCancelOrder=====Start"
);
Module
.
FinanceModule
.
AutoCancelOrder
();
Module
.
FinanceModule
.
AutoCancelOrder
();
LogHelper
.
Write
(
"AutoCancelOrder=====End"
);
LogHelper
.
Write
(
"AutoCancelOrder=====End"
);
Interlocked
.
Exchange
(
ref
inTimer
,
0
);
Interlocked
.
Exchange
(
ref
inTimer
1
,
0
);
}
}
}
}
...
@@ -51,14 +55,14 @@ namespace Mall.WindowsService.Helper
...
@@ -51,14 +55,14 @@ namespace Mall.WindowsService.Helper
/// <param name="e"></param>
/// <param name="e"></param>
public
void
AutoReceivingOrder
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
public
void
AutoReceivingOrder
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
if
(
Interlocked
.
Exchange
(
ref
inTimer
,
1
)
==
0
)
if
(
Interlocked
.
Exchange
(
ref
inTimer
2
,
1
)
==
0
)
{
{
if
(
DateTime
.
Now
.
Hour
==
1
)
if
(
DateTime
.
Now
.
Hour
==
1
)
{
{
LogHelper
.
Write
(
"AutoReceivingOrder=====Start"
);
LogHelper
.
Write
(
"AutoReceivingOrder=====Start"
);
Module
.
FinanceModule
.
AutoReceivingOrder
();
Module
.
FinanceModule
.
AutoReceivingOrder
();
LogHelper
.
Write
(
"AutoReceivingOrder=====End"
);
LogHelper
.
Write
(
"AutoReceivingOrder=====End"
);
Interlocked
.
Exchange
(
ref
inTimer
,
0
);
Interlocked
.
Exchange
(
ref
inTimer
2
,
0
);
}
}
}
}
}
}
...
@@ -70,14 +74,14 @@ namespace Mall.WindowsService.Helper
...
@@ -70,14 +74,14 @@ namespace Mall.WindowsService.Helper
/// <param name="e"></param>
/// <param name="e"></param>
public
void
AutoReleaseTheOffline
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
public
void
AutoReleaseTheOffline
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
if
(
Interlocked
.
Exchange
(
ref
inTimer
,
1
)
==
0
)
if
(
Interlocked
.
Exchange
(
ref
inTimer
3
,
1
)
==
0
)
{
{
if
(
DateTime
.
Now
.
Hour
==
1
)
if
(
DateTime
.
Now
.
Hour
==
1
)
{
{
LogHelper
.
Write
(
"AutoReceivingOrder=====Start"
);
LogHelper
.
Write
(
"AutoReceivingOrder=====Start"
);
Module
.
FinanceModule
.
AutoReleaseTheOffline
();
Module
.
FinanceModule
.
AutoReleaseTheOffline
();
LogHelper
.
Write
(
"AutoReceivingOrder=====End"
);
LogHelper
.
Write
(
"AutoReceivingOrder=====End"
);
Interlocked
.
Exchange
(
ref
inTimer
,
0
);
Interlocked
.
Exchange
(
ref
inTimer
3
,
0
);
}
}
}
}
}
}
...
...
Test/Helper/FreightRulesHelper.cs
View file @
52a663a1
...
@@ -205,7 +205,7 @@ namespace Test.Helper
...
@@ -205,7 +205,7 @@ namespace Test.Helper
pageCount
=
0
;
pageCount
=
0
;
List
<
Remit
>
list
=
new
List
<
Remit
>();
List
<
Remit
>
list
=
new
List
<
Remit
>();
string
imgApi
=
"http://wx.weibaoge.cn/web/index.php?r=mall%2Fshare%2Fcash-data&status=
3
&page={0}"
;
string
imgApi
=
"http://wx.weibaoge.cn/web/index.php?r=mall%2Fshare%2Fcash-data&status=
-1
&page={0}"
;
string
newImaApi
=
string
.
Format
(
imgApi
,
pageIndex
);
string
newImaApi
=
string
.
Format
(
imgApi
,
pageIndex
);
string
jsonData
=
HttpGet
(
newImaApi
,
cookie
);
string
jsonData
=
HttpGet
(
newImaApi
,
cookie
);
if
(
jsonData
!=
null
&&
!
string
.
IsNullOrEmpty
(
jsonData
))
if
(
jsonData
!=
null
&&
!
string
.
IsNullOrEmpty
(
jsonData
))
...
...
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