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
1e02022c
Commit
1e02022c
authored
May 19, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5267f74e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
3 deletions
+36
-3
dc_auto_first_order_sku_dao.cs
AutoTurnOver.DB/dc_auto_first_order_sku_dao.cs
+3
-3
AutoTurnOver.Utility.csproj
AutoTurnOver.Utility/AutoTurnOver.Utility.csproj
+1
-0
ImagerHelper.cs
AutoTurnOver.Utility/ImagerHelper.cs
+31
-0
Program.cs
ResetOutofstock/Program.cs
+1
-0
No files found.
AutoTurnOver.DB/dc_auto_first_order_sku_dao.cs
View file @
1e02022c
...
@@ -103,14 +103,14 @@ namespace AutoTurnOver.DB
...
@@ -103,14 +103,14 @@ namespace AutoTurnOver.DB
List
<
auto_first_order_detailed_dto
>
data_detailed_list
=
new
List
<
auto_first_order_detailed_dto
>();
List
<
auto_first_order_detailed_dto
>
data_detailed_list
=
new
List
<
auto_first_order_detailed_dto
>();
if
(
item_rule
.
lower_limit_sku_count
>
0
&&
itemGroup
.
Count
()
<
item_rule
.
lower_limit_sku_count
)
if
(
item_rule
.
lower_limit_sku_count
>
0
&&
itemGroup
.
Count
()
>
item_rule
.
lower_limit_sku_count
)
{
{
throw
new
Exception
(
$" sku数量不超过
{
item_rule
.
lower_limit_sku_count
}
个 "
);
throw
new
Exception
(
$" sku数量不
应该
超过
{
item_rule
.
lower_limit_sku_count
}
个 "
);
}
}
if
(
item_rule
.
lower_limit_sales
>
0
&&
itemGroup
.
Max
(
v
=>
v
.
product_sales
)
<
item_rule
.
lower_limit_sales
)
if
(
item_rule
.
lower_limit_sales
>
0
&&
itemGroup
.
Max
(
v
=>
v
.
product_sales
)
<
item_rule
.
lower_limit_sales
)
{
{
throw
new
Exception
(
$" 商品日均不
超过
{
item_rule
.
lower_limit_sales
}
个 "
);
throw
new
Exception
(
$" 商品日均不
应该低于
{
item_rule
.
lower_limit_sales
}
个 "
);
}
}
// 固定数量
// 固定数量
...
...
AutoTurnOver.Utility/AutoTurnOver.Utility.csproj
View file @
1e02022c
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="Baidu.AI" Version="3.6.14" />
<PackageReference Include="Bailun.ServiceFabric.Redis" Version="1.0.1" />
<PackageReference Include="Bailun.ServiceFabric.Redis" Version="1.0.1" />
<PackageReference Include="EPPlus.Core" Version="1.5.4" />
<PackageReference Include="EPPlus.Core" Version="1.5.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
...
...
AutoTurnOver.Utility/ImagerHelper.cs
0 → 100644
View file @
1e02022c
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text
;
namespace
AutoTurnOver.Utility
{
public
class
ImagerHelper
{
public
static
void
BodySegDemo
()
{
var
APP_ID
=
"19939161"
;
var
API_KEY
=
"HneGLpXGAT1mFcw1VG4SwG9D"
;
var
SECRET_KEY
=
"IXfbEm2XqSgoXXf0t6dxUZbPunnQ5SyG"
;
var
client
=
new
Baidu
.
Aip
.
BodyAnalysis
.
Body
(
API_KEY
,
SECRET_KEY
);
client
.
Timeout
=
60000
;
// 修改超时时间
var
image
=
File
.
ReadAllBytes
(
@"C:\Users\lizefeng\Desktop\GLUS~)30MWMOK0{M8}8C[{R.jpg"
);
// 调用人像分割,可能会抛出网络等异常,请使用try/catch捕获
var
result
=
client
.
BodySeg
(
image
);
Console
.
WriteLine
(
result
);
// 如果有可选参数
var
options
=
new
Dictionary
<
string
,
object
>{
{
"type"
,
"foreground"
}
};
// 带参数调用人像分割
result
=
client
.
BodySeg
(
image
,
options
);
Console
.
WriteLine
(
result
);
}
}
}
ResetOutofstock/Program.cs
View file @
1e02022c
using
AutoTurnOver.DB
;
using
AutoTurnOver.DB
;
using
AutoTurnOver.Services
;
using
AutoTurnOver.Services
;
using
AutoTurnOver.Utility
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Hosting
;
using
Microsoft.Extensions.Hosting
;
using
System
;
using
System
;
...
...
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