Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
5025ac91
Commit
5025ac91
authored
May 24, 2023
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5ae80e0b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
4 deletions
+57
-4
SynchroFinancialEventGroupsRabbitBackgroundService.cs
...ice/SynchroFinancialEventGroupsRabbitBackgroundService.cs
+38
-0
AmazonDataSynchroService.cs
AutoTurnOver.Services/AmazonDataSynchroService.cs
+16
-1
Program.cs
ResetOutofstock/Program.cs
+1
-1
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+2
-2
No files found.
AutoTurnOver.RabbitMqService/SynchroFinancialEventGroupsRabbitBackgroundService.cs
0 → 100644
View file @
5025ac91
using
AutoTurnOver.DB
;
using
AutoTurnOver.Models
;
using
AutoTurnOver.Services
;
using
AutoTurnOver.Utility
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
ResetOutofstock
{
class
SynchroFinancialEventGroupsRabbitBackgroundService
:
RabbitWorkerBase
<
t_task_queue
>
{
public
SynchroFinancialEventGroupsRabbitBackgroundService
()
:
base
(
"拉取放款,预留数据"
,
"aims:fba-transfer:input"
,
1
)
{
}
protected
override
async
Task
DoWork
(
t_task_queue
taskDto
)
{
try
{
new
AmazonDataSynchroService
().
SynchroFinancialEventGroups
(
accountId
:
int
.
Parse
(
taskDto
.
id
));
Console
.
WriteLine
(
$"解析亚马逊服务费 完成 "
);
}
catch
(
Exception
e
)
{
RabbitMQHelper
.
EnqueneMsg
(
"aims:fba-transfer:input"
,
taskDto
);
Console
.
WriteLine
(
$"解析亚马逊服务费 数据异常,异常原因为:
{
e
.
Message
}
,异常堆栈为:
{
e
.
StackTrace
}
"
);
}
}
}
}
AutoTurnOver.Services/AmazonDataSynchroService.cs
View file @
5025ac91
...
...
@@ -32,11 +32,26 @@ namespace AutoTurnOver.Services
{
public
class
AmazonDataSynchroService
{
public
void
SynchroFinancialEventGroupsSubmit
()
{
var
amazonAccounts
=
ApiServices
.
GetAmazonAccountList
();
foreach
(
var
item
in
amazonAccounts
)
{
if
(
item
.
AmznSpDevAccountObj
!=
null
&&
item
.
AmznSpTokenObj
!=
null
)
{
RabbitMQHelper
.
EnqueneMsg
(
"aims:fba-transfer:input"
,
new
t_task_queue
{
id
=
item
.
Id
.
ToString
(),
create_time
=
DateTime
.
Now
});
}
}
}
public
void
SynchroFinancialEventGroups
(
string
account
=
null
,
string
siteEn
=
null
)
public
void
SynchroFinancialEventGroups
(
string
account
=
null
,
string
siteEn
=
null
,
int
accountId
=
0
)
{
// 拉取亚马逊账号
var
amazonAccounts
=
ApiServices
.
GetAmazonAccountList
();
if
(
accountId
>
0
)
{
amazonAccounts
=
amazonAccounts
.
Where
(
s
=>
s
.
Id
==
accountId
).
ToList
();
}
if
(!
string
.
IsNullOrWhiteSpace
(
account
))
{
amazonAccounts
=
amazonAccounts
.
Where
(
s
=>
s
.
Account
==
account
).
ToList
();
...
...
ResetOutofstock/Program.cs
View file @
5025ac91
...
...
@@ -49,7 +49,7 @@ namespace ResetOutofstock
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.CalculationStockScore("962073701");
//dc_ana_deviation_dao.PushAnaTask();
//new AmazonDataSynchroService().SynchroFinancialEventGroups("
Siqidzi","ES
");
//new AmazonDataSynchroService().SynchroFinancialEventGroups("
Onlymingue", "IT
");
//new AmazonDataSynchroService().SetMarketplaceName(DateTime.Now);
//new AmazonDataSynchroService().SetSettlementByDate();
//new AmazonDataSynchroService().SetMarketplaceNameByDate();
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
5025ac91
...
...
@@ -830,9 +830,9 @@ namespace ResetOutofstock
try
{
Console
.
WriteLine
(
$"开始 拉取亚马逊提现记录,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
AmazonDataSynchroService
().
SynchroFinancialEventGroups
();
new
AmazonDataSynchroService
().
SynchroFinancialEventGroups
Submit
();
Console
.
WriteLine
(
$"结束 拉取亚马逊提现记录,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Thread
.
Sleep
(
1000
*
3
);
Thread
.
Sleep
(
1000
*
60
*
60
*
4
);
// 4个小时提交一次
}
catch
(
Exception
ex
)
{
...
...
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