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
21dd9874
Commit
21dd9874
authored
Jun 09, 2022
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增功能:新开了3个站点shopify的广告费
parent
7d49c581
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Services.cs
Bailun.DC.SyncShopifyFee/Services.cs
+8
-1
No files found.
Bailun.DC.SyncShopifyFee/Services.cs
View file @
21dd9874
...
...
@@ -94,13 +94,14 @@ namespace Bailun.DC.SyncShopifyFee
public
void
Save
(
string
website
,
IList
<
response_shopify_fee
>
list
)
{
int
updateCount
=
0
;
int
insertCount
=
0
;
using
(
var
db
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_Data
))
{
if
(
db
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
db
.
Open
();
}
foreach
(
var
item
in
list
)
{
var
m
=
JsonConvert
.
DeserializeObject
<
dc_base_finance_shopify_fee
>(
JsonConvert
.
SerializeObject
(
item
));
...
...
@@ -111,8 +112,14 @@ namespace Bailun.DC.SyncShopifyFee
{
m
.
gmt_create
=
DateTime
.
Now
;
db
.
Insert
(
m
);
insertCount
++;
}
else
{
updateCount
++;
}
}
Console
.
WriteLine
(
$"同步
{
website
}
shopify广告费新增
{
insertCount
}
条数据,更新
{
updateCount
}
条数据"
);
}
}
}
...
...
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