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
4542f0ff
Commit
4542f0ff
authored
May 14, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
41d25bd4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
25 deletions
+57
-25
dc_base_pps_sell_product_dao.cs
AutoTurnOver.DB/dc_base_pps_sell_product_dao.cs
+31
-22
PPSBackgrounService.cs
ShortagePush/PPSBackgrounService.cs
+12
-3
Program.cs
ShortagePush/Program.cs
+1
-0
appsettings.dev.json
ShortagePush/appsettings.dev.json
+4
-0
appsettings.json
ShortagePush/appsettings.json
+4
-0
appsettings.prod.json
ShortagePush/appsettings.prod.json
+5
-0
No files found.
AutoTurnOver.DB/dc_base_pps_sell_product_dao.cs
View file @
4542f0ff
...
...
@@ -15,34 +15,43 @@ namespace AutoTurnOver.DB
/// </summary>
public
static
void
SyncData
()
{
int
page
=
1
;
int
rows
=
100
;
// 清理数据重抓
_connection
.
Execute
(
" TRUNCATE table dc_base_pps_sell_product; "
);
while
(
true
)
try
{
var
datas
=
ApiUtility
.
GetPPSSellProduct
(
page
,
rows
);
page
++;
if
(
datas
!=
null
&&
datas
.
Count
>=
1
)
int
page
=
1
;
int
rows
=
100
;
// 清理数据重抓
_connection
.
Execute
(
" TRUNCATE table dc_base_pps_sell_product; "
);
while
(
true
)
{
foreach
(
var
item
in
datas
)
var
datas
=
ApiUtility
.
GetPPSSellProduct
(
page
,
rows
);
page
++;
if
(
datas
!=
null
&&
datas
.
Count
>=
1
)
{
dc_base_pps_sell_product
dbData
=
new
dc_base_pps_sell_product
();
dbData
.
pro_code
=
item
.
proCode
??
""
;
dbData
.
sku_code
=
item
.
skuCode
??
""
;
dbData
.
platform_sku
=
item
.
platformSku
??
""
;
dbData
.
item_id
=
item
.
itemId
??
""
;
dbData
.
productId
=
item
.
productId
;
dbData
.
platform
=
"walmart"
;
dbData
.
warehouse_code
=
"GZBLWH"
;
_connection
.
Insert
(
dbData
);
foreach
(
var
item
in
datas
)
{
dc_base_pps_sell_product
dbData
=
new
dc_base_pps_sell_product
();
dbData
.
pro_code
=
item
.
proCode
??
""
;
dbData
.
sku_code
=
item
.
skuCode
??
""
;
dbData
.
platform_sku
=
item
.
platformSku
??
""
;
dbData
.
item_id
=
item
.
itemId
??
""
;
dbData
.
productId
=
item
.
productId
;
dbData
.
platform
=
"walmart"
;
dbData
.
warehouse_code
=
"GZBLWH"
;
_connection
.
Insert
(
dbData
);
}
}
else
{
break
;
}
}
else
{
break
;
}
}
catch
(
Exception
)
{
Console
.
WriteLine
(
"拉取pps数据异常"
);
}
}
}
}
ShortagePush/PPSBackgrounService.cs
View file @
4542f0ff
...
...
@@ -28,9 +28,18 @@ namespace ResetOutofstock
if
(
now
.
Hour
==
20
&&
now
.
Minute
==
02
)
{
System
.
Console
.
WriteLine
(
$"开始 推送pps回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
PPSReturnGoodsPush
(
"walmart"
);
System
.
Console
.
WriteLine
(
$"结束 推送pps回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
try
{
System
.
Console
.
WriteLine
(
$"开始 推送pps回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
PPSReturnGoodsPush
(
"walmart"
);
System
.
Console
.
WriteLine
(
$"结束 推送pps回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
"推送pps回货异常"
+
ex
.
Message
);
Console
.
WriteLine
(
"推送pps回货异常"
+
ex
.
StackTrace
);
}
}
...
...
ShortagePush/Program.cs
View file @
4542f0ff
...
...
@@ -23,6 +23,7 @@ namespace ShortagePush
//new ReportServices().ShortagePushEbay(true);
//new ReportServices().ReturnGoodsPush();
//new ReportServices().ShortagePushEbay();
//new ReportServices().PPSReturnGoodsPush("walmart");
}
catch
(
Exception
ex
)
{
...
...
ShortagePush/appsettings.dev.json
View file @
4542f0ff
...
...
@@ -16,5 +16,9 @@
"BrowseLogSetting"
:
{
"Url"
:
"http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo"
,
"CanLog"
:
"yes"
},
"pps-sys"
:
{
"review"
:
"https://pps.bailuntec.com/Api/amazon/analyze/Download/GetReviewInfoBy"
,
"pps_sell_product"
:
"http://pps.bailuntec.com/WalmartApi/Publish/GetWithSellProductAsync"
}
}
ShortagePush/appsettings.json
View file @
4542f0ff
...
...
@@ -16,5 +16,9 @@
"BrowseLogSetting"
:
{
"Url"
:
"http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo"
,
"CanLog"
:
"yes"
},
"pps-sys"
:
{
"review"
:
"https://pps.bailuntec.com/Api/amazon/analyze/Download/GetReviewInfoBy"
,
"pps_sell_product"
:
"http://pps.bailuntec.com/WalmartApi/Publish/GetWithSellProductAsync"
}
}
ShortagePush/appsettings.prod.json
View file @
4542f0ff
...
...
@@ -9,5 +9,9 @@
"BrowseLogSetting"
:
{
"Url"
:
"http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo"
,
"CanLog"
:
"yes"
},
"pps-sys"
:
{
"review"
:
"https://pps.bailuntec.com/Api/amazon/analyze/Download/GetReviewInfoBy"
,
"pps_sell_product"
:
"http://pps.bailuntec.com/WalmartApi/Publish/GetWithSellProductAsync"
}
}
\ No newline at end of file
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